├── README.md ├── basictypes.h ├── blinkgc.sln ├── blinkgc ├── ReadMe.txt ├── Resource.h ├── blinkgc.cpp ├── blinkgc.h ├── blinkgc.ico ├── blinkgc.rc ├── blinkgc.vcxproj ├── blinkgc.vcxproj.filters ├── small.ico ├── stdafx.cpp ├── stdafx.h └── targetver.h ├── config.cpp ├── config.h ├── macros.h ├── platform ├── Platform.cpp ├── Platform.h ├── PlatformExport.h ├── ScriptForbiddenScope.cpp ├── ScriptForbiddenScope.h ├── Task.h ├── asm │ └── SaveRegisters_x86.cpp ├── heap │ ├── BUILD.gn │ ├── BlinkGCMemoryDumpProvider.cpp │ ├── BlinkGCMemoryDumpProvider.h │ ├── BlinkGCMemoryDumpProviderTest.cpp │ ├── BlinkHeapUnitTests.isolate │ ├── CallbackStack.cpp │ ├── CallbackStack.h │ ├── DEPS │ ├── GCInfo.cpp │ ├── GCInfo.h │ ├── GarbageCollected.h │ ├── Handle.h │ ├── Heap.cpp │ ├── Heap.h │ ├── HeapAllocator.cpp │ ├── HeapAllocator.h │ ├── HeapLinkedStack.h │ ├── HeapTerminatedArray.h │ ├── HeapTerminatedArrayBuilder.h │ ├── HeapTest.cpp │ ├── InlinedGlobalMarkingVisitor.h │ ├── MarkingVisitor.h │ ├── MarkingVisitorImpl.h │ ├── OWNERS │ ├── PageMemory.h │ ├── PagePool.cpp │ ├── PagePool.h │ ├── PersistentNode.cpp │ ├── PersistentNode.h │ ├── RunAllTests.cpp │ ├── SafePoint.cpp │ ├── SafePoint.h │ ├── StackFrameDepth.cpp │ ├── StackFrameDepth.h │ ├── ThreadState.cpp │ ├── ThreadState.h │ ├── ThreadingTraits.h │ ├── TraceTraits.h │ ├── Visitor.h │ ├── asm │ │ ├── BUILD.gn │ │ ├── SaveRegisters_arm.S │ │ ├── SaveRegisters_arm64.S │ │ ├── SaveRegisters_mips.S │ │ ├── SaveRegisters_mips64.S │ │ ├── SaveRegisters_x86.asm │ │ └── SaveRegisters_x86.cpp │ ├── blink_heap.gypi │ └── glue │ │ ├── DEPS │ │ ├── MessageLoopInterruptor.h │ │ └── PendingGCRunner.h └── traceevent.h ├── public ├── platform │ ├── DEPS │ ├── PlatformNone.cpp │ ├── WebApplicationCacheHost.h │ ├── WebApplicationCacheHostClient.h │ ├── WebAudioBus.h │ ├── WebAudioDestinationConsumer.h │ ├── WebAudioDevice.h │ ├── WebAudioSourceProvider.h │ ├── WebAudioSourceProviderClient.h │ ├── WebBatteryStatus.h │ ├── WebBatteryStatusListener.h │ ├── WebBlendMode.h │ ├── WebBlobData.h │ ├── WebBlobInfo.h │ ├── WebBlobRegistry.h │ ├── WebCString.h │ ├── WebCallbacks.h │ ├── WebCanvas.h │ ├── WebCircularGeofencingRegion.h │ ├── WebClipboard.h │ ├── WebColor.h │ ├── WebCommon.h │ ├── WebCompositeAndReadbackAsyncCallback.h │ ├── WebCompositorAnimation.h │ ├── WebCompositorAnimationCurve.h │ ├── WebCompositorAnimationDelegate.h │ ├── WebCompositorAnimationPlayer.h │ ├── WebCompositorAnimationPlayerClient.h │ ├── WebCompositorAnimationTimeline.h │ ├── WebCompositorOutputSurface.h │ ├── WebCompositorSupport.h │ ├── WebConnectionType.h │ ├── WebContentDecryptionModule.h │ ├── WebContentDecryptionModuleAccess.h │ ├── WebContentDecryptionModuleException.h │ ├── WebContentDecryptionModuleResult.h │ ├── WebContentDecryptionModuleSession.h │ ├── WebContentLayer.h │ ├── WebContentLayerClient.h │ ├── WebContentSettingCallbacks.h │ ├── WebConvertableToTraceFormat.h │ ├── WebCookieJar.h │ ├── WebCredential.h │ ├── WebCredentialManagerClient.h │ ├── WebCredentialManagerError.h │ ├── WebCrossOriginServiceWorkerClient.h │ ├── WebCrypto.h │ ├── WebCryptoAlgorithm.h │ ├── WebCryptoAlgorithmParams.h │ ├── WebCryptoKey.h │ ├── WebCryptoKeyAlgorithm.h │ ├── WebCryptoKeyAlgorithmParams.h │ ├── WebCursorInfo.h │ ├── WebData.h │ ├── WebDataConsumerHandle.h │ ├── WebDatabaseObserver.h │ ├── WebDeviceLightListener.h │ ├── WebDiscardableMemory.h │ ├── WebDisplayItemList.h │ ├── WebDisplayItemTransformTree.h │ ├── WebDisplayMode.h │ ├── WebDoublePoint.h │ ├── WebDragData.h │ ├── WebEncryptedMediaClient.h │ ├── WebEncryptedMediaKeyInformation.h │ ├── WebEncryptedMediaRequest.h │ ├── WebEncryptedMediaTypes.h │ ├── WebExternalBitmap.h │ ├── WebExternalTextureLayer.h │ ├── WebExternalTextureLayerClient.h │ ├── WebExternalTextureMailbox.h │ ├── WebFallbackThemeEngine.h │ ├── WebFederatedCredential.h │ ├── WebFileError.h │ ├── WebFileInfo.h │ ├── WebFileSystem.h │ ├── WebFileSystemCallbacks.h │ ├── WebFileSystemEntry.h │ ├── WebFileSystemType.h │ ├── WebFileUtilities.h │ ├── WebFileWriter.h │ ├── WebFileWriterClient.h │ ├── WebFilterAnimationCurve.h │ ├── WebFilterKeyframe.h │ ├── WebFilterOperations.h │ ├── WebFlingAnimator.h │ ├── WebFloatAnimationCurve.h │ ├── WebFloatKeyframe.h │ ├── WebFloatPoint.h │ ├── WebFloatPoint3D.h │ ├── WebFloatRect.h │ ├── WebFloatSize.h │ ├── WebFocusType.h │ ├── WebFrameTimingEvent.h │ ├── WebGamepad.h │ ├── WebGamepadListener.h │ ├── WebGamepads.h │ ├── WebGeofencingError.h │ ├── WebGeofencingEventType.h │ ├── WebGeofencingProvider.h │ ├── WebGeofencingRegistration.h │ ├── WebGestureCurve.h │ ├── WebGestureCurveTarget.h │ ├── WebGestureDevice.h │ ├── WebGraphicsContext3D.h │ ├── WebGraphicsContext3DProvider.h │ ├── WebGraphicsLayerDebugInfo.h │ ├── WebHTTPBody.h │ ├── WebHTTPHeaderVisitor.h │ ├── WebHTTPLoadInfo.h │ ├── WebHistoryScrollRestorationType.h │ ├── WebImage.h │ ├── WebImageGenerator.h │ ├── WebImageLayer.h │ ├── WebInbandTextTrack.h │ ├── WebInbandTextTrackClient.h │ ├── WebLayer.h │ ├── WebLayerClient.h │ ├── WebLayerPositionConstraint.h │ ├── WebLayerScrollClient.h │ ├── WebLayerTreeView.h │ ├── WebLayoutAndPaintAsyncCallback.h │ ├── WebLocalizedString.h │ ├── WebMIDIAccessor.h │ ├── WebMIDIAccessorClient.h │ ├── WebMediaConstraints.h │ ├── WebMediaDeviceInfo.h │ ├── WebMediaKeySystemConfiguration.h │ ├── WebMediaKeySystemMediaCapability.h │ ├── WebMediaPlayer.h │ ├── WebMediaPlayerClient.h │ ├── WebMediaPlayerEncryptedMediaClient.h │ ├── WebMediaSource.h │ ├── WebMediaStream.h │ ├── WebMediaStreamCenter.h │ ├── WebMediaStreamCenterClient.h │ ├── WebMediaStreamSource.h │ ├── WebMediaStreamTrack.h │ ├── WebMediaStreamTrackSourcesRequest.h │ ├── WebMemoryAllocatorDump.h │ ├── WebMemoryDumpProvider.h │ ├── WebMessagePortChannel.h │ ├── WebMessagePortChannelClient.h │ ├── WebMimeRegistry.h │ ├── WebNinePatchLayer.h │ ├── WebNonCopyable.h │ ├── WebPageVisibilityState.h │ ├── WebPasswordCredential.h │ ├── WebPlatformEventListener.h │ ├── WebPlatformEventType.h │ ├── WebPluginListBuilder.h │ ├── WebPoint.h │ ├── WebPrerender.h │ ├── WebPrerenderingSupport.h │ ├── WebPrescientNetworking.h │ ├── WebPrivateOwnPtr.h │ ├── WebPrivatePtr.h │ ├── WebProcessMemoryDump.h │ ├── WebPublicSuffixList.h │ ├── WebRTCConfiguration.h │ ├── WebRTCDTMFSenderHandler.h │ ├── WebRTCDTMFSenderHandlerClient.h │ ├── WebRTCDataChannelHandler.h │ ├── WebRTCDataChannelHandlerClient.h │ ├── WebRTCDataChannelInit.h │ ├── WebRTCICECandidate.h │ ├── WebRTCOfferOptions.h │ ├── WebRTCPeerConnectionHandler.h │ ├── WebRTCPeerConnectionHandlerClient.h │ ├── WebRTCSessionDescription.h │ ├── WebRTCSessionDescriptionRequest.h │ ├── WebRTCStatsRequest.h │ ├── WebRTCStatsResponse.h │ ├── WebRTCVoidRequest.h │ ├── WebRect.h │ ├── WebReferrerPolicy.h │ ├── WebRenderingStats.h │ ├── WebScheduler.h │ ├── WebScreenInfo.h │ ├── WebScrollBlocksOn.h │ ├── WebScrollOffsetAnimationCurve.h │ ├── WebScrollbar.h │ ├── WebScrollbarBehavior.h │ ├── WebScrollbarLayer.h │ ├── WebScrollbarThemeGeometry.h │ ├── WebScrollbarThemePainter.h │ ├── WebSecurityOrigin.h │ ├── WebSelectionBound.h │ ├── WebSerializedOrigin.h │ ├── WebServiceWorker.h │ ├── WebServiceWorkerCache.h │ ├── WebServiceWorkerCacheError.h │ ├── WebServiceWorkerCacheStorage.h │ ├── WebServiceWorkerClientQueryOptions.h │ ├── WebServiceWorkerClientType.h │ ├── WebServiceWorkerClientsClaimCallbacks.h │ ├── WebServiceWorkerClientsInfo.h │ ├── WebServiceWorkerError.h │ ├── WebServiceWorkerEventResult.h │ ├── WebServiceWorkerProvider.h │ ├── WebServiceWorkerProviderClient.h │ ├── WebServiceWorkerProxy.h │ ├── WebServiceWorkerRegistration.h │ ├── WebServiceWorkerRegistrationProxy.h │ ├── WebServiceWorkerRequest.h │ ├── WebServiceWorkerResponse.h │ ├── WebServiceWorkerResponseError.h │ ├── WebServiceWorkerResponseType.h │ ├── WebServiceWorkerSkipWaitingCallbacks.h │ ├── WebServiceWorkerState.h │ ├── WebSetSinkIdError.h │ ├── WebSocketHandle.h │ ├── WebSocketHandleClient.h │ ├── WebSocketHandshakeRequestInfo.h │ ├── WebSocketHandshakeResponseInfo.h │ ├── WebSourceBuffer.h │ ├── WebSourceBufferClient.h │ ├── WebSourceInfo.h │ ├── WebSpeechSynthesisUtterance.h │ ├── WebSpeechSynthesisVoice.h │ ├── WebSpeechSynthesizer.h │ ├── WebSpeechSynthesizerClient.h │ ├── WebStorageArea.h │ ├── WebStorageNamespace.h │ ├── WebStorageQuotaCallbacks.h │ ├── WebStorageQuotaError.h │ ├── WebStorageQuotaType.h │ ├── WebString.h │ ├── WebSuspendableTask.h │ ├── WebThemeEngine.h │ ├── WebThread.h │ ├── WebThreadSafeData.h │ ├── WebThreadedDataReceiver.h │ ├── WebTimeRange.h │ ├── WebTopControlsState.h │ ├── WebTraceLocation.h │ ├── WebTransformAnimationCurve.h │ ├── WebTransformKeyframe.h │ ├── WebTransformOperations.h │ ├── WebURL.h │ ├── WebURLError.h │ ├── WebURLLoadTiming.h │ ├── WebURLLoader.h │ ├── WebURLLoaderClient.h │ ├── WebURLRequest.h │ ├── WebURLResponse.h │ ├── WebUnitTestSupport.h │ ├── WebVector.h │ ├── WebWaitableEvent.h │ ├── modules │ │ ├── app_banner │ │ │ ├── OWNERS │ │ │ ├── WebAppBannerClient.h │ │ │ ├── WebAppBannerPromptReply.h │ │ │ └── WebAppBannerPromptResult.h │ │ ├── background_sync │ │ │ ├── OWNERS │ │ │ ├── WebSyncClient.h │ │ │ ├── WebSyncError.h │ │ │ ├── WebSyncPermissionStatus.h │ │ │ ├── WebSyncProvider.h │ │ │ └── WebSyncRegistration.h │ │ ├── bluetooth │ │ │ ├── OWNERS │ │ │ ├── WebBluetooth.h │ │ │ ├── WebBluetoothDevice.h │ │ │ ├── WebBluetoothError.h │ │ │ ├── WebBluetoothGATTCharacteristic.h │ │ │ ├── WebBluetoothGATTRemoteServer.h │ │ │ ├── WebBluetoothGATTService.h │ │ │ └── WebRequestDeviceOptions.h │ │ ├── device_orientation │ │ │ ├── OWNERS │ │ │ ├── WebDeviceMotionData.h │ │ │ ├── WebDeviceMotionListener.h │ │ │ ├── WebDeviceOrientationData.h │ │ │ └── WebDeviceOrientationListener.h │ │ ├── indexeddb │ │ │ ├── OWNERS │ │ │ ├── WebIDBCallbacks.h │ │ │ ├── WebIDBCursor.h │ │ │ ├── WebIDBDatabase.h │ │ │ ├── WebIDBDatabaseCallbacks.h │ │ │ ├── WebIDBDatabaseError.h │ │ │ ├── WebIDBDatabaseException.h │ │ │ ├── WebIDBFactory.h │ │ │ ├── WebIDBKey.h │ │ │ ├── WebIDBKeyPath.h │ │ │ ├── WebIDBKeyRange.h │ │ │ ├── WebIDBMetadata.h │ │ │ ├── WebIDBTypes.h │ │ │ └── WebIDBValue.h │ │ ├── navigator_services │ │ │ ├── OWNERS │ │ │ ├── WebServicePort.h │ │ │ ├── WebServicePortCallbacks.h │ │ │ ├── WebServicePortProvider.h │ │ │ └── WebServicePortProviderClient.h │ │ ├── notifications │ │ │ ├── OWNERS │ │ │ ├── WebNotificationData.h │ │ │ ├── WebNotificationDelegate.h │ │ │ ├── WebNotificationManager.h │ │ │ └── WebNotificationPermission.h │ │ ├── permissions │ │ │ ├── OWNERS │ │ │ ├── WebPermissionClient.h │ │ │ ├── WebPermissionObserver.h │ │ │ ├── WebPermissionStatus.h │ │ │ └── WebPermissionType.h │ │ ├── presentation │ │ │ ├── OWNERS │ │ │ ├── WebPresentationAvailabilityObserver.h │ │ │ ├── WebPresentationClient.h │ │ │ ├── WebPresentationController.h │ │ │ ├── WebPresentationError.h │ │ │ └── WebPresentationSessionClient.h │ │ ├── push_messaging │ │ │ ├── OWNERS │ │ │ ├── WebPushClient.h │ │ │ ├── WebPushError.h │ │ │ ├── WebPushPermissionStatus.h │ │ │ ├── WebPushProvider.h │ │ │ ├── WebPushSubscription.h │ │ │ └── WebPushSubscriptionOptions.h │ │ ├── screen_orientation │ │ │ ├── OWNERS │ │ │ ├── WebLockOrientationCallback.h │ │ │ ├── WebLockOrientationError.h │ │ │ ├── WebScreenOrientationClient.h │ │ │ ├── WebScreenOrientationLockType.h │ │ │ └── WebScreenOrientationType.h │ │ └── vr │ │ │ ├── OWNERS │ │ │ ├── WebVR.h │ │ │ └── WebVRClient.h │ └── ——WebSize.h └── web │ ├── DEPS │ ├── OWNERS │ ├── WebAXEnums.h │ ├── WebAXObject.h │ ├── WebActiveWheelFlingParameters.h │ ├── WebArrayBuffer.h │ ├── WebArrayBufferConverter.h │ ├── WebArrayBufferView.h │ ├── WebAutofillClient.h │ ├── WebBeginFrameArgs.h │ ├── WebBindings.h │ ├── WebBlob.h │ ├── WebCache.h │ ├── WebCachedURLRequest.h │ ├── WebColorChooser.h │ ├── WebColorChooserClient.h │ ├── WebColorName.h │ ├── WebColorSuggestion.h │ ├── WebCompositionUnderline.h │ ├── WebConsoleMessage.h │ ├── WebContentDetectionResult.h │ ├── WebContentSecurityPolicy.h │ ├── WebContentSettingsClient.h │ ├── WebContextMenuData.h │ ├── WebCryptoNormalize.h │ ├── WebCustomElement.h │ ├── WebDOMActivityLogger.h │ ├── WebDOMCustomEvent.h │ ├── WebDOMError.h │ ├── WebDOMEvent.h │ ├── WebDOMFileSystem.h │ ├── WebDOMMediaStreamTrack.h │ ├── WebDOMMessageEvent.h │ ├── WebDOMMouseEvent.h │ ├── WebDOMProgressEvent.h │ ├── WebDOMResourceProgressEvent.h │ ├── WebDataSource.h │ ├── WebDatabase.h │ ├── WebDateTimeChooserCompletion.h │ ├── WebDateTimeChooserParams.h │ ├── WebDateTimeInputType.h │ ├── WebDateTimeSuggestion.h │ ├── WebDevToolsAgent.h │ ├── WebDevToolsAgentClient.h │ ├── WebDevToolsFrontend.h │ ├── WebDevToolsFrontendClient.h │ ├── WebDeviceEmulationParams.h │ ├── WebDocument.h │ ├── WebDocumentType.h │ ├── WebDragOperation.h │ ├── WebDragStatus.h │ ├── WebDraggableRegion.h │ ├── WebElement.h │ ├── WebElementCollection.h │ ├── WebEmbeddedWorker.h │ ├── WebEmbeddedWorkerStartData.h │ ├── WebExceptionCode.h │ ├── WebExternalPopupMenu.h │ ├── WebExternalPopupMenuClient.h │ ├── WebFileChooserCompletion.h │ ├── WebFileChooserParams.h │ ├── WebFindOptions.h │ ├── WebFont.h │ ├── WebFontDescription.h │ ├── WebFormControlElement.h │ ├── WebFormElement.h │ ├── WebFrame.h │ ├── WebFrameClient.h │ ├── WebFrameLoadType.h │ ├── WebFrameWidget.h │ ├── WebGeolocationClient.h │ ├── WebGeolocationController.h │ ├── WebGeolocationError.h │ ├── WebGeolocationPermissionRequest.h │ ├── WebGeolocationPermissionRequestManager.h │ ├── WebGeolocationPosition.h │ ├── WebGlyphCache.h │ ├── WebGraphicsContext.h │ ├── WebHeap.h │ ├── WebHelperPlugin.h │ ├── WebHistoryCommitType.h │ ├── WebHistoryItem.h │ ├── WebHitTestResult.h │ ├── WebIconURL.h │ ├── WebImageCache.h │ ├── WebImageDecoder.h │ ├── WebInputElement.h │ ├── WebInputEvent.h │ ├── WebKit.h │ ├── WebLabelElement.h │ ├── WebLeakDetector.h │ ├── WebLocalFrame.h │ ├── WebMIDIClient.h │ ├── WebMIDIPermissionRequest.h │ ├── WebMediaDevicesRequest.h │ ├── WebMediaPlayerAction.h │ ├── WebMediaStreamRegistry.h │ ├── WebMemoryUsageInfo.h │ ├── WebMenuItemInfo.h │ ├── WebNavigationPolicy.h │ ├── WebNavigationType.h │ ├── WebNavigatorContentUtilsClient.h │ ├── WebNetworkStateNotifier.h │ ├── WebNode.h │ ├── WebNodeList.h │ ├── WebOptionElement.h │ ├── WebPageOverlay.h │ ├── WebPagePopup.h │ ├── WebPageSerializer.h │ ├── WebPageSerializerClient.h │ ├── WebPerformance.h │ ├── WebPlugin.h │ ├── WebPluginAction.h │ ├── WebPluginContainer.h │ ├── WebPluginDocument.h │ ├── WebPluginParams.h │ ├── WebPluginPlaceholder.h │ ├── WebPluginScriptForbiddenScope.h │ ├── WebPopupMenuInfo.h │ ├── WebPopupType.h │ ├── WebPrerendererClient.h │ ├── WebPrintParams.h │ ├── WebPrintPresetOptions.h │ ├── WebPrintScalingOption.h │ ├── WebRange.h │ ├── WebRemoteFrame.h │ ├── WebRemoteFrameClient.h │ ├── WebRuntimeFeatures.h │ ├── WebSandboxFlags.h │ ├── WebScopedMicrotaskSuppression.h │ ├── WebScopedUserGesture.h │ ├── WebScopedWindowFocusAllowedIndicator.h │ ├── WebScriptBindings.h │ ├── WebScriptController.h │ ├── WebScriptExecutionCallback.h │ ├── WebScriptSource.h │ ├── WebSearchableFormData.h │ ├── WebSecurityOrigin.h │ ├── WebSecurityPolicy.h │ ├── WebSelectElement.h │ ├── WebSelection.h │ ├── WebSelector.h │ ├── WebSerializedScriptValue.h │ ├── WebSerializedScriptValueVersion.h │ ├── WebServiceWorkerContextClient.h │ ├── WebServiceWorkerContextProxy.h │ ├── WebServiceWorkerNetworkProvider.h │ ├── WebSettings.h │ ├── WebSharedWorker.h │ ├── WebSharedWorkerClient.h │ ├── WebSharedWorkerConnector.h │ ├── WebSharedWorkerRepositoryClient.h │ ├── WebSocket.h │ ├── WebSocketClient.h │ ├── WebSpeechGrammar.h │ ├── WebSpeechRecognitionHandle.h │ ├── WebSpeechRecognitionParams.h │ ├── WebSpeechRecognitionResult.h │ ├── WebSpeechRecognizer.h │ ├── WebSpeechRecognizerClient.h │ ├── WebSpellCheckClient.h │ ├── WebStorageEventDispatcher.h │ ├── WebSurroundingText.h │ ├── WebTestInterfaceFactory.h │ ├── WebTestingSupport.h │ ├── WebTextAffinity.h │ ├── WebTextAreaElement.h │ ├── WebTextCheckingCompletion.h │ ├── WebTextCheckingResult.h │ ├── WebTextCheckingType.h │ ├── WebTextDecorationType.h │ ├── WebTextDirection.h │ ├── WebTextInputInfo.h │ ├── WebTextInputType.h │ ├── WebTextRun.h │ ├── WebTouchAction.h │ ├── WebTouchPoint.h │ ├── WebTreeScopeType.h │ ├── WebURLLoaderOptions.h │ ├── WebUserGestureIndicator.h │ ├── WebUserGestureToken.h │ ├── WebUserMediaClient.h │ ├── WebUserMediaRequest.h │ ├── WebView.h │ ├── WebViewClient.h │ ├── WebWidget.h │ ├── WebWidgetClient.h │ ├── WebWindowFeatures.h │ ├── WebWorkerContentSettingsClientProxy.h │ ├── android │ └── DEPS │ ├── default │ └── WebRenderTheme.h │ ├── linux │ └── WebFontRendering.h │ ├── mac │ ├── WebInputEventFactory.h │ ├── WebScrollbarTheme.h │ └── WebSubstringUtil.h │ ├── modules │ └── notifications │ │ ├── OWNERS │ │ └── WebNotificationPermissionCallback.h │ └── win │ └── WebFontRendering.h ├── web ├── CurrentTimeImpl.cpp ├── CurrentTimeImpl.h ├── WebKit.cpp ├── WebKit.h ├── WebMemoryDumpProvider.cpp ├── WebScheduler.cpp ├── WebSchedulerImpl.cpp ├── WebSchedulerImpl.h ├── WebThreadImpl.cpp ├── WebThreadImpl.h ├── WebTimerBase.cpp ├── WebTimerBase.h └── WebTraceLocation.cpp └── wtf ├── ASCIICType.h ├── ASCIICTypeTest.cpp ├── AddressSanitizer.h ├── AddressSpaceRandomization.cpp ├── AddressSpaceRandomization.h ├── Alignment.h ├── ArrayBuffer.cpp ├── ArrayBuffer.h ├── ArrayBufferBuilder.cpp ├── ArrayBufferBuilder.h ├── ArrayBufferBuilderTest.cpp ├── ArrayBufferContents.cpp ├── ArrayBufferContents.h ├── ArrayBufferView.cpp ├── ArrayBufferView.h ├── ArrayPiece.cpp ├── ArrayPiece.h ├── Assertions.cpp ├── Assertions.h ├── Atomics.h ├── BUILD.gn ├── BitArray.h ├── BitVector.cpp ├── BitVector.h ├── BitwiseOperations.h ├── BloomFilter.h ├── ByteOrder.h ├── ByteSwap.h ├── CONTRIBUTORS.pthreads-win32 ├── CPU.h ├── CheckedArithmetic.h ├── CheckedArithmeticTest.cpp ├── Compiler.h ├── ConditionalDestructor.h ├── ContainerAnnotations.h ├── CryptographicallyRandomNumber.cpp ├── CryptographicallyRandomNumber.h ├── CurrentTime.cpp ├── CurrentTime.h ├── DataLog.cpp ├── DataLog.h ├── DateMath.cpp ├── DateMath.h ├── DefaultAllocator.cpp ├── DefaultAllocator.h ├── Deque.h ├── DequeTest.cpp ├── DoublyLinkedList.h ├── DynamicAnnotations.cpp ├── DynamicAnnotations.h ├── FastAllocBase.h ├── FastMalloc.cpp ├── FastMalloc.h ├── FilePrintStream.cpp ├── FilePrintStream.h ├── Float32Array.h ├── Float64Array.h ├── Forward.h ├── Functional.h ├── FunctionalTest.cpp ├── GetPtr.h ├── HashCountedSet.h ├── HashFunctions.h ├── HashIterators.h ├── HashMap.h ├── HashMapTest.cpp ├── HashSet.h ├── HashSetTest.cpp ├── HashTable.cpp ├── HashTable.h ├── HashTableDeletedValueType.h ├── HashTraits.h ├── HexNumber.h ├── InstanceCounter.cpp ├── InstanceCounter.h ├── Int16Array.h ├── Int32Array.h ├── Int8Array.h ├── IntegralTypedArrayBase.h ├── LeakAnnotations.h ├── LinkedHashSet.h ├── LinkedStack.h ├── ListHashSet.h ├── ListHashSetTest.cpp ├── Locker.h ├── MainThread.cpp ├── MainThread.h ├── MathExtras.h ├── MathExtrasTest.cpp ├── MessageQueue.h ├── NonCopyingSort.h ├── Noncopyable.h ├── NotFound.h ├── NullPtr.h ├── OWNERS ├── Optional.h ├── OptionalTest.cpp ├── OwnPtr.h ├── OwnPtrCommon.h ├── PageAllocator.cpp ├── PageAllocator.h ├── PartitionAlloc.cpp ├── PartitionAlloc.h ├── PartitionAllocTest.cpp ├── Partitions.cpp ├── Partitions.h ├── PassOwnPtr.h ├── PassRefPtr.h ├── PassTraits.h ├── PrintStream.cpp ├── PrintStream.h ├── RawPtr.h ├── RefCounted.h ├── RefCountedLeakCounter.cpp ├── RefCountedLeakCounter.h ├── RefPtr.h ├── RefPtrTest.cpp ├── RefVector.h ├── RetainPtr.h ├── SaturatedArithmetic.h ├── SaturatedArithmeticTest.cpp ├── SizeLimits.cpp ├── SpinLock.h ├── StaticConstructors.h ├── StdLibExtras.h ├── StreamBuffer.h ├── StringExtras.h ├── StringExtrasTest.cpp ├── StringHasher.h ├── StringHasherTest.cpp ├── TemporaryChange.h ├── TemporaryChangeTest.cpp ├── TerminatedArray.h ├── TerminatedArrayBuilder.h ├── ThreadRestrictionVerifier.h ├── ThreadSafeRefCounted.h ├── ThreadSpecific.h ├── ThreadSpecificWin.cpp ├── Threading.h ├── ThreadingPrimitives.h ├── ThreadingPthreads.cpp ├── ThreadingWin.cpp ├── TreeNode.h ├── TreeNodeTest.cpp ├── TriState.h ├── TypeTraits.cpp ├── TypeTraits.h ├── TypedArrayBase.h ├── Uint16Array.h ├── Uint32Array.h ├── Uint8Array.h ├── Uint8ClampedArray.h ├── Utility.h ├── Vector.h ├── VectorTest.cpp ├── VectorTraits.h ├── WTF.cpp ├── WTF.h ├── WTFExport.h ├── WTFThreadData.cpp ├── WTFThreadData.h ├── WeakPtr.h ├── asm └── SaturatedArithmeticARM.h ├── dtoa.cpp ├── dtoa.h ├── dtoa ├── COPYING ├── LICENSE ├── README ├── bignum-dtoa.cc ├── bignum-dtoa.h ├── bignum.cc ├── bignum.h ├── cached-powers.cc ├── cached-powers.h ├── diy-fp.cc ├── diy-fp.h ├── double-conversion.cc ├── double-conversion.h ├── double.h ├── fast-dtoa.cc ├── fast-dtoa.h ├── fixed-dtoa.cc ├── fixed-dtoa.h ├── strtod.cc ├── strtod.h └── utils.h ├── testing ├── RunAllTests.cpp ├── WTFTestHelpers.cpp ├── WTFTestHelpers.h ├── WTFTestHelpersTest.cpp └── WTFUnitTestHelpersExport.h ├── text ├── ASCIIFastPath.h ├── AtomicString.cpp ├── AtomicString.h ├── AtomicStringCF.cpp ├── AtomicStringHash.h ├── AtomicStringTest.cpp ├── Base64.cpp ├── Base64.h ├── CString.cpp ├── CString.h ├── CStringTest.cpp ├── CharacterNames.h ├── Collator.h ├── IntegerToStringConversion.h ├── StringBuffer.h ├── StringBufferTest.cpp ├── StringBuilder.cpp ├── StringBuilder.h ├── StringBuilderTest.cpp ├── StringCF.cpp ├── StringConcatenate.cpp ├── StringConcatenate.h ├── StringHash.h ├── StringImpl.cpp ├── StringImpl.h ├── StringImplCF.cpp ├── StringImplMac.mm ├── StringImplTest.cpp ├── StringMac.mm ├── StringOperators.h ├── StringOperatorsTest.cpp ├── StringStatics.cpp ├── StringStatics.h ├── StringUTF8Adaptor.h ├── StringView.h ├── TextCodec.cpp ├── TextCodec.h ├── TextCodecASCIIFastPath.h ├── TextCodecICU.cpp ├── TextCodecICU.h ├── TextCodecLatin1.cpp ├── TextCodecLatin1.h ├── TextCodecReplacement.cpp ├── TextCodecReplacement.h ├── TextCodecReplacementTest.cpp ├── TextCodecUTF16.cpp ├── TextCodecUTF16.h ├── TextCodecUTF8.cpp ├── TextCodecUTF8.h ├── TextCodecUTF8Test.cpp ├── TextCodecUserDefined.cpp ├── TextCodecUserDefined.h ├── TextEncoding.cpp ├── TextEncoding.h ├── TextEncodingRegistry.cpp ├── TextEncodingRegistry.h ├── TextPosition.cpp ├── TextPosition.h ├── UTF8.cpp ├── UTF8.h ├── Unicode.h ├── WTFString.cpp ├── WTFString.h ├── WTFStringTest.cpp ├── WTFStringUtil.cpp ├── WTFStringUtil.h ├── icu │ ├── CollatorICU.cpp │ └── _UnicodeIcu.h └── qt4 │ ├── QChar.h │ ├── QString.h │ ├── QtGlobal.h │ ├── UnicodeMacrosFromICU.h │ ├── UnicodeQt4.cpp │ ├── UnicodeQt4.h │ └── qunicodetables.h ├── wtf.gyp ├── wtf.gypi ├── wtf.sln ├── wtf.vcxproj ├── wtf.vcxproj.filters ├── wtf_config.vcxproj ├── wtf_config.vcxproj.filters ├── wtf_tests.gyp ├── wtf_tests.sln ├── wtf_unittest_helpers.vcxproj ├── wtf_unittest_helpers.vcxproj.filters ├── wtf_unittests.vcxproj └── wtf_unittests.vcxproj.filters /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weolar/blinkgc/c830123375bc39e7767bfb5756e5614403537963/README.md -------------------------------------------------------------------------------- /blinkgc.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.23107.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "blinkgc", "blinkgc\blinkgc.vcxproj", "{D7AB7B5D-934E-4666-BCC2-EB07D3D7E9D3}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {D7AB7B5D-934E-4666-BCC2-EB07D3D7E9D3}.Debug|x64.ActiveCfg = Debug|x64 17 | {D7AB7B5D-934E-4666-BCC2-EB07D3D7E9D3}.Debug|x64.Build.0 = Debug|x64 18 | {D7AB7B5D-934E-4666-BCC2-EB07D3D7E9D3}.Debug|x86.ActiveCfg = Debug|Win32 19 | {D7AB7B5D-934E-4666-BCC2-EB07D3D7E9D3}.Debug|x86.Build.0 = Debug|Win32 20 | {D7AB7B5D-934E-4666-BCC2-EB07D3D7E9D3}.Release|x64.ActiveCfg = Release|x64 21 | {D7AB7B5D-934E-4666-BCC2-EB07D3D7E9D3}.Release|x64.Build.0 = Release|x64 22 | {D7AB7B5D-934E-4666-BCC2-EB07D3D7E9D3}.Release|x86.ActiveCfg = Release|Win32 23 | {D7AB7B5D-934E-4666-BCC2-EB07D3D7E9D3}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /blinkgc/ReadMe.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | WIN32 应用程序:blinkgc 项目概述 3 | ======================================================================== 4 | 5 | 应用程序向导已为您创建了此 blinkgc 应用程序。 6 | 7 | 本文件概要介绍组成 blinkgc 应用程序的每个文件的内容。 8 | 9 | 10 | blinkgc.vcxproj 11 | 这是使用应用程序向导生成的 VC++ 项目的主项目文件,其中包含生成该文件的 Visual C++ 的版本信息,以及有关使用应用程序向导选择的平台、配置和项目功能的信息。 12 | 13 | blinkgc.vcxproj.filters 14 | 这是使用“应用程序向导”生成的 VC++ 项目筛选器文件。它包含有关项目文件与筛选器之间的关联信息。在 IDE 中,通过这种关联,在特定节点下以分组形式显示具有相似扩展名的文件。例如,“.cpp”文件与“源文件”筛选器关联。 15 | 16 | blinkgc.cpp 17 | 这是主应用程序源文件。 18 | 19 | ///////////////////////////////////////////////////////////////////////////// 20 | 应用程序向导创建了下列资源: 21 | 22 | blinkgc.rc 23 | 这是程序使用的所有 Microsoft Windows 资源的列表。它包括 RES 子目录中存储的图标、位图和光标。此文件可以直接在 Microsoft Visual C++ 中进行编辑。 24 | 25 | Resource.h 26 | 这是标准头文件,可用于定义新的资源 ID。Microsoft Visual C++ 将读取并更新此文件。 27 | 28 | blinkgc.ico 29 | 这是用作应用程序图标 (32x32) 的图标文件。此图标包括在主资源文件 blinkgc.rc 中。 30 | 31 | small.ico 32 | 这是一个图标文件,其中包含应用程序的图标的较小版本 (16x16)。此图标包括在主资源文件 blinkgc.rc 中。 33 | 34 | ///////////////////////////////////////////////////////////////////////////// 35 | 其他标准文件: 36 | 37 | StdAfx.h, StdAfx.cpp 38 | 这些文件用于生成名为 blinkgc.pch 的预编译头 (PCH) 文件和名为 StdAfx.obj 的预编译类型文件。 39 | 40 | ///////////////////////////////////////////////////////////////////////////// 41 | 其他注释: 42 | 43 | 应用程序向导使用“TODO:”注释来指示应添加或自定义的源代码部分。 44 | 45 | ///////////////////////////////////////////////////////////////////////////// 46 | -------------------------------------------------------------------------------- /blinkgc/Resource.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weolar/blinkgc/c830123375bc39e7767bfb5756e5614403537963/blinkgc/Resource.h -------------------------------------------------------------------------------- /blinkgc/blinkgc.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weolar/blinkgc/c830123375bc39e7767bfb5756e5614403537963/blinkgc/blinkgc.cpp -------------------------------------------------------------------------------- /blinkgc/blinkgc.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "resource.h" 4 | -------------------------------------------------------------------------------- /blinkgc/blinkgc.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weolar/blinkgc/c830123375bc39e7767bfb5756e5614403537963/blinkgc/blinkgc.ico -------------------------------------------------------------------------------- /blinkgc/blinkgc.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weolar/blinkgc/c830123375bc39e7767bfb5756e5614403537963/blinkgc/blinkgc.rc -------------------------------------------------------------------------------- /blinkgc/small.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weolar/blinkgc/c830123375bc39e7767bfb5756e5614403537963/blinkgc/small.ico -------------------------------------------------------------------------------- /blinkgc/stdafx.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weolar/blinkgc/c830123375bc39e7767bfb5756e5614403537963/blinkgc/stdafx.cpp -------------------------------------------------------------------------------- /blinkgc/stdafx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weolar/blinkgc/c830123375bc39e7767bfb5756e5614403537963/blinkgc/stdafx.h -------------------------------------------------------------------------------- /blinkgc/targetver.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weolar/blinkgc/c830123375bc39e7767bfb5756e5614403537963/blinkgc/targetver.h -------------------------------------------------------------------------------- /config.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "config.h" -------------------------------------------------------------------------------- /platform/Platform.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "config.h" 3 | #include "Platform.h" 4 | 5 | #include "web/WebThreadImpl.h" 6 | 7 | namespace blink { 8 | 9 | Platform* Platform::m_inst = nullptr; 10 | 11 | Platform::Platform() 12 | { 13 | m_thread = nullptr; 14 | m_mainThread = nullptr; 15 | } 16 | 17 | void Platform::shutdown() 18 | { 19 | ; 20 | } 21 | 22 | Platform* Platform::current() 23 | { 24 | if (!m_inst) 25 | m_inst = new Platform(); 26 | return m_inst; 27 | } 28 | 29 | WebThread* Platform::currentThread() 30 | { 31 | if (!m_thread) { 32 | m_thread = new WebThreadImpl("MainThread"); 33 | m_mainThread = m_thread; 34 | } 35 | return m_thread; 36 | } 37 | 38 | WebThread* Platform::mainThread() const 39 | { 40 | return m_mainThread; 41 | } 42 | 43 | } -------------------------------------------------------------------------------- /platform/Platform.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | #ifndef Platform_h 4 | #define Platform_h 5 | 6 | namespace blink { 7 | 8 | class WebThread; 9 | 10 | class Platform { 11 | public: 12 | void shutdown(); 13 | static Platform* current(); 14 | 15 | WebThread* currentThread(); 16 | WebThread* mainThread() const; 17 | 18 | private: 19 | Platform(); 20 | 21 | static Platform* m_inst; 22 | WebThread* m_mainThread; 23 | WebThread* m_thread; 24 | }; 25 | 26 | } 27 | 28 | #endif Platform_h -------------------------------------------------------------------------------- /platform/ScriptForbiddenScope.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include "config.h" 6 | #include "platform/ScriptForbiddenScope.h" 7 | 8 | #include "wtf/Assertions.h" 9 | #include "wtf/MainThread.h" 10 | 11 | namespace blink { 12 | 13 | static unsigned s_scriptForbiddenCount = 0; 14 | 15 | ScriptForbiddenScope::ScriptForbiddenScope() 16 | { 17 | ASSERT(isMainThread()); 18 | ++s_scriptForbiddenCount; 19 | } 20 | 21 | ScriptForbiddenScope::~ScriptForbiddenScope() 22 | { 23 | ASSERT(isMainThread()); 24 | ASSERT(s_scriptForbiddenCount); 25 | --s_scriptForbiddenCount; 26 | } 27 | 28 | void ScriptForbiddenScope::enter() 29 | { 30 | ASSERT(isMainThread()); 31 | ++s_scriptForbiddenCount; 32 | } 33 | 34 | void ScriptForbiddenScope::exit() 35 | { 36 | ASSERT(isMainThread()); 37 | ASSERT(s_scriptForbiddenCount); 38 | --s_scriptForbiddenCount; 39 | } 40 | 41 | bool ScriptForbiddenScope::isScriptForbidden() 42 | { 43 | return isMainThread() && s_scriptForbiddenCount; 44 | } 45 | 46 | ScriptForbiddenScope::AllowUserAgentScript::AllowUserAgentScript() 47 | : m_change(s_scriptForbiddenCount, 0) 48 | { 49 | } 50 | 51 | ScriptForbiddenScope::AllowUserAgentScript::~AllowUserAgentScript() 52 | { 53 | ASSERT(!s_scriptForbiddenCount); 54 | } 55 | 56 | } // namespace blink 57 | -------------------------------------------------------------------------------- /platform/ScriptForbiddenScope.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef ScriptForbiddenScope_h 6 | #define ScriptForbiddenScope_h 7 | 8 | #include "platform/PlatformExport.h" 9 | #include "wtf/Assertions.h" 10 | #include "wtf/TemporaryChange.h" 11 | 12 | namespace blink { 13 | 14 | class PLATFORM_EXPORT ScriptForbiddenScope { 15 | public: 16 | ScriptForbiddenScope(); 17 | ~ScriptForbiddenScope(); 18 | 19 | class PLATFORM_EXPORT AllowUserAgentScript { 20 | public: 21 | AllowUserAgentScript(); 22 | ~AllowUserAgentScript(); 23 | private: 24 | TemporaryChange m_change; 25 | }; 26 | 27 | static void enter(); 28 | static void exit(); 29 | static bool isScriptForbidden(); 30 | }; 31 | 32 | } // namespace blink 33 | 34 | #endif // ScriptForbiddenScope_h 35 | -------------------------------------------------------------------------------- /platform/asm/SaveRegisters_x86.cpp: -------------------------------------------------------------------------------- 1 | #include "config.h" 2 | #include "platform/heap/SafePoint.h" 3 | 4 | extern "C" __declspec(naked) void pushAllRegisters(void*, void*, void*) 5 | { 6 | // Push all callee - saves registers to get them 7 | // on the stack for conservative stack scanning. 8 | // We maintain 16 - byte alignment at calls(required on 9 | // Mac).There is a 4 - byte return address on the stack 10 | // and we push 28 bytes which maintains 16 - byte alignment 11 | //; at the call. 12 | __asm { 13 | push ebx; 14 | push ebp; 15 | push esi; 16 | push edi; 17 | ;; Pass the two first arguments unchanged and the 18 | ;; stack pointer after pushing callee - save registers 19 | ;; to the callback. 20 | mov ecx, [esp + 28]; 21 | push esp; 22 | push [esp + 28]; 23 | push [esp + 28]; 24 | call ecx; 25 | ;; Pop arguments and the callee - saved registers. 26 | ;; None of the callee - saved registers were modified 27 | ;; so we do not need to restore them. 28 | add esp, 28; 29 | ret; 30 | } 31 | 32 | } -------------------------------------------------------------------------------- /platform/heap/BUILD.gn: -------------------------------------------------------------------------------- 1 | # Copyright 2014 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | source_set("heap") { 6 | # This target is a logical part of the platform and only the platform target 7 | # should depend on it. 8 | visibility = [ "//third_party/WebKit/Source/platform" ] 9 | 10 | sources = [ 11 | "BlinkGCMemoryDumpProvider.cpp", 12 | "BlinkGCMemoryDumpProvider.h", 13 | "CallbackStack.cpp", 14 | "CallbackStack.h", 15 | "GCInfo.cpp", 16 | "GCInfo.h", 17 | "GarbageCollected.h", 18 | "Handle.h", 19 | "Heap.cpp", 20 | "Heap.h", 21 | "HeapAllocator.cpp", 22 | "HeapAllocator.h", 23 | "InlinedGlobalMarkingVisitor.h", 24 | "MarkingVisitor.h", 25 | "MarkingVisitorImpl.h", 26 | "PageMemory.h", 27 | "PagePool.cpp", 28 | "PagePool.h", 29 | "PersistentNode.cpp", 30 | "PersistentNode.h", 31 | "StackFrameDepth.cpp", 32 | "StackFrameDepth.h", 33 | "SafePoint.cpp", 34 | "SafePoint.h", 35 | "ThreadState.cpp", 36 | "ThreadState.h", 37 | "ThreadingTraits.h", 38 | "TraceTraits.h", 39 | "Visitor.h", 40 | ] 41 | 42 | defines = [ "BLINK_PLATFORM_IMPLEMENTATION=1" ] 43 | 44 | configs += [ 45 | "//third_party/WebKit/Source:config", 46 | "//third_party/WebKit/Source:inside_blink", 47 | "//build/config/compiler:no_size_t_to_int_warning", 48 | ] 49 | 50 | deps = [ 51 | "//third_party/WebKit/Source/platform/heap/asm", 52 | "//third_party/icu", 53 | ] 54 | } 55 | -------------------------------------------------------------------------------- /platform/heap/BlinkGCMemoryDumpProvider.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef BlinkGCMemoryDumpProvider_h 6 | #define BlinkGCMemoryDumpProvider_h 7 | 8 | #include "platform/PlatformExport.h" 9 | #include "public/platform/WebMemoryDumpProvider.h" 10 | #include "wtf/OwnPtr.h" 11 | #include "wtf/text/WTFString.h" 12 | 13 | namespace blink { 14 | class WebMemoryAllocatorDump; 15 | 16 | class PLATFORM_EXPORT BlinkGCMemoryDumpProvider final : public WebMemoryDumpProvider { 17 | public: 18 | static BlinkGCMemoryDumpProvider* instance(); 19 | ~BlinkGCMemoryDumpProvider() override; 20 | 21 | // WebMemoryDumpProvider implementation. 22 | bool onMemoryDump(WebProcessMemoryDump*) override; 23 | 24 | // The returned WebMemoryAllocatorDump is owned by 25 | // BlinkGCMemoryDumpProvider, and should not be retained (just used to 26 | // dump in the current call stack). 27 | WebMemoryAllocatorDump* createMemoryAllocatorDumpForCurrentGC(const String& absoluteName); 28 | 29 | // This must be called before taking a new process-wide GC snapshot, to 30 | // clear the previous dumps. 31 | void clearProcessDumpForCurrentGC(); 32 | 33 | WebProcessMemoryDump* currentProcessMemoryDump();/* { return m_currentProcessMemoryDump.get(); }*/ 34 | 35 | private: 36 | BlinkGCMemoryDumpProvider(); 37 | 38 | OwnPtr m_currentProcessMemoryDump; 39 | }; 40 | 41 | } // namespace blink 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /platform/heap/BlinkGCMemoryDumpProviderTest.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include "config.h" 6 | #include "platform/heap/BlinkGCMemoryDumpProvider.h" 7 | 8 | #include "public/platform/Platform.h" 9 | #include "public/platform/WebProcessMemoryDump.h" 10 | #include "wtf/Threading.h" 11 | 12 | #include 13 | 14 | namespace blink { 15 | 16 | TEST(BlinkGCDumpProviderTest, MemoryDump) 17 | { 18 | WebProcessMemoryDump* dump = Platform::current()->createProcessMemoryDump(); 19 | ASSERT(dump); 20 | BlinkGCMemoryDumpProvider::instance()->onMemoryDump(dump); 21 | ASSERT(dump->getMemoryAllocatorDump(String::format("blink_gc/thread_%lu", static_cast(WTF::currentThread())))); 22 | ASSERT(dump->getMemoryAllocatorDump(String::format("blink_gc/thread_%lu/allocated_objects", static_cast(WTF::currentThread())))); 23 | } 24 | 25 | } // namespace blink 26 | -------------------------------------------------------------------------------- /platform/heap/BlinkHeapUnitTests.isolate: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2013 Google Inc. All rights reserved. 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions are 6 | # met: 7 | # 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # * Redistributions in binary form must reproduce the above 11 | # copyright notice, this list of conditions and the following disclaimer 12 | # in the documentation and/or other materials provided with the 13 | # distribution. 14 | # * Neither the name of Google Inc. nor the names of its 15 | # contributors may be used to endorse or promote products derived from 16 | # this software without specific prior written permission. 17 | # 18 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | # 30 | 31 | { 32 | 'conditions': [ 33 | ['OS=="android"', { 34 | 'variables': { 35 | 'files': [ 36 | ], 37 | }, 38 | }], 39 | ], 40 | } 41 | -------------------------------------------------------------------------------- /platform/heap/DEPS: -------------------------------------------------------------------------------- 1 | include_rules = [ 2 | "+heap", 3 | ] 4 | -------------------------------------------------------------------------------- /platform/heap/HeapTerminatedArrayBuilder.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef HeapTerminatedArrayBuilder_h 6 | #define HeapTerminatedArrayBuilder_h 7 | 8 | #include "platform/heap/Heap.h" 9 | #include "platform/heap/HeapTerminatedArray.h" 10 | #include "wtf/TerminatedArrayBuilder.h" 11 | 12 | namespace blink { 13 | 14 | template 15 | class HeapTerminatedArrayBuilder : public TerminatedArrayBuilder { 16 | public: 17 | explicit HeapTerminatedArrayBuilder(HeapTerminatedArray* array) : TerminatedArrayBuilder(array) { } 18 | }; 19 | 20 | } // namespace blink 21 | 22 | #endif // HeapTerminatedArrayBuilder_h 23 | -------------------------------------------------------------------------------- /platform/heap/OWNERS: -------------------------------------------------------------------------------- 1 | ager@chromium.org 2 | erik.corry@gmail.com 3 | haraken@chromium.org 4 | kouhei@chromium.org 5 | sigbjornf@opera.com 6 | vegorov@chromium.org 7 | wibling@chromium.org 8 | zerny@chromium.org 9 | -------------------------------------------------------------------------------- /platform/heap/asm/BUILD.gn: -------------------------------------------------------------------------------- 1 | # Copyright 2014 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | if (current_cpu == "x86" || current_cpu == "x64") { 6 | import("//third_party/yasm/yasm_assemble.gni") 7 | 8 | yasm_assemble("asm") { 9 | assert(current_cpu == "x86" || current_cpu == "x64") 10 | 11 | sources = [ "SaveRegisters_x86.asm" ] 12 | 13 | yasm_flags = [] 14 | if (is_mac) { 15 | # Necessary to ensure symbols end up with a _ prefix; added by 16 | # yasm_compile.gypi for Windows, but not Mac. 17 | yasm_flags += [ "-DPREFIX" ] 18 | } 19 | if (current_cpu == "x64") { 20 | if (is_win) { 21 | yasm_flags += [ "-DX64WIN=1" ] 22 | } else { 23 | yasm_flags += [ "-DX64POSIX=1" ] 24 | } 25 | } else { # current_cpu == "x86" 26 | yasm_flags += [ "-DIA32=1" ] 27 | } 28 | } 29 | 30 | } else { # current_cpu == "x86" || current_cpu == "x64" 31 | 32 | source_set("asm") { 33 | if (current_cpu == "arm") { 34 | sources = [ "SaveRegisters_arm.S" ] 35 | } else if (current_cpu == "arm64") { 36 | sources = [ "SaveRegisters_arm64.S" ] 37 | } else if (current_cpu == "mipsel") { 38 | sources = [ "SaveRegisters_mips.S" ] 39 | } 40 | 41 | if (current_cpu == "arm") { 42 | defines = [ "ARM=1" ] 43 | } 44 | } 45 | 46 | } # current_cpu == "x86" || current_cpu == "x64" 47 | 48 | 49 | -------------------------------------------------------------------------------- /platform/heap/asm/SaveRegisters_mips64.S: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | /* 6 | * typedef void (*PushAllRegistersCallback)(SafePointBarrier*, ThreadState*, intptr_t*); 7 | * extern "C" void pushAllRegisters(SafePointBarrier*, ThreadState*, PushAllRegistersCallback) 8 | */ 9 | 10 | .type pushAllRegisters, %function 11 | .global pushAllRegisters 12 | .hidden pushAllRegisters 13 | pushAllRegisters: 14 | // Push all callee-saves registers to get them 15 | // on the stack for conservative stack scanning. 16 | // Reserve space for callee-saved registers and return address. 17 | daddiu $sp,$sp,-80 18 | // Save the callee-saved registers and the return address. 19 | sd $s0,0($sp) 20 | sd $s1,8($sp) 21 | sd $s2,16($sp) 22 | sd $s3,24($sp) 23 | sd $s4,32($sp) 24 | sd $s5,40($sp) 25 | sd $s6,48($sp) 26 | sd $s7,56($sp) 27 | sd $ra,64($sp) 28 | // Note: the callee-saved floating point registers do not need to be 29 | // copied to the stack, because fp registers never hold heap pointers 30 | // and so do not need to be kept visible to the garbage collector. 31 | // Pass the two first arguments untouched in a0 and a1 and the 32 | // stack pointer to the callback. 33 | move $t9,$a2 34 | move $a2,$sp 35 | jalr $t9 36 | // Restore return address, adjust stack and return. 37 | // Note: the copied registers do not need to be reloaded here, 38 | // because they were preserved by the called routine. 39 | ld $ra,64($sp) 40 | daddiu $sp,$sp,80 41 | jr $ra 42 | -------------------------------------------------------------------------------- /platform/heap/asm/SaveRegisters_x86.cpp: -------------------------------------------------------------------------------- 1 | #include "config.h" 2 | #include "third_party/WebKit/Source/platform/heap/SafePoint.h" 3 | 4 | extern "C" __declspec(naked) void pushAllRegisters(void*, void*, void*) 5 | { 6 | // Push all callee - saves registers to get them 7 | // on the stack for conservative stack scanning. 8 | // We maintain 16 - byte alignment at calls(required on 9 | // Mac).There is a 4 - byte return address on the stack 10 | // and we push 28 bytes which maintains 16 - byte alignment 11 | //; at the call. 12 | __asm { 13 | push ebx; 14 | push ebp; 15 | push esi; 16 | push edi; 17 | ;; Pass the two first arguments unchanged and the 18 | ;; stack pointer after pushing callee - save registers 19 | ;; to the callback. 20 | mov ecx, [esp + 28]; 21 | push esp; 22 | push [esp + 28]; 23 | push [esp + 28]; 24 | call ecx; 25 | ;; Pop arguments and the callee - saved registers. 26 | ;; None of the callee - saved registers were modified 27 | ;; so we do not need to restore them. 28 | add esp, 28; 29 | ret; 30 | } 31 | 32 | } -------------------------------------------------------------------------------- /platform/heap/glue/DEPS: -------------------------------------------------------------------------------- 1 | include_rules = [ 2 | "+heap", 3 | "+public/platform", 4 | ] 5 | -------------------------------------------------------------------------------- /public/platform/DEPS: -------------------------------------------------------------------------------- 1 | include_rules = [ 2 | "-bindings", 3 | "-core", 4 | "-modules", 5 | "+platform", 6 | "+platform/weborigin", 7 | "-public/web", 8 | "+third_party/skia", 9 | "-web", 10 | ] 11 | -------------------------------------------------------------------------------- /public/platform/PlatformNone.cpp: -------------------------------------------------------------------------------- 1 | #include "config.h" 2 | #include "Platform.h" 3 | 4 | namespace blink { 5 | 6 | // Platform* Platform::current() 7 | // { 8 | // return nullptr; 9 | // } 10 | 11 | } // namespace blink -------------------------------------------------------------------------------- /public/platform/WebAudioSourceProviderClient.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011, Google Inc. All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 1. Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * 2. Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * 13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY 14 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 15 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 16 | * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY 17 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 18 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 19 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 20 | * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 22 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 | */ 24 | 25 | #ifndef WebAudioSourceProviderClient_h 26 | #define WebAudioSourceProviderClient_h 27 | 28 | namespace blink { 29 | 30 | class WebAudioSourceProviderClient { 31 | public: 32 | virtual void setFormat(size_t numberOfChannels, float sampleRate) = 0; 33 | protected: 34 | virtual ~WebAudioSourceProviderClient() { } 35 | }; 36 | 37 | } // namespace blink 38 | 39 | #endif // WebAudioSourceProviderClient_h 40 | -------------------------------------------------------------------------------- /public/platform/WebBatteryStatus.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebBatteryStatus_h 6 | #define WebBatteryStatus_h 7 | 8 | #include 9 | 10 | namespace blink { 11 | 12 | class WebBatteryStatus { 13 | public: 14 | WebBatteryStatus() 15 | : charging(true) 16 | , chargingTime(0.0) 17 | , dischargingTime(std::numeric_limits::infinity()) 18 | , level(1.0) 19 | { 20 | } 21 | 22 | bool charging; 23 | double chargingTime; 24 | double dischargingTime; 25 | double level; 26 | }; 27 | 28 | } // namespace blink 29 | 30 | #endif // WebBatteryStatus_h 31 | -------------------------------------------------------------------------------- /public/platform/WebBatteryStatusListener.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebBatteryStatusListener_h 6 | #define WebBatteryStatusListener_h 7 | 8 | #include "WebBatteryStatus.h" 9 | #include "WebPlatformEventListener.h" 10 | 11 | namespace blink { 12 | 13 | class WebBatteryStatus; 14 | 15 | class WebBatteryStatusListener : public WebPlatformEventListener { 16 | public: 17 | // This method is called when a new battery status is available. 18 | virtual void updateBatteryStatus(const WebBatteryStatus&) = 0; 19 | 20 | virtual ~WebBatteryStatusListener() { } 21 | }; 22 | 23 | } // namespace blink 24 | 25 | #endif // WebBatteryStatusListener_h 26 | -------------------------------------------------------------------------------- /public/platform/WebCanvas.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009 Google Inc. All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are 6 | * met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above 11 | * copyright notice, this list of conditions and the following disclaimer 12 | * in the documentation and/or other materials provided with the 13 | * distribution. 14 | * * Neither the name of Google Inc. nor the names of its 15 | * contributors may be used to endorse or promote products derived from 16 | * this software without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #ifndef WebCanvas_h 32 | #define WebCanvas_h 33 | 34 | #include "WebCommon.h" 35 | 36 | class SkCanvas; 37 | 38 | namespace blink { 39 | 40 | typedef SkCanvas WebCanvas; 41 | 42 | } // namespace blink 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /public/platform/WebCircularGeofencingRegion.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebCircularGeofencingRegion_h 6 | #define WebCircularGeofencingRegion_h 7 | 8 | #include "WebCommon.h" 9 | #include "WebString.h" 10 | 11 | namespace blink { 12 | 13 | struct WebCircularGeofencingRegion { 14 | double latitude; 15 | double longitude; 16 | double radius; 17 | 18 | WebCircularGeofencingRegion() 19 | : latitude(0) 20 | , longitude(0) 21 | , radius(0) 22 | { 23 | } 24 | }; 25 | 26 | } // namespace blink 27 | 28 | #endif // WebCircularGeofencingRegion_h 29 | -------------------------------------------------------------------------------- /public/platform/WebColor.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009 Google Inc. All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are 6 | * met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above 11 | * copyright notice, this list of conditions and the following disclaimer 12 | * in the documentation and/or other materials provided with the 13 | * distribution. 14 | * * Neither the name of Google Inc. nor the names of its 15 | * contributors may be used to endorse or promote products derived from 16 | * this software without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #ifndef WebColor_h 32 | #define WebColor_h 33 | 34 | namespace blink { 35 | 36 | typedef unsigned WebColor; // RGBA quad. Equivalent to SkColor. 37 | 38 | } // namespace blink 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /public/platform/WebCompositeAndReadbackAsyncCallback.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 Google Inc. All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 1. Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * 2. Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * 13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY 14 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR 17 | * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 20 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 21 | * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | #ifndef WebCompositeAndReadbackAsyncCallback_h 27 | #define WebCompositeAndReadbackAsyncCallback_h 28 | 29 | class SkBitmap; 30 | 31 | namespace blink { 32 | 33 | class WebCompositeAndReadbackAsyncCallback { 34 | public: 35 | virtual void didCompositeAndReadback(const SkBitmap&) = 0; 36 | }; 37 | 38 | } // namespace blink 39 | 40 | #endif // WebCompositeAndReadbackAsyncCallback_h 41 | -------------------------------------------------------------------------------- /public/platform/WebCompositorAnimationCurve.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebCompositorAnimationCurve_h 6 | #define WebCompositorAnimationCurve_h 7 | 8 | namespace blink { 9 | 10 | class WebCompositorAnimationCurve { 11 | public: 12 | virtual ~WebCompositorAnimationCurve() { } 13 | 14 | enum TimingFunctionType { 15 | TimingFunctionTypeEase, 16 | TimingFunctionTypeEaseIn, 17 | TimingFunctionTypeEaseOut, 18 | TimingFunctionTypeEaseInOut, 19 | TimingFunctionTypeLinear 20 | }; 21 | 22 | enum AnimationCurveType { 23 | AnimationCurveTypeFilter, 24 | AnimationCurveTypeFloat, 25 | AnimationCurveTypeScrollOffset, 26 | AnimationCurveTypeTransform, 27 | }; 28 | 29 | virtual AnimationCurveType type() const = 0; 30 | }; 31 | 32 | } // namespace blink 33 | 34 | #endif // WebCompositorAnimationCurve_h 35 | -------------------------------------------------------------------------------- /public/platform/WebCompositorAnimationDelegate.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebCompositorAnimationDelegate_h 6 | #define WebCompositorAnimationDelegate_h 7 | 8 | #include "WebCommon.h" 9 | #include "WebCompositorAnimation.h" 10 | 11 | #define WEB_COMPOSITOR_ANIMATION_DELEGATE_TAKES_GROUP 1 12 | 13 | namespace blink { 14 | 15 | class BLINK_PLATFORM_EXPORT WebCompositorAnimationDelegate { 16 | public: 17 | virtual ~WebCompositorAnimationDelegate() { } 18 | 19 | virtual void notifyAnimationStarted(double monotonicTime, int group) = 0; 20 | virtual void notifyAnimationFinished(double monotonicTime, int group) = 0; 21 | }; 22 | 23 | } // namespace blink 24 | 25 | #endif // WebCompositorAnimationDelegate_h 26 | -------------------------------------------------------------------------------- /public/platform/WebCompositorAnimationPlayer.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebCompositorAnimationPlayer_h 6 | #define WebCompositorAnimationPlayer_h 7 | 8 | namespace blink { 9 | 10 | class WebCompositorAnimation; 11 | class WebCompositorAnimationDelegate; 12 | class WebLayer; 13 | 14 | // A compositor representation for AnimationPlayer. 15 | class WebCompositorAnimationPlayer { 16 | public: 17 | virtual ~WebCompositorAnimationPlayer() { } 18 | 19 | // An animation delegate is notified when animations are started and 20 | // stopped. The WebCompositorAnimationPlayer does not take ownership of the delegate, and it is 21 | // the responsibility of the client to reset the layer's delegate before 22 | // deleting the delegate. 23 | virtual void setAnimationDelegate(WebCompositorAnimationDelegate*) = 0; 24 | 25 | virtual void attachLayer(WebLayer*) = 0; 26 | virtual void detachLayer() = 0; 27 | virtual bool isLayerAttached() const = 0; 28 | 29 | virtual void addAnimation(WebCompositorAnimation*) = 0; 30 | virtual void removeAnimation(int animationId) = 0; 31 | virtual void pauseAnimation(int animationId, double timeOffset) = 0; 32 | }; 33 | 34 | } // namespace blink 35 | 36 | #endif // WebCompositorAnimationPlayer_h 37 | -------------------------------------------------------------------------------- /public/platform/WebCompositorAnimationPlayerClient.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebCompositorAnimationPlayerClient_h 6 | #define WebCompositorAnimationPlayerClient_h 7 | 8 | #include "public/platform/WebCommon.h" 9 | 10 | namespace blink { 11 | 12 | class WebCompositorAnimationPlayer; 13 | 14 | // A client for compositor representation of AnimationPlayer. 15 | class BLINK_PLATFORM_EXPORT WebCompositorAnimationPlayerClient { 16 | public: 17 | virtual ~WebCompositorAnimationPlayerClient() { } 18 | 19 | virtual WebCompositorAnimationPlayer* compositorPlayer() const = 0; 20 | }; 21 | 22 | } // namespace blink 23 | 24 | #endif // WebCompositorAnimationPlayerClient_h 25 | -------------------------------------------------------------------------------- /public/platform/WebCompositorAnimationTimeline.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebCompositorAnimationTimeline_h 6 | #define WebCompositorAnimationTimeline_h 7 | 8 | namespace blink { 9 | 10 | class WebCompositorAnimationPlayerClient; 11 | 12 | // A compositor representation for timeline. 13 | class WebCompositorAnimationTimeline { 14 | public: 15 | virtual ~WebCompositorAnimationTimeline() { } 16 | 17 | virtual void playerAttached(const WebCompositorAnimationPlayerClient&) { } 18 | virtual void playerDestroyed(const WebCompositorAnimationPlayerClient&) { } 19 | }; 20 | 21 | } // namespace blink 22 | 23 | #endif // WebCompositorAnimationTimeline_h 24 | -------------------------------------------------------------------------------- /public/platform/WebCompositorOutputSurface.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012 Google Inc. All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY 15 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY 18 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | #ifndef WebCompositorOutputSurface_h 27 | #define WebCompositorOutputSurface_h 28 | 29 | namespace blink { 30 | 31 | // An empty base class for cc::OutputSurface in chromium. 32 | class WebCompositorOutputSurface { }; 33 | 34 | } 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /public/platform/WebContentDecryptionModuleAccess.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebContentDecryptionModuleAccess_h 6 | #define WebContentDecryptionModuleAccess_h 7 | 8 | #include "WebCommon.h" 9 | 10 | namespace blink { 11 | 12 | class WebContentDecryptionModuleResult; 13 | struct WebMediaKeySystemConfiguration; 14 | 15 | class BLINK_PLATFORM_EXPORT WebContentDecryptionModuleAccess { 16 | public: 17 | virtual ~WebContentDecryptionModuleAccess(); 18 | virtual void createContentDecryptionModule(WebContentDecryptionModuleResult) = 0; 19 | virtual WebMediaKeySystemConfiguration getConfiguration() = 0; 20 | }; 21 | 22 | } // namespace blink 23 | 24 | #endif // WebContentDecryptionModuleAccess_h 25 | -------------------------------------------------------------------------------- /public/platform/WebContentDecryptionModuleException.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebContentDecryptionModuleException_h 6 | #define WebContentDecryptionModuleException_h 7 | 8 | namespace blink { 9 | 10 | enum WebContentDecryptionModuleException { 11 | WebContentDecryptionModuleExceptionNotSupportedError, 12 | WebContentDecryptionModuleExceptionInvalidStateError, 13 | WebContentDecryptionModuleExceptionInvalidAccessError, 14 | WebContentDecryptionModuleExceptionQuotaExceededError, 15 | WebContentDecryptionModuleExceptionUnknownError, 16 | WebContentDecryptionModuleExceptionClientError, 17 | WebContentDecryptionModuleExceptionOutputError, 18 | }; 19 | 20 | } // namespace blink 21 | 22 | #endif // WebContentDecryptionModuleException_h 23 | -------------------------------------------------------------------------------- /public/platform/WebContentSettingCallbacks.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebContentSettingCallbacks_h 6 | #define WebContentSettingCallbacks_h 7 | 8 | #include "WebPrivatePtr.h" 9 | 10 | namespace WTF { template class PassOwnPtr; } 11 | 12 | namespace blink { 13 | 14 | class ContentSettingCallbacks; 15 | class WebContentSettingCallbacksPrivate; 16 | 17 | class WebContentSettingCallbacks { 18 | public: 19 | ~WebContentSettingCallbacks() { reset(); } 20 | WebContentSettingCallbacks() { } 21 | WebContentSettingCallbacks(const WebContentSettingCallbacks& c) { assign(c); } 22 | WebContentSettingCallbacks& operator=(const WebContentSettingCallbacks& c) 23 | { 24 | assign(c); 25 | return *this; 26 | } 27 | 28 | BLINK_PLATFORM_EXPORT void reset(); 29 | BLINK_PLATFORM_EXPORT void assign(const WebContentSettingCallbacks&); 30 | 31 | #if INSIDE_BLINK 32 | BLINK_PLATFORM_EXPORT WebContentSettingCallbacks(const WTF::PassOwnPtr&); 33 | #endif 34 | 35 | BLINK_PLATFORM_EXPORT void doAllow(); 36 | BLINK_PLATFORM_EXPORT void doDeny(); 37 | 38 | private: 39 | WebPrivatePtr m_private; 40 | }; 41 | 42 | } // namespace blink 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /public/platform/WebConvertableToTraceFormat.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebConvertableToTraceFormat_h 6 | #define WebConvertableToTraceFormat_h 7 | 8 | #include "WebPrivatePtr.h" 9 | #include "WebString.h" 10 | 11 | namespace blink { 12 | 13 | namespace TraceEvent { 14 | class ConvertableToTraceFormat; 15 | } 16 | 17 | class WebConvertableToTraceFormat { 18 | public: 19 | WebConvertableToTraceFormat() { } 20 | #if INSIDE_BLINK 21 | WebConvertableToTraceFormat(PassRefPtr); 22 | #endif 23 | ~WebConvertableToTraceFormat() { reset(); } 24 | 25 | BLINK_PLATFORM_EXPORT WebString asTraceFormat() const; 26 | BLINK_PLATFORM_EXPORT void assign(const WebConvertableToTraceFormat&); 27 | BLINK_PLATFORM_EXPORT void moveFrom(WebConvertableToTraceFormat&); 28 | BLINK_PLATFORM_EXPORT void reset(); 29 | 30 | WebConvertableToTraceFormat(const WebConvertableToTraceFormat& r) { assign(r); } 31 | WebConvertableToTraceFormat& operator=(const WebConvertableToTraceFormat& r) 32 | { 33 | assign(r); 34 | return *this; 35 | } 36 | 37 | private: 38 | WebPrivatePtr m_private; 39 | }; 40 | 41 | } // namespace blink 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /public/platform/WebCredentialManagerClient.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebCredentialManagerClient_h 6 | #define WebCredentialManagerClient_h 7 | 8 | #include "public/platform/WebCallbacks.h" 9 | #include "public/platform/WebCredentialManagerError.h" 10 | #include "public/platform/WebVector.h" 11 | 12 | namespace blink { 13 | 14 | class WebCredential; 15 | class WebURL; 16 | 17 | // WebCredentialManagerClient is an interface which allows an embedder to 18 | // implement 'navigator.credential.*' calls which are defined in the 19 | // 'credentialmanager' module. 20 | class WebCredentialManagerClient { 21 | public: 22 | typedef WebCallbacks RequestCallbacks; 23 | typedef WebCallbacks NotificationCallbacks; 24 | 25 | // Ownership of the callback is transferred to the callee for each of 26 | // the following methods. 27 | virtual void dispatchFailedSignIn(const WebCredential&, NotificationCallbacks*) { } 28 | virtual void dispatchSignedIn(const WebCredential&, NotificationCallbacks*) { } 29 | virtual void dispatchRequireUserMediation(NotificationCallbacks*) { } 30 | virtual void dispatchRequest(bool zeroClickOnly, const WebVector& federations, RequestCallbacks*) { } 31 | }; 32 | 33 | } // namespace blink 34 | 35 | #endif // WebCredentialManager_h 36 | -------------------------------------------------------------------------------- /public/platform/WebCredentialManagerError.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebCredentialManagerError_h 6 | #define WebCredentialManagerError_h 7 | 8 | namespace blink { 9 | 10 | struct WebCredentialManagerError { 11 | // FIXME: This is a placeholder list of error conditions. We'll likely expand the 12 | // list as the API evolves. 13 | enum ErrorType { 14 | ErrorTypeDisabled = 0, 15 | ErrorTypePendingRequest, 16 | ErrorTypePasswordStoreUnavailable, 17 | ErrorTypeUnknown, 18 | ErrorTypeLast = ErrorTypeUnknown 19 | }; 20 | 21 | // FIXME: We need this to be an object for the moment to make the WebCallbacks templates 22 | // happy. But, really, we probably just need the enum. We should fix that. 23 | explicit WebCredentialManagerError(ErrorType type) : errorType(type) { } 24 | 25 | ErrorType errorType; 26 | }; 27 | 28 | } // namespace blink 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /public/platform/WebCrossOriginServiceWorkerClient.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebCrossOriginServiceWorkerClient_h 6 | #define WebCrossOriginServiceWorkerClient_h 7 | 8 | #include "public/platform/WebMessagePortChannel.h" 9 | #include "public/platform/WebURL.h" 10 | 11 | namespace blink { 12 | 13 | struct WebCrossOriginServiceWorkerClient { 14 | WebURL targetURL; 15 | WebURL origin; 16 | int clientID; 17 | 18 | WebCrossOriginServiceWorkerClient() 19 | : clientID(-1) 20 | { 21 | } 22 | }; 23 | 24 | } // namespace blink 25 | 26 | #endif // WebCrossOriginServiceWorkerClient_h 27 | -------------------------------------------------------------------------------- /public/platform/WebDeviceLightListener.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebDeviceLightListener_h 6 | #define WebDeviceLightListener_h 7 | 8 | #include "WebPlatformEventListener.h" 9 | 10 | namespace blink { 11 | 12 | class WebDeviceLightListener : public WebPlatformEventListener { 13 | public: 14 | // This method is called every time new device light data is available. 15 | virtual void didChangeDeviceLight(double) = 0; 16 | 17 | virtual ~WebDeviceLightListener() { } 18 | }; 19 | 20 | } // namespace blink 21 | 22 | #endif // WebDeviceLightListener_h 23 | -------------------------------------------------------------------------------- /public/platform/WebDisplayMode.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebDisplayMode_h 6 | #define WebDisplayMode_h 7 | 8 | namespace blink { 9 | 10 | enum WebDisplayMode { 11 | WebDisplayModeUndefined, // User for override setting (ie. not set). 12 | WebDisplayModeBrowser, 13 | WebDisplayModeMinimalUi, 14 | WebDisplayModeStandalone, 15 | WebDisplayModeFullscreen, 16 | WebDisplayModeLast = WebDisplayModeFullscreen 17 | }; 18 | 19 | } // namespace blink 20 | 21 | #endif // WebDisplayMode_h 22 | -------------------------------------------------------------------------------- /public/platform/WebEncryptedMediaClient.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebEncryptedMediaClient_h 6 | #define WebEncryptedMediaClient_h 7 | 8 | #include "WebCommon.h" 9 | 10 | namespace blink { 11 | 12 | class WebEncryptedMediaRequest; 13 | 14 | class BLINK_PLATFORM_EXPORT WebEncryptedMediaClient { 15 | public: 16 | virtual ~WebEncryptedMediaClient(); 17 | virtual void requestMediaKeySystemAccess(WebEncryptedMediaRequest) = 0; 18 | }; 19 | 20 | } // namespace blink 21 | 22 | #endif // WebEncryptedMediaClient_h 23 | -------------------------------------------------------------------------------- /public/platform/WebEncryptedMediaKeyInformation.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebEncryptedMediaKeyInformation_h 6 | #define WebEncryptedMediaKeyInformation_h 7 | 8 | #include "WebCommon.h" 9 | #include "public/platform/WebData.h" 10 | 11 | namespace blink { 12 | 13 | class BLINK_PLATFORM_EXPORT WebEncryptedMediaKeyInformation { 14 | public: 15 | enum class KeyStatus { 16 | Usable, 17 | Expired, 18 | OutputDownscaled, 19 | OutputNotAllowed, 20 | StatusPending, 21 | InternalError 22 | }; 23 | 24 | WebEncryptedMediaKeyInformation(); 25 | ~WebEncryptedMediaKeyInformation(); 26 | 27 | WebData id() const; 28 | void setId(const WebData&); 29 | 30 | KeyStatus status() const; 31 | void setStatus(KeyStatus); 32 | 33 | uint32_t systemCode() const; 34 | void setSystemCode(uint32_t); 35 | 36 | private: 37 | WebData m_id; 38 | KeyStatus m_status; 39 | uint32_t m_systemCode; 40 | }; 41 | 42 | } // namespace blink 43 | 44 | #endif // WebEncryptedMediaKeyInformation_h 45 | -------------------------------------------------------------------------------- /public/platform/WebEncryptedMediaRequest.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebEncryptedMediaRequest_h 6 | #define WebEncryptedMediaRequest_h 7 | 8 | #include "public/platform/WebCommon.h" 9 | #include "public/platform/WebPrivatePtr.h" 10 | #include "public/platform/WebString.h" 11 | 12 | namespace blink { 13 | 14 | class EncryptedMediaRequest; 15 | class WebContentDecryptionModuleAccess; 16 | struct WebMediaKeySystemConfiguration; 17 | class WebSecurityOrigin; 18 | template class WebVector; 19 | 20 | class WebEncryptedMediaRequest { 21 | public: 22 | BLINK_PLATFORM_EXPORT WebEncryptedMediaRequest(const WebEncryptedMediaRequest&); 23 | BLINK_PLATFORM_EXPORT ~WebEncryptedMediaRequest(); 24 | 25 | BLINK_PLATFORM_EXPORT WebString keySystem() const; 26 | BLINK_PLATFORM_EXPORT const WebVector& supportedConfigurations() const; 27 | 28 | BLINK_PLATFORM_EXPORT WebSecurityOrigin securityOrigin() const; 29 | 30 | BLINK_PLATFORM_EXPORT void requestSucceeded(WebContentDecryptionModuleAccess*); 31 | BLINK_PLATFORM_EXPORT void requestNotSupported(const WebString& errorMessage); 32 | 33 | #if INSIDE_BLINK 34 | BLINK_PLATFORM_EXPORT explicit WebEncryptedMediaRequest(EncryptedMediaRequest*); 35 | #endif 36 | 37 | private: 38 | void assign(const WebEncryptedMediaRequest&); 39 | void reset(); 40 | 41 | WebPrivatePtr m_private; 42 | }; 43 | 44 | } // namespace blink 45 | 46 | #endif // WebEncryptedMediaRequest_h 47 | -------------------------------------------------------------------------------- /public/platform/WebEncryptedMediaTypes.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebEncryptedMediaTypes_h 6 | #define WebEncryptedMediaTypes_h 7 | 8 | namespace blink { 9 | 10 | // From https://w3c.github.io/encrypted-media/initdata-format-registry.html#registry 11 | enum class WebEncryptedMediaInitDataType { 12 | Unknown, 13 | Cenc, 14 | Keyids, 15 | Webm, 16 | }; 17 | 18 | // From https://w3c.github.io/encrypted-media/#idl-def-MediaKeySessionType 19 | enum class WebEncryptedMediaSessionType { 20 | Unknown, 21 | Temporary, 22 | PersistentLicense, 23 | PersistentReleaseMessage, 24 | }; 25 | 26 | } // namespace blink 27 | 28 | #endif // WebEncryptedMediaTypes_h 29 | -------------------------------------------------------------------------------- /public/platform/WebFederatedCredential.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebFederatedCredential_h 6 | #define WebFederatedCredential_h 7 | 8 | #include "public/platform/WebCommon.h" 9 | #include "public/platform/WebCredential.h" 10 | #include "public/platform/WebString.h" 11 | #include "public/platform/WebURL.h" 12 | 13 | namespace blink { 14 | 15 | class WebFederatedCredential : public WebCredential { 16 | public: 17 | BLINK_PLATFORM_EXPORT WebFederatedCredential(const WebString& id, const WebURL& federation, const WebString& name, const WebURL& iconURL); 18 | 19 | BLINK_PLATFORM_EXPORT void assign(const WebFederatedCredential&); 20 | BLINK_PLATFORM_EXPORT WebURL provider() const; 21 | 22 | // FIXME: Throw this away once it's unused on the Chromium side: https://crbug.com/494880 23 | BLINK_PLATFORM_EXPORT WebURL federation() const { return provider(); } 24 | 25 | #if INSIDE_BLINK 26 | BLINK_PLATFORM_EXPORT WebFederatedCredential(PlatformCredential*); 27 | BLINK_PLATFORM_EXPORT WebFederatedCredential& operator=(PlatformCredential*); 28 | #endif 29 | }; 30 | 31 | } // namespace blink 32 | 33 | #endif // WebFederatedCredential_h 34 | 35 | 36 | -------------------------------------------------------------------------------- /public/platform/WebFloatKeyframe.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012 Google Inc. All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 1. Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * 2. Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * 13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY 14 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 15 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 16 | * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY 17 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 18 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 19 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 20 | * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 22 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 | */ 24 | 25 | #ifndef WebFloatKeyframe_h 26 | #define WebFloatKeyframe_h 27 | 28 | namespace blink { 29 | 30 | struct WebFloatKeyframe { 31 | WebFloatKeyframe(double time, float value) 32 | : time(time) 33 | , value(value) 34 | { 35 | } 36 | 37 | double time; 38 | float value; 39 | }; 40 | 41 | } // namespace blink 42 | 43 | #endif // WebFloatKeyframe_h 44 | -------------------------------------------------------------------------------- /public/platform/WebFrameTimingEvent.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebFrameTimingEvent_h 6 | #define WebFrameTimingEvent_h 7 | 8 | namespace blink { 9 | 10 | // A struct to pass PerformanceRenderEvent or PerformanceCompositeEvent info 11 | // to Blink. 12 | struct WebFrameTimingEvent { 13 | WebFrameTimingEvent(unsigned sourceFrame, double startTime, double finishTime) 14 | : sourceFrame(sourceFrame) 15 | , startTime(startTime) 16 | , finishTime(finishTime) 17 | { 18 | } 19 | 20 | WebFrameTimingEvent(unsigned sourceFrame, double startTime) 21 | : sourceFrame(sourceFrame) 22 | , startTime(startTime) 23 | { 24 | } 25 | 26 | WebFrameTimingEvent() { } 27 | 28 | WebFrameTimingEvent& operator=(const WebFrameTimingEvent& rhs) 29 | { 30 | sourceFrame = rhs.sourceFrame; 31 | startTime = rhs.startTime; 32 | finishTime = rhs.finishTime; 33 | return *this; 34 | } 35 | unsigned sourceFrame; 36 | double startTime; 37 | double finishTime; 38 | }; 39 | 40 | } // namespace blink 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /public/platform/WebGamepadListener.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebGamepadListener_h 6 | #define WebGamepadListener_h 7 | 8 | #include "WebPlatformEventListener.h" 9 | 10 | namespace blink { 11 | 12 | class WebGamepad; 13 | 14 | class WebGamepadListener : public WebPlatformEventListener { 15 | public: 16 | virtual void didConnectGamepad(unsigned index, const WebGamepad&) = 0; 17 | virtual void didDisconnectGamepad(unsigned index, const WebGamepad&) = 0; 18 | 19 | protected: 20 | virtual ~WebGamepadListener() { } 21 | }; 22 | 23 | } // namespace blink 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /public/platform/WebGeofencingError.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebGeofencingError_h 6 | #define WebGeofencingError_h 7 | 8 | #include "WebString.h" 9 | 10 | namespace blink { 11 | 12 | struct WebGeofencingError { 13 | enum ErrorType { 14 | ErrorTypeAbort = 0, 15 | ErrorTypeUnknown, 16 | ErrorTypeLast = ErrorTypeUnknown 17 | }; 18 | 19 | WebGeofencingError(ErrorType errorType, const WebString& message) 20 | : errorType(errorType) 21 | , message(message) 22 | { 23 | } 24 | 25 | ErrorType errorType; 26 | WebString message; 27 | }; 28 | 29 | } // namespace blink 30 | 31 | #endif // WebGeofencingError_h 32 | -------------------------------------------------------------------------------- /public/platform/WebGeofencingEventType.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebGeofencingEventType_h 6 | #define WebGeofencingEventType_h 7 | 8 | namespace blink { 9 | 10 | enum WebGeofencingEventType { 11 | WebGeofencingEventTypeEnter, 12 | WebGeofencingEventTypeLeave, 13 | WebGeofencingEventTypeLast = WebGeofencingEventTypeLeave 14 | }; 15 | 16 | } // namespace blink 17 | 18 | #endif // WebGeofencingEventType_h 19 | -------------------------------------------------------------------------------- /public/platform/WebGeofencingProvider.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebGeofencingProvider_h 6 | #define WebGeofencingProvider_h 7 | 8 | #include "public/platform/WebCallbacks.h" 9 | #include "public/platform/WebVector.h" 10 | 11 | namespace blink { 12 | 13 | struct WebCircularGeofencingRegion; 14 | struct WebGeofencingError; 15 | struct WebGeofencingRegistration; 16 | class WebServiceWorkerRegistration; 17 | class WebString; 18 | 19 | typedef WebCallbacks WebGeofencingCallbacks; 20 | typedef WebCallbacks, WebGeofencingError> WebGeofencingRegionsCallbacks; 21 | 22 | class WebGeofencingProvider { 23 | public: 24 | virtual ~WebGeofencingProvider() { } 25 | 26 | // Registers a region. 27 | // Ownership of the WebGeofencingCallbacks is transferred to the client. 28 | virtual void registerRegion(const WebString& regionId, const WebCircularGeofencingRegion&, WebServiceWorkerRegistration*, WebGeofencingCallbacks*) { } 29 | 30 | // Unregisters a region. 31 | // Ownership of the WebGeofencingCallbacks is transferred to the client. 32 | virtual void unregisterRegion(const WebString& regionId, WebServiceWorkerRegistration*, WebGeofencingCallbacks*) { } 33 | 34 | // Returns all the currently registered regions. 35 | // Ownership of the WebGeofencingRegionsCallbacks is transferred to the client. 36 | virtual void getRegisteredRegions(WebServiceWorkerRegistration*, WebGeofencingRegionsCallbacks*) { } 37 | }; 38 | 39 | } // namespace blink 40 | 41 | #endif // WebGeofencingProvider_h 42 | -------------------------------------------------------------------------------- /public/platform/WebGeofencingRegistration.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebGeofencingRegistration_h 6 | #define WebGeofencingRegistration_h 7 | 8 | #include "WebCircularGeofencingRegion.h" 9 | #include "WebString.h" 10 | 11 | namespace blink { 12 | 13 | struct WebGeofencingRegistration { 14 | WebString id; 15 | WebCircularGeofencingRegion region; 16 | 17 | WebGeofencingRegistration() { } 18 | }; 19 | 20 | } // namespace blink 21 | 22 | #endif // WebGeofencingRegistration_h 23 | -------------------------------------------------------------------------------- /public/platform/WebGestureCurveTarget.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012 Google Inc. All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 1. Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * 2. Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * 13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY 14 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 15 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 16 | * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY 17 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 18 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 19 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 20 | * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 22 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 | */ 24 | 25 | #ifndef WebGestureCurveTarget_h 26 | #define WebGestureCurveTarget_h 27 | 28 | #include "WebFloatSize.h" 29 | #include "WebPoint.h" 30 | 31 | namespace blink { 32 | 33 | class WebGestureCurveTarget { 34 | public: 35 | virtual bool scrollBy(const WebFloatSize& delta, const WebFloatSize& velocity) = 0; 36 | 37 | protected: 38 | virtual ~WebGestureCurveTarget() { } 39 | }; 40 | 41 | } // namespace blink 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /public/platform/WebGestureDevice.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 Google Inc. All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY 15 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY 18 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | #ifndef WebGestureDevice_h 27 | #define WebGestureDevice_h 28 | 29 | namespace blink { 30 | 31 | enum WebGestureDevice { 32 | WebGestureDeviceTouchpad, 33 | WebGestureDeviceTouchscreen, 34 | }; 35 | 36 | } // namespace blink 37 | 38 | #endif // WebGestureDevice_h 39 | -------------------------------------------------------------------------------- /public/platform/WebLayerScrollClient.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012 Google Inc. All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 1. Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * 2. Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * 13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY 14 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 15 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 16 | * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY 17 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 18 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 19 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 20 | * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 22 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 | */ 24 | 25 | #ifndef WebLayerScrollClient_h 26 | #define WebLayerScrollClient_h 27 | 28 | #include "WebCommon.h" 29 | 30 | namespace blink { 31 | 32 | // A client that is notified of scrolling on a WebLayer. 33 | class BLINK_PLATFORM_EXPORT WebLayerScrollClient { 34 | public: 35 | virtual void didScroll() = 0; 36 | protected: 37 | virtual ~WebLayerScrollClient() { } 38 | }; 39 | 40 | } // namespace blink 41 | 42 | #endif // WebLayerScrollClient_h 43 | -------------------------------------------------------------------------------- /public/platform/WebLayoutAndPaintAsyncCallback.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebLayoutAndPaintAsyncCallback_h 6 | #define WebLayoutAndPaintAsyncCallback_h 7 | 8 | namespace blink { 9 | 10 | class WebLayoutAndPaintAsyncCallback { 11 | public: 12 | virtual void didLayoutAndPaint() = 0; 13 | }; 14 | 15 | } // namespace blink 16 | 17 | #endif // WebLayoutAndPaintAsyncCallback_h 18 | -------------------------------------------------------------------------------- /public/platform/WebMediaKeySystemConfiguration.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebMediaKeySystemConfiguration_h 6 | #define WebMediaKeySystemConfiguration_h 7 | 8 | #include "public/platform/WebEncryptedMediaTypes.h" 9 | #include "public/platform/WebMediaKeySystemMediaCapability.h" 10 | #include "public/platform/WebVector.h" 11 | 12 | namespace blink { 13 | 14 | struct WebMediaKeySystemConfiguration { 15 | enum class Requirement { 16 | Required, 17 | Optional, 18 | NotAllowed, 19 | }; 20 | 21 | // As MediaKeySystemConfiguration is a dictionary, some members may be 22 | // not-present. Because requestMediaKeySystemAccess() distinguishes empty 23 | // from not-present, we require a presence flag for each member. 24 | bool hasInitDataTypes = false; 25 | WebVector initDataTypes; 26 | 27 | bool hasAudioCapabilities = false; 28 | WebVector audioCapabilities; 29 | 30 | bool hasVideoCapabilities = false; 31 | WebVector videoCapabilities; 32 | 33 | // |distinctiveIdentifier| and |persistentState| are always present because 34 | // they have default values. 35 | Requirement distinctiveIdentifier = Requirement::Optional; 36 | Requirement persistentState = Requirement::Optional; 37 | 38 | bool hasSessionTypes = false; 39 | WebVector sessionTypes; 40 | 41 | // |label| may be not-present, but we use a null string to represent that. 42 | WebString label; 43 | }; 44 | 45 | } // namespace blink 46 | 47 | #endif // WebMediaKeySystemConfiguration_h 48 | -------------------------------------------------------------------------------- /public/platform/WebMediaKeySystemMediaCapability.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebMediaKeySystemMediaCapability_h 6 | #define WebMediaKeySystemMediaCapability_h 7 | 8 | #include "public/platform/WebString.h" 9 | 10 | namespace blink { 11 | 12 | struct WebMediaKeySystemMediaCapability { 13 | WebMediaKeySystemMediaCapability() { } 14 | 15 | WebString contentType; 16 | WebString mimeType; 17 | WebString codecs; 18 | WebString robustness; 19 | }; 20 | 21 | } // namespace blink 22 | 23 | #endif // WebMediaKeySystemMediaCapability_h 24 | -------------------------------------------------------------------------------- /public/platform/WebMemoryDumpProvider.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebMemoryDumpProvider_h 6 | #define WebMemoryDumpProvider_h 7 | 8 | #include "WebCommon.h" 9 | 10 | namespace blink { 11 | 12 | class WebProcessMemoryDump; 13 | 14 | // Base interface to be part of the memory tracing infrastructure. Blink classes 15 | // can implement this interface and register themselves (see 16 | // Platform::registerMemoryDumpProvider()) to dump stats for their allocators. 17 | class BLINK_PLATFORM_EXPORT WebMemoryDumpProvider { 18 | public: 19 | virtual ~WebMemoryDumpProvider(); 20 | 21 | // Called by the MemoryDumpManager when generating memory dumps. Embedders 22 | // are expected to populate the WebProcessMemoryDump* argument and return 23 | // true on success or false if anything went wrong and the dump should be 24 | // considered invalid. 25 | virtual bool onMemoryDump(WebProcessMemoryDump*) = 0; 26 | }; 27 | 28 | } // namespace blink 29 | 30 | #endif // WebMemoryDumpProvider_h 31 | -------------------------------------------------------------------------------- /public/platform/WebPasswordCredential.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebPasswordCredential_h 6 | #define WebPasswordCredential_h 7 | 8 | #include "public/platform/WebCommon.h" 9 | #include "public/platform/WebCredential.h" 10 | #include "public/platform/WebString.h" 11 | #include "public/platform/WebURL.h" 12 | 13 | namespace blink { 14 | 15 | class WebPasswordCredential : public WebCredential { 16 | public: 17 | BLINK_PLATFORM_EXPORT WebPasswordCredential(const WebString& id, const WebString& password, const WebString& name, const WebURL& iconURL); 18 | 19 | BLINK_PLATFORM_EXPORT void assign(const WebPasswordCredential&); 20 | 21 | BLINK_PLATFORM_EXPORT WebString password() const; 22 | 23 | #if INSIDE_BLINK 24 | BLINK_PLATFORM_EXPORT WebPasswordCredential(PlatformCredential*); 25 | BLINK_PLATFORM_EXPORT WebPasswordCredential& operator=(PlatformCredential*); 26 | #endif 27 | }; 28 | 29 | } // namespace blink 30 | 31 | #endif // WebPasswordCredential_h 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /public/platform/WebPlatformEventListener.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebPlatformEventListener_h 6 | #define WebPlatformEventListener_h 7 | 8 | namespace blink { 9 | 10 | class WebPlatformEventListener { 11 | public: 12 | virtual ~WebPlatformEventListener() { } 13 | }; 14 | 15 | } // namespace blink 16 | 17 | #endif // WebPlatformEventListener_h 18 | -------------------------------------------------------------------------------- /public/platform/WebPlatformEventType.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebPlatformEventType_h 6 | #define WebPlatformEventType_h 7 | 8 | namespace blink { 9 | 10 | enum WebPlatformEventType { 11 | WebPlatformEventDeviceMotion, 12 | WebPlatformEventDeviceOrientation, 13 | WebPlatformEventDeviceLight, 14 | WebPlatformEventBattery, 15 | WebPlatformEventGamepad, 16 | WebPlatformEventScreenOrientation, 17 | }; 18 | 19 | } // namespace blink 20 | 21 | #endif // WebPlatformEventType_h 22 | -------------------------------------------------------------------------------- /public/platform/WebRTCDTMFSenderHandlerClient.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 Google Inc. All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 1. Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * 2. Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * 13 | * THIS SOFTWARE IS PROVIDED BY GOOGLE INC. ``AS IS'' AND ANY 14 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GOOGLE INC. OR 17 | * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 20 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 21 | * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | #ifndef WebRTCDTMFSenderHandlerClient_h 27 | #define WebRTCDTMFSenderHandlerClient_h 28 | 29 | #include "WebCommon.h" 30 | 31 | namespace blink { 32 | 33 | class WebString; 34 | 35 | class WebRTCDTMFSenderHandlerClient { 36 | public: 37 | virtual ~WebRTCDTMFSenderHandlerClient() { } 38 | 39 | virtual void didPlayTone(const WebString& tone) = 0; 40 | }; 41 | 42 | } // namespace blink 43 | 44 | #endif // WebRTCDTMFSenderHandlerClient_h 45 | -------------------------------------------------------------------------------- /public/platform/WebRTCOfferOptions.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebRTCOfferOptions_h 6 | #define WebRTCOfferOptions_h 7 | 8 | #include "WebCommon.h" 9 | #include "WebNonCopyable.h" 10 | #include "WebPrivatePtr.h" 11 | 12 | namespace blink { 13 | 14 | class RTCOfferOptions; 15 | 16 | class WebRTCOfferOptions { 17 | public: 18 | WebRTCOfferOptions() { } 19 | WebRTCOfferOptions(const WebRTCOfferOptions& other) { assign(other); } 20 | ~WebRTCOfferOptions() { reset(); } 21 | 22 | WebRTCOfferOptions& operator=(const WebRTCOfferOptions& other) 23 | { 24 | assign(other); 25 | return *this; 26 | } 27 | 28 | BLINK_PLATFORM_EXPORT void assign(const WebRTCOfferOptions&); 29 | 30 | BLINK_PLATFORM_EXPORT void reset(); 31 | bool isNull() const { return m_private.isNull(); } 32 | 33 | BLINK_PLATFORM_EXPORT int32_t offerToReceiveVideo() const; 34 | BLINK_PLATFORM_EXPORT int32_t offerToReceiveAudio() const; 35 | BLINK_PLATFORM_EXPORT bool voiceActivityDetection() const; 36 | BLINK_PLATFORM_EXPORT bool iceRestart() const; 37 | 38 | #if INSIDE_BLINK 39 | BLINK_PLATFORM_EXPORT WebRTCOfferOptions(RTCOfferOptions*); 40 | #endif 41 | 42 | private: 43 | WebPrivatePtr m_private; 44 | }; 45 | 46 | } // namespace blink 47 | 48 | #endif // WebRTCOfferOptions_h 49 | -------------------------------------------------------------------------------- /public/platform/WebRenderingStats.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012 Google Inc. All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY 15 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY 18 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | #ifndef WebRenderingStats_h 27 | #define WebRenderingStats_h 28 | 29 | namespace blink { 30 | 31 | struct WebRenderingStats { 32 | WebRenderingStats() 33 | { 34 | } 35 | }; 36 | 37 | } // namespace blink 38 | 39 | #endif // WebRenderingStats_h 40 | -------------------------------------------------------------------------------- /public/platform/WebScrollBlocksOn.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebScrollBlocksOn_h 6 | #define WebScrollBlocksOn_h 7 | 8 | #include "WebCommon.h" 9 | 10 | namespace blink { 11 | 12 | enum WebScrollBlocksOn { 13 | WebScrollBlocksOnNone = 0x0, 14 | WebScrollBlocksOnStartTouch = 0x1, 15 | WebScrollBlocksOnWheelEvent = 0x2, 16 | WebScrollBlocksOnScrollEvent = 0x4, 17 | }; 18 | inline WebScrollBlocksOn operator| (WebScrollBlocksOn a, WebScrollBlocksOn b) { return WebScrollBlocksOn(int(a) | int(b)); } 19 | inline WebScrollBlocksOn& operator|= (WebScrollBlocksOn& a, WebScrollBlocksOn b) { return a = a | b; } 20 | inline WebScrollBlocksOn operator& (WebScrollBlocksOn a, WebScrollBlocksOn b) { return WebScrollBlocksOn(int(a) & int(b)); } 21 | inline WebScrollBlocksOn& operator&= (WebScrollBlocksOn& a, WebScrollBlocksOn b) { return a = a & b; } 22 | 23 | } // namespace blink 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /public/platform/WebScrollOffsetAnimationCurve.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebScrollOffsetAnimationCurve_h 6 | #define WebScrollOffsetAnimationCurve_h 7 | 8 | #include "WebCompositorAnimationCurve.h" 9 | #include "WebFloatPoint.h" 10 | 11 | namespace blink { 12 | 13 | class WebScrollOffsetAnimationCurve : public WebCompositorAnimationCurve { 14 | public: 15 | virtual ~WebScrollOffsetAnimationCurve() { } 16 | 17 | virtual void setInitialValue(WebFloatPoint) = 0; 18 | virtual WebFloatPoint getValue(double time) const = 0; 19 | virtual double duration() const = 0; 20 | }; 21 | 22 | } // namespace blink 23 | 24 | #endif // WebScrollOffsetAnimationCurve_h 25 | -------------------------------------------------------------------------------- /public/platform/WebScrollbarBehavior.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebScrollbarBehavior_h 6 | #define WebScrollbarBehavior_h 7 | 8 | namespace blink { 9 | 10 | struct WebPoint; 11 | struct WebRect; 12 | 13 | class WebScrollbarBehavior { 14 | public: 15 | enum Button { 16 | ButtonNone = -1, 17 | ButtonLeft, 18 | ButtonMiddle, 19 | ButtonRight 20 | }; 21 | virtual ~WebScrollbarBehavior() { } 22 | virtual bool shouldCenterOnThumb(Button, bool shiftKeyPressed, bool altKeyPressed) { return false; } 23 | virtual bool shouldSnapBackToDragOrigin(const WebPoint& eventPoint, const WebRect& scrollbarRect, bool isHorizontal) { return false; } 24 | }; 25 | 26 | } // namespace blink 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /public/platform/WebScrollbarThemePainter.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weolar/blinkgc/c830123375bc39e7767bfb5756e5614403537963/public/platform/WebScrollbarThemePainter.h -------------------------------------------------------------------------------- /public/platform/WebSelectionBound.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebSelectionBound_h 6 | #define WebSelectionBound_h 7 | 8 | #include "public/platform/WebPoint.h" 9 | 10 | namespace blink { 11 | 12 | // An endpoint for an active selection region. 13 | // TODO(jdduke): Move this to web/ after downstream code adopts |WebSelection|. 14 | struct WebSelectionBound { 15 | // TODO(jdduke): Remove the type identifier after downstream code adopts 16 | // |WebSelection| for determining bound orientation. 17 | enum Type { 18 | Caret, 19 | SelectionLeft, 20 | SelectionRight 21 | }; 22 | 23 | explicit WebSelectionBound(Type type) 24 | : type(type) 25 | , layerId(0) 26 | , isTextDirectionRTL(false) 27 | { 28 | } 29 | 30 | // The logical type of the endpoint. Note that this is dependent not only on 31 | // the bound's relative location, but also the underlying text direction. 32 | Type type; 33 | 34 | // The id of the platform layer to which the bound should be anchored. 35 | int layerId; 36 | 37 | // The bottom and top coordinates of the edge (caret), in layer coordinates, 38 | // that define the selection bound. 39 | WebPoint edgeTopInLayer; 40 | WebPoint edgeBottomInLayer; 41 | 42 | // Whether the text direction at this location is RTL. 43 | bool isTextDirectionRTL; 44 | }; 45 | 46 | } // namespace blink 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /public/platform/WebSerializedOrigin.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebSerializedOrigin_h 6 | #define WebSerializedOrigin_h 7 | 8 | #include "WebString.h" 9 | 10 | #if !INSIDE_BLINK 11 | #include 12 | #endif 13 | 14 | namespace blink { 15 | 16 | class SecurityOrigin; 17 | 18 | // WebSerializedOrigin represents a serialized Web Origin specified in RFC6454. 19 | class WebSerializedOrigin { 20 | public: 21 | WebSerializedOrigin() : m_string("null") { } 22 | #if INSIDE_BLINK 23 | BLINK_PLATFORM_EXPORT WebSerializedOrigin(const SecurityOrigin&); 24 | #else 25 | WebSerializedOrigin(const url::Origin& origin) : m_string(WebString::fromUTF8(origin.string())) { } 26 | operator url::Origin() const { return url::Origin(m_string.utf8()); } 27 | #endif 28 | 29 | const WebString& string() const 30 | { 31 | return m_string; 32 | } 33 | 34 | private: 35 | const WebString m_string; 36 | }; 37 | 38 | } // namespace blink 39 | 40 | #endif // #ifndef SerializedOrigin_h 41 | -------------------------------------------------------------------------------- /public/platform/WebServiceWorkerCacheError.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebServiceWorkerCacheError_h 6 | #define WebServiceWorkerCacheError_h 7 | 8 | namespace blink { 9 | 10 | enum WebServiceWorkerCacheError { 11 | WebServiceWorkerCacheErrorNotImplemented, 12 | WebServiceWorkerCacheErrorNotFound, 13 | WebServiceWorkerCacheErrorExists, 14 | WebServiceWorkerCacheErrorLast = WebServiceWorkerCacheErrorExists 15 | }; 16 | 17 | } // namespace blink 18 | 19 | #endif // WebServiceWorkerCacheError_h 20 | -------------------------------------------------------------------------------- /public/platform/WebServiceWorkerClientQueryOptions.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebServiceWorkerClientQueryOptions_h 6 | #define WebServiceWorkerClientQueryOptions_h 7 | 8 | #include "public/platform/WebServiceWorkerClientType.h" 9 | 10 | namespace blink { 11 | 12 | struct WebServiceWorkerClientQueryOptions { 13 | WebServiceWorkerClientQueryOptions() 14 | : clientType(WebServiceWorkerClientTypeWindow) 15 | , includeUncontrolled(false) 16 | { 17 | } 18 | 19 | WebServiceWorkerClientType clientType; 20 | bool includeUncontrolled; 21 | }; 22 | 23 | } // namespace blink 24 | 25 | #endif // WebServiceWorkerClientQueryOptions_h 26 | -------------------------------------------------------------------------------- /public/platform/WebServiceWorkerClientType.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebServiceWorkerClientType_h 6 | #define WebServiceWorkerClientType_h 7 | 8 | namespace blink { 9 | 10 | enum WebServiceWorkerClientType { 11 | WebServiceWorkerClientTypeWindow, 12 | WebServiceWorkerClientTypeWorker, 13 | WebServiceWorkerClientTypeSharedWorker, 14 | WebServiceWorkerClientTypeAll, 15 | WebServiceWorkerClientTypeLast = WebServiceWorkerClientTypeAll 16 | }; 17 | 18 | } // namespace blink 19 | 20 | #endif // WebServiceWorkerClientType_h 21 | -------------------------------------------------------------------------------- /public/platform/WebServiceWorkerClientsClaimCallbacks.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebServiceWorkerClientsClaimCallbacks_h 6 | #define WebServiceWorkerClientsClaimCallbacks_h 7 | 8 | #include "public/platform/WebCallbacks.h" 9 | 10 | namespace blink { 11 | 12 | struct WebServiceWorkerError; 13 | 14 | using WebServiceWorkerClientsClaimCallbacks = WebCallbacks; 15 | 16 | } // namespace blink 17 | 18 | #endif // WebServiceWorkerClientsClaimCallbacks_h 19 | -------------------------------------------------------------------------------- /public/platform/WebServiceWorkerClientsInfo.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebServiceWorkerClientsInfo_h 6 | #define WebServiceWorkerClientsInfo_h 7 | 8 | #include "public/platform/WebCallbacks.h" 9 | #include "public/platform/WebPageVisibilityState.h" 10 | #include "public/platform/WebServiceWorkerClientType.h" 11 | #include "public/platform/WebURL.h" 12 | #include "public/platform/WebURLRequest.h" 13 | #include "public/platform/WebVector.h" 14 | 15 | namespace blink { 16 | 17 | struct WebServiceWorkerError; 18 | 19 | struct WebServiceWorkerClientInfo { 20 | WebServiceWorkerClientInfo() 21 | : pageVisibilityState(WebPageVisibilityStateLast) 22 | , isFocused(false) 23 | , frameType(WebURLRequest::FrameTypeNone) 24 | , clientType(WebServiceWorkerClientTypeWindow) 25 | { 26 | } 27 | 28 | WebString uuid; 29 | 30 | WebPageVisibilityState pageVisibilityState; 31 | bool isFocused; 32 | WebURL url; 33 | WebURLRequest::FrameType frameType; 34 | WebServiceWorkerClientType clientType; 35 | }; 36 | 37 | struct WebServiceWorkerClientsInfo { 38 | WebVector clients; 39 | }; 40 | 41 | // Two WebCallbacks, one for one client, one for a WebVector of clients. 42 | typedef WebCallbacks WebServiceWorkerClientCallbacks; 43 | typedef WebCallbacks WebServiceWorkerClientsCallbacks; 44 | 45 | } // namespace blink 46 | 47 | #endif // WebServiceWorkerClientsInfo_h 48 | -------------------------------------------------------------------------------- /public/platform/WebServiceWorkerEventResult.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebServiceWorkerEventResult_h 6 | #define WebServiceWorkerEventResult_h 7 | 8 | namespace blink { 9 | 10 | // Indicates how the service worker handled an event. 11 | enum WebServiceWorkerEventResult { 12 | // The event dispatch completed with no rejections. 13 | WebServiceWorkerEventResultCompleted = 0, 14 | // The service worker associated the event with a promise that was rejected 15 | // (e.g., the promise passed to waitUntil for an install event was rejected). 16 | WebServiceWorkerEventResultRejected, 17 | WebServiceWorkerEventResultLast = WebServiceWorkerEventResultRejected 18 | }; 19 | 20 | } // namespace blink 21 | 22 | #endif // WebServiceWorkerEventResult_h 23 | -------------------------------------------------------------------------------- /public/platform/WebServiceWorkerProxy.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebServiceWorkerProxy_h 6 | #define WebServiceWorkerProxy_h 7 | 8 | #include "public/platform/WebCommon.h" 9 | 10 | namespace blink { 11 | 12 | // A proxy interface, passed via WebServiceWorker.setProxy() from blink to 13 | // the embedder, to talk to the ServiceWorker object from embedder. 14 | class BLINK_PLATFORM_EXPORT WebServiceWorkerProxy { 15 | public: 16 | // Notifies the proxy that the service worker state changed. The new state 17 | // should be accessible via WebServiceWorker.state(). 18 | virtual void dispatchStateChangeEvent() = 0; 19 | 20 | protected: 21 | virtual ~WebServiceWorkerProxy() { } 22 | }; 23 | 24 | } // namespace blink 25 | 26 | #endif // WebServiceWorkerProxy_h 27 | -------------------------------------------------------------------------------- /public/platform/WebServiceWorkerRegistration.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebServiceWorkerRegistration_h 6 | #define WebServiceWorkerRegistration_h 7 | 8 | #include "public/platform/WebCallbacks.h" 9 | #include "public/platform/WebURL.h" 10 | 11 | namespace blink { 12 | 13 | class WebServiceWorkerProvider; 14 | class WebServiceWorkerRegistrationProxy; 15 | struct WebServiceWorkerError; 16 | 17 | class WebServiceWorkerRegistration { 18 | public: 19 | virtual ~WebServiceWorkerRegistration() { } 20 | 21 | using WebServiceWorkerUnregistrationCallbacks = WebCallbacks; 22 | 23 | virtual void setProxy(WebServiceWorkerRegistrationProxy*) { } 24 | virtual WebServiceWorkerRegistrationProxy* proxy() { return nullptr; } 25 | virtual void proxyStopped() { } 26 | 27 | virtual WebURL scope() const { return WebURL(); } 28 | virtual void update(WebServiceWorkerProvider*) { } 29 | virtual void unregister(WebServiceWorkerProvider*, WebServiceWorkerUnregistrationCallbacks*) { } 30 | }; 31 | 32 | } // namespace blink 33 | 34 | #endif // WebServiceWorkerRegistration_h 35 | -------------------------------------------------------------------------------- /public/platform/WebServiceWorkerRegistrationProxy.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebServiceWorkerRegistrationProxy_h 6 | #define WebServiceWorkerRegistrationProxy_h 7 | 8 | namespace blink { 9 | 10 | class WebServiceWorker; 11 | 12 | // A proxy interface, passed via WebServiceWorkerRegistration.setProxy() from 13 | // blink to the embedder, to talk to the ServiceWorkerRegistration object from 14 | // embedder. 15 | class WebServiceWorkerRegistrationProxy { 16 | public: 17 | // Notifies that the registration entered the installation process. 18 | // The installing worker should be accessible via 19 | // WebServiceWorkerRegistration.installing. 20 | virtual void dispatchUpdateFoundEvent() = 0; 21 | 22 | virtual void setInstalling(WebServiceWorker*) = 0; 23 | virtual void setWaiting(WebServiceWorker*) = 0; 24 | virtual void setActive(WebServiceWorker*) = 0; 25 | 26 | protected: 27 | virtual ~WebServiceWorkerRegistrationProxy() { } 28 | }; 29 | 30 | } // namespace blink 31 | 32 | #endif // WebServiceWorkerRegistrationProxy_h 33 | -------------------------------------------------------------------------------- /public/platform/WebServiceWorkerResponseError.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebServiceWorkerResponseError_h 6 | #define WebServiceWorkerResponseError_h 7 | 8 | namespace blink { 9 | 10 | // This enum is used in UMA histograms, so don't change the order or remove 11 | // entries. 12 | enum WebServiceWorkerResponseError { 13 | WebServiceWorkerResponseErrorUnknown, 14 | WebServiceWorkerResponseErrorPromiseRejected, 15 | WebServiceWorkerResponseErrorDefaultPrevented, 16 | WebServiceWorkerResponseErrorNoV8Instance, 17 | WebServiceWorkerResponseErrorResponseTypeError, 18 | WebServiceWorkerResponseErrorResponseTypeOpaque, 19 | WebServiceWorkerResponseErrorResponseTypeNotBasicOrDefault, 20 | WebServiceWorkerResponseErrorBodyUsed, 21 | WebServiceWorkerResponseErrorLast = WebServiceWorkerResponseErrorBodyUsed 22 | }; 23 | 24 | } // namespace blink 25 | 26 | #endif // WebServiceWorkerResponseError_h 27 | -------------------------------------------------------------------------------- /public/platform/WebServiceWorkerResponseType.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebServiceWorkerResponseType_h 6 | #define WebServiceWorkerResponseType_h 7 | 8 | namespace blink { 9 | 10 | enum WebServiceWorkerResponseType { 11 | WebServiceWorkerResponseTypeBasic, 12 | WebServiceWorkerResponseTypeCORS, 13 | WebServiceWorkerResponseTypeDefault, 14 | WebServiceWorkerResponseTypeError, 15 | WebServiceWorkerResponseTypeOpaque, 16 | WebServiceWorkerResponseTypeLast = WebServiceWorkerResponseTypeOpaque 17 | }; 18 | 19 | } // namespace blink 20 | 21 | #endif // WebServiceWorkerResponseType_h 22 | -------------------------------------------------------------------------------- /public/platform/WebServiceWorkerSkipWaitingCallbacks.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebServiceWorkerSkipWaitingCallbacks_h 6 | #define WebServiceWorkerSkipWaitingCallbacks_h 7 | 8 | #include "public/platform/WebCallbacks.h" 9 | 10 | namespace blink { 11 | 12 | using WebServiceWorkerSkipWaitingCallbacks = WebCallbacks; 13 | 14 | } // namespace blink 15 | 16 | #endif // WebServiceWorkerSkipWaitingCallbacks_h 17 | -------------------------------------------------------------------------------- /public/platform/WebServiceWorkerState.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebServiceWorkerState_h 6 | #define WebServiceWorkerState_h 7 | 8 | namespace blink { 9 | 10 | enum WebServiceWorkerState { 11 | WebServiceWorkerStateUnknown, 12 | WebServiceWorkerStateInstalling, 13 | WebServiceWorkerStateInstalled, 14 | WebServiceWorkerStateActivating, 15 | WebServiceWorkerStateActivated, 16 | WebServiceWorkerStateRedundant, 17 | WebServiceWorkerStateLast = WebServiceWorkerStateRedundant 18 | }; 19 | 20 | } // namespace blink 21 | 22 | #endif // WebServiceWorkerState_h 23 | -------------------------------------------------------------------------------- /public/platform/WebSetSinkIdError.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebSetSinkIdError_h 6 | #define WebSetSinkIdError_h 7 | 8 | #include "public/platform/WebString.h" 9 | 10 | namespace blink { 11 | 12 | struct WebSetSinkIdError { 13 | enum ErrorType { 14 | ErrorTypeNotFound = 1, 15 | ErrorTypeSecurity, 16 | ErrorTypeAbort, 17 | ErrorTypeNotSupported, 18 | ErrorTypeLast = ErrorTypeNotSupported 19 | }; 20 | 21 | WebSetSinkIdError(ErrorType errorType, const WebString& message) 22 | : errorType(errorType) 23 | , message(message) 24 | { 25 | } 26 | 27 | ErrorType errorType; 28 | WebString message; 29 | }; 30 | 31 | } // namespace blink 32 | 33 | #endif // WebSetSinkIdError_h 34 | -------------------------------------------------------------------------------- /public/platform/WebSourceBufferClient.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebSourceBufferClient_h 6 | #define WebSourceBufferClient_h 7 | 8 | namespace blink { 9 | 10 | class WebSourceBufferClient { 11 | public: 12 | virtual ~WebSourceBufferClient() { } 13 | 14 | // FIXME: Add a track collection parameter here. 15 | virtual void initializationSegmentReceived() = 0; 16 | }; 17 | 18 | } // namespace blink 19 | 20 | #endif // WebSourceBufferClient_h 21 | -------------------------------------------------------------------------------- /public/platform/WebSuspendableTask.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebSuspendableTask_h 6 | #define WebSuspendableTask_h 7 | 8 | namespace blink { 9 | 10 | class WebSuspendableTask { 11 | public: 12 | virtual void run() = 0; 13 | virtual void contextDestroyed() { } 14 | virtual ~WebSuspendableTask() { } 15 | }; 16 | 17 | } // namespace blink 18 | 19 | #endif // WebSuspendableTask_h 20 | -------------------------------------------------------------------------------- /public/platform/WebThreadedDataReceiver.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebThreadedDataReceiver_h 6 | #define WebThreadedDataReceiver_h 7 | 8 | #include "public/platform/WebCommon.h" 9 | #include "public/platform/WebPrivatePtr.h" 10 | 11 | namespace blink { 12 | 13 | class ThreadedDataReceiver; 14 | class WebThread; 15 | 16 | class WebThreadedDataReceiver { 17 | public: 18 | ~WebThreadedDataReceiver() { reset(); } 19 | 20 | WebThreadedDataReceiver() { } 21 | WebThreadedDataReceiver(const WebThreadedDataReceiver& r) { assign(r); } 22 | WebThreadedDataReceiver& operator=(const WebThreadedDataReceiver& r) 23 | { 24 | assign(r); 25 | return *this; 26 | } 27 | 28 | BLINK_PLATFORM_EXPORT void reset(); 29 | BLINK_PLATFORM_EXPORT void assign(const WebThreadedDataReceiver&); 30 | 31 | bool isNull() const { return m_private.isNull(); } 32 | 33 | #if INSIDE_BLINK 34 | BLINK_PLATFORM_EXPORT explicit WebThreadedDataReceiver(const PassRefPtrWillBeRawPtr&); 35 | #endif 36 | 37 | BLINK_PLATFORM_EXPORT void acceptData(const char* data, int dataLength); 38 | BLINK_PLATFORM_EXPORT WebThread* backgroundThread(); 39 | 40 | BLINK_PLATFORM_EXPORT bool needsMainthreadDataCopy(); 41 | BLINK_PLATFORM_EXPORT void acceptMainthreadDataNotification(const char* data, int dataLength, int encodedDataLength); 42 | 43 | private: 44 | WebPrivatePtr m_private; 45 | }; 46 | 47 | } // namespace blink 48 | 49 | #endif // WebThreadedDataReceiver_h 50 | -------------------------------------------------------------------------------- /public/platform/WebTraceLocation.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebTraceLocation_h 6 | #define WebTraceLocation_h 7 | 8 | #include "WebCommon.h" 9 | 10 | namespace blink { 11 | 12 | // This class is used to keep track of where posted tasks originate. See base/location.h in Chromium. 13 | // Currently only store the bits used in Blink, base::Location stores more. 14 | class BLINK_PLATFORM_EXPORT WebTraceLocation { 15 | public: 16 | // These char*s are not copied and must live for the duration of the program. 17 | WebTraceLocation(const char* function, const char* file); 18 | WebTraceLocation(); 19 | 20 | const char* functionName() const; 21 | const char* fileName() const; 22 | 23 | private: 24 | const char* m_functionName; 25 | const char* m_fileName; 26 | }; 27 | 28 | #if INSIDE_BLINK 29 | #define FROM_HERE ::blink::WebTraceLocation(__FUNCTION__, __FILE__) 30 | #endif // INSIDE_BLINK 31 | 32 | } 33 | 34 | #endif // WebTraceLocation_h 35 | -------------------------------------------------------------------------------- /public/platform/modules/app_banner/OWNERS: -------------------------------------------------------------------------------- 1 | mlamouri@chromium.org 2 | -------------------------------------------------------------------------------- /public/platform/modules/app_banner/WebAppBannerClient.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebAppBannerClient_h 6 | #define WebAppBannerClient_h 7 | 8 | #include "public/platform/WebCallbacks.h" 9 | #include "public/platform/modules/app_banner/WebAppBannerPromptResult.h" 10 | 11 | namespace blink { 12 | 13 | using WebAppBannerCallbacks = WebCallbacks; 14 | 15 | class WebAppBannerClient { 16 | public: 17 | virtual ~WebAppBannerClient() { } 18 | 19 | // Ownership of the callbacks is transferred to the client. 20 | virtual void registerBannerCallbacks(int requestId, WebAppBannerCallbacks*) = 0; 21 | 22 | // Tell the client that the event is being redispatched. 23 | virtual void showAppBanner(int requestId) { } 24 | }; 25 | 26 | } // namespace blink 27 | 28 | #endif // WebAppBannerClient_h 29 | -------------------------------------------------------------------------------- /public/platform/modules/app_banner/WebAppBannerPromptReply.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebAppBannerPromptReply_h 6 | #define WebAppBannerPromptReply_h 7 | 8 | namespace blink { 9 | 10 | enum class WebAppBannerPromptReply { 11 | None = 0, 12 | Cancel 13 | }; 14 | 15 | } // namespace blink 16 | 17 | #endif // WebAppBannerPromptReply_h 18 | -------------------------------------------------------------------------------- /public/platform/modules/app_banner/WebAppBannerPromptResult.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebAppBannerPromptResult_h 6 | #define WebAppBannerPromptResult_h 7 | 8 | #include "public/platform/WebString.h" 9 | 10 | namespace blink { 11 | 12 | struct WebAppBannerPromptResult { 13 | enum class Outcome { Accepted, Dismissed }; 14 | 15 | WebAppBannerPromptResult(const WebString& platform, Outcome outcome) 16 | : platform(platform) 17 | , outcome(outcome) 18 | { 19 | } 20 | 21 | WebString platform; 22 | Outcome outcome; 23 | }; 24 | 25 | } // namespace blink 26 | 27 | #endif // WebAppBannerPromptResult_h 28 | -------------------------------------------------------------------------------- /public/platform/modules/background_sync/OWNERS: -------------------------------------------------------------------------------- 1 | jkarlin@chromium.org 2 | -------------------------------------------------------------------------------- /public/platform/modules/background_sync/WebSyncClient.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebSyncClient_h 6 | #define WebSyncClient_h 7 | 8 | #include "public/platform/WebCallbacks.h" 9 | #include "public/platform/modules/background_sync/WebSyncError.h" 10 | 11 | namespace blink { 12 | 13 | class WebServiceWorkerRegistration; 14 | struct WebSyncRegistration; 15 | 16 | using WebSyncRegistrationCallbacks = WebCallbacks; 17 | 18 | class WebSyncClient { 19 | public: 20 | virtual ~WebSyncClient() { } 21 | 22 | // Ownership of the WebServiceWorkerRegistration is not transferred. 23 | // Ownership of the callbacks is transferred to the client. 24 | virtual void registerSync(WebServiceWorkerRegistration*, WebSyncRegistrationCallbacks*) = 0; 25 | }; 26 | 27 | } // namespace blink 28 | 29 | #endif // WebSyncClient_h 30 | -------------------------------------------------------------------------------- /public/platform/modules/background_sync/WebSyncError.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebSyncError_h 6 | #define WebSyncError_h 7 | 8 | #include "public/platform/WebString.h" 9 | 10 | namespace blink { 11 | 12 | struct WebSyncError { 13 | enum ErrorType { 14 | ErrorTypeAbort = 0, 15 | ErrorTypeNoPermission, 16 | ErrorTypeNotFound, 17 | ErrorTypeUnknown, 18 | ErrorTypeLast = ErrorTypeUnknown 19 | }; 20 | 21 | WebSyncError(ErrorType errorType, const WebString& message) 22 | : errorType(errorType) 23 | , message(message) 24 | { 25 | } 26 | 27 | ErrorType errorType; 28 | WebString message; 29 | }; 30 | 31 | } // namespace blink 32 | 33 | #endif // WebSyncError_h 34 | -------------------------------------------------------------------------------- /public/platform/modules/background_sync/WebSyncPermissionStatus.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebSyncPermissionStatus_h 6 | #define WebSyncPermissionStatus_h 7 | 8 | namespace blink { 9 | 10 | enum WebSyncPermissionStatus { 11 | WebSyncPermissionStatusGranted = 0, 12 | WebSyncPermissionStatusDenied, 13 | WebSyncPermissionStatusPrompt, 14 | 15 | // Used for IPC message range checks. 16 | WebSyncPermissionStatusLast = WebSyncPermissionStatusPrompt 17 | }; 18 | 19 | } // namespace blink 20 | #endif // WebSyncPermissionStatus_h 21 | -------------------------------------------------------------------------------- /public/platform/modules/bluetooth/OWNERS: -------------------------------------------------------------------------------- 1 | scheib@chromium.org -------------------------------------------------------------------------------- /public/platform/modules/bluetooth/WebBluetoothDevice.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebBluetoothDevice_h 6 | #define WebBluetoothDevice_h 7 | 8 | #include "public/platform/WebString.h" 9 | #include "public/platform/WebVector.h" 10 | 11 | namespace blink { 12 | 13 | // Information describing a Bluetooth device provided by the platform. 14 | struct WebBluetoothDevice { 15 | enum class VendorIDSource { 16 | Unknown, 17 | Bluetooth, 18 | USB 19 | }; 20 | 21 | WebBluetoothDevice(const WebString& instanceID, 22 | const WebString& name, 23 | int32_t deviceClass, 24 | VendorIDSource vendorIDSource, 25 | uint16_t vendorID, 26 | uint16_t productID, 27 | uint16_t productVersion, 28 | bool paired, 29 | const WebVector& uuids) 30 | : instanceID(instanceID) 31 | , name(name) 32 | , deviceClass(deviceClass) 33 | , vendorIDSource(vendorIDSource) 34 | , vendorID(vendorID) 35 | , productID(productID) 36 | , productVersion(productVersion) 37 | , paired(paired) 38 | , uuids(uuids) 39 | { 40 | } 41 | 42 | // Members corresponding to BluetoothDevice attributes as specified in IDL. 43 | const WebString instanceID; 44 | const WebString name; 45 | const int32_t deviceClass; 46 | const VendorIDSource vendorIDSource; 47 | const uint16_t vendorID; 48 | const uint16_t productID; 49 | const uint16_t productVersion; 50 | const bool paired; 51 | const WebVector uuids; 52 | }; 53 | 54 | } // namespace blink 55 | 56 | #endif // WebBluetoothDevice_h 57 | -------------------------------------------------------------------------------- /public/platform/modules/bluetooth/WebBluetoothError.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebBluetoothError_h 6 | #define WebBluetoothError_h 7 | 8 | #include "public/platform/WebString.h" 9 | 10 | namespace blink { 11 | 12 | // Error object when a bluetooth request can not be satisfied used to create 13 | // DOMExceptions. 14 | struct WebBluetoothError { 15 | enum ErrorType { 16 | AbortError, 17 | InvalidModificationError, 18 | InvalidStateError, 19 | NetworkError, 20 | NotFoundError, 21 | NotSupportedError, 22 | SecurityError, 23 | SyntaxError 24 | }; 25 | 26 | WebBluetoothError(ErrorType errorType, const WebString& message) 27 | : errorType(errorType) 28 | , message(message) 29 | { 30 | } 31 | 32 | ErrorType errorType; 33 | WebString message; 34 | }; 35 | 36 | } // namespace blink 37 | 38 | #endif // WebBluetoothError_h 39 | -------------------------------------------------------------------------------- /public/platform/modules/bluetooth/WebBluetoothGATTCharacteristic.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebBluetoothGATTCharacteristic_h 6 | #define WebBluetoothGATTCharacteristic_h 7 | 8 | #include "public/platform/WebString.h" 9 | #include "public/platform/WebVector.h" 10 | 11 | namespace blink { 12 | 13 | // Contains members corresponding to BluetoothGATTCharacteristic attributes as 14 | // specified in the IDL. 15 | struct WebBluetoothGATTCharacteristic { 16 | WebBluetoothGATTCharacteristic(const WebString& characteristicInstanceID, 17 | const WebString& serviceInstanceID, 18 | const WebString& uuid) 19 | : characteristicInstanceID(characteristicInstanceID) 20 | , serviceInstanceID(serviceInstanceID) 21 | , uuid(uuid) 22 | { 23 | } 24 | 25 | const WebString characteristicInstanceID; 26 | const WebString serviceInstanceID; 27 | const WebString uuid; 28 | // TODO(ortuno): Add 'properties' once CharacteristicProperties is implemented. 29 | // https://crbug.com/483345 30 | // const WebCharacteristicProperties properties; 31 | const WebVector value; 32 | }; 33 | 34 | } // namespace blink 35 | 36 | #endif // WebBluetoothGATTCharacteristic_h 37 | -------------------------------------------------------------------------------- /public/platform/modules/bluetooth/WebBluetoothGATTRemoteServer.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebBluetoothGATTRemoteServer_h 6 | #define WebBluetoothGATTRemoteServer_h 7 | 8 | #include "public/platform/WebString.h" 9 | 10 | namespace blink { 11 | 12 | struct WebBluetoothGATTRemoteServer { 13 | WebBluetoothGATTRemoteServer(const WebString& deviceInstanceID, 14 | bool connected) 15 | : deviceInstanceID(deviceInstanceID) 16 | , connected(connected) 17 | { 18 | } 19 | 20 | // Members corresponding to BluetoothGATTRemoteServer attributes as 21 | // specified in the IDL. 22 | const WebString deviceInstanceID; 23 | const bool connected; 24 | }; 25 | 26 | } // namespace blink 27 | 28 | #endif // WebBluetoothGATTRemoteServer_h 29 | -------------------------------------------------------------------------------- /public/platform/modules/bluetooth/WebBluetoothGATTService.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebBluetoothGATTService_h 6 | #define WebBluetoothGATTService_h 7 | 8 | #include "public/platform/WebString.h" 9 | 10 | namespace blink { 11 | 12 | struct WebBluetoothGATTService { 13 | WebBluetoothGATTService(const WebString& serviceInstanceID, 14 | const WebString& uuid, 15 | bool isPrimary, 16 | const WebString& deviceInstanceID) 17 | : serviceInstanceID(serviceInstanceID) 18 | , uuid(uuid) 19 | , isPrimary(isPrimary) 20 | , deviceInstanceID(deviceInstanceID) 21 | { 22 | } 23 | 24 | // Members corresponding to BluetoothGATTService attributes as 25 | // specified in the IDL. 26 | const WebString serviceInstanceID; 27 | const WebString uuid; 28 | const bool isPrimary; 29 | const WebString deviceInstanceID; 30 | }; 31 | 32 | } // namespace blink 33 | 34 | #endif // WebBluetoothGATTService_h 35 | -------------------------------------------------------------------------------- /public/platform/modules/bluetooth/WebRequestDeviceOptions.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebRequestDeviceOptions_h 6 | #define WebRequestDeviceOptions_h 7 | 8 | #include "public/platform/WebString.h" 9 | #include "public/platform/WebVector.h" 10 | 11 | namespace blink { 12 | 13 | // Contains members corresponding to BluetoothScanFilter members as 14 | // specified in the IDL. 15 | struct WebBluetoothScanFilter { 16 | WebBluetoothScanFilter() { } 17 | WebBluetoothScanFilter(const WebVector& services) 18 | : services(services) 19 | { 20 | } 21 | 22 | WebVector services; 23 | }; 24 | 25 | // Contains members corresponding to RequestDeviceOptions members as 26 | // specified in the IDL. 27 | struct WebRequestDeviceOptions { 28 | WebRequestDeviceOptions() { } 29 | 30 | WebVector filters; 31 | WebVector optionalServices; 32 | }; 33 | 34 | } // namespace blink 35 | 36 | #endif // WebRequestDeviceOptions_h 37 | -------------------------------------------------------------------------------- /public/platform/modules/device_orientation/OWNERS: -------------------------------------------------------------------------------- 1 | timvolodine@chromium.org 2 | -------------------------------------------------------------------------------- /public/platform/modules/indexeddb/OWNERS: -------------------------------------------------------------------------------- 1 | dgrogan@chromium.org 2 | jsbell@chromium.org 3 | cmumford@chromium.org 4 | -------------------------------------------------------------------------------- /public/platform/modules/indexeddb/WebIDBValue.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebIDBValue_h 6 | #define WebIDBValue_h 7 | 8 | #include "public/platform/WebBlobInfo.h" 9 | #include "public/platform/WebData.h" 10 | #include "public/platform/WebVector.h" 11 | #include "public/platform/modules/indexeddb/WebIDBKey.h" 12 | #include "public/platform/modules/indexeddb/WebIDBKeyPath.h" 13 | 14 | namespace blink { 15 | 16 | struct WebIDBValue { 17 | WebIDBValue() { } 18 | explicit WebIDBValue(const WebData& data) : data(data) { } 19 | WebIDBValue(const WebData& data, const WebVector& blobInfo) : data(data), webBlobInfo(blobInfo) { } 20 | WebIDBValue(const WebData& data, const WebVector& blobInfo, const WebIDBKey& primaryKey, const WebIDBKeyPath& keyPath) : data(data), webBlobInfo(blobInfo), primaryKey(primaryKey), keyPath(keyPath) { } 21 | 22 | // The serialized JavaScript bits (ignoring blob data) for this IDB Value. Required value. 23 | WebData data; 24 | // Collection of blob info referenced by [[data]]. Optional and empty for values without blobs. 25 | WebVector webBlobInfo; 26 | // The auto-generated primary key and key path. Both are set when IDB is generating keys (and not JavaScript). 27 | // Optional; If set then a property named [[keyPath]] will be set to [[primaryKey]] on the deserialized 28 | // [[data]] object before calling the event handler. 29 | WebIDBKey primaryKey; 30 | WebIDBKeyPath keyPath; 31 | }; 32 | 33 | } // namespace blink 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /public/platform/modules/navigator_services/OWNERS: -------------------------------------------------------------------------------- 1 | mek@chromium.org 2 | -------------------------------------------------------------------------------- /public/platform/modules/navigator_services/WebServicePort.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebServicePort_h 6 | #define WebServicePort_h 7 | 8 | #include "public/platform/WebURL.h" 9 | 10 | namespace blink { 11 | 12 | using WebServicePortID = int; 13 | 14 | // Struct containing the data representing a ServicePort. 15 | struct WebServicePort { 16 | // Members corresponding to ServicePort.idl attributes. 17 | WebURL targetUrl; 18 | WebString name; 19 | WebString data; 20 | 21 | // Unique ID to identify this port. 22 | WebServicePortID id = -1; 23 | }; 24 | 25 | } // namespace blink 26 | 27 | #endif // WebServicePort_h 28 | -------------------------------------------------------------------------------- /public/platform/modules/navigator_services/WebServicePortCallbacks.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebServicePortCallbacks_h 6 | #define WebServicePortCallbacks_h 7 | 8 | #include "public/platform/WebCallbacks.h" 9 | #include "public/platform/modules/navigator_services/WebServicePort.h" 10 | 11 | namespace blink { 12 | 13 | using WebServicePortConnectCallbacks = WebCallbacks; 14 | 15 | // Ownership of the ports passed to onSuccess is kept with the caller, and its 16 | // lifetime does not outlive past the end of the onSuccess call. 17 | using WebServicePortConnectEventCallbacks = WebCallbacks; 18 | 19 | } // namespace blink 20 | 21 | #endif // WebServicePortCallbacks_h 22 | -------------------------------------------------------------------------------- /public/platform/modules/navigator_services/WebServicePortProviderClient.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebServicePortProviderClient_h 6 | #define WebServicePortProviderClient_h 7 | 8 | #include "public/platform/WebCommon.h" 9 | #include "public/platform/WebMessagePortChannel.h" 10 | #include "public/platform/modules/navigator_services/WebServicePort.h" 11 | 12 | namespace blink { 13 | 14 | class WebString; 15 | 16 | // Interface implemented by blink, used for communication back from embedding 17 | // code to blink. An instance of this interface is passed to the embedder when 18 | // a WebServicePortProvider is created. 19 | class BLINK_PLATFORM_EXPORT WebServicePortProviderClient { 20 | public: 21 | // Post a message to one of the ports owned by a ServicePortCollection. 22 | virtual void postMessage(WebServicePortID, const WebString&, const WebMessagePortChannelArray&) = 0; 23 | 24 | protected: 25 | virtual ~WebServicePortProviderClient() {} 26 | }; 27 | 28 | } // namespace blink 29 | 30 | #endif // WebServicePortProviderClient_h 31 | -------------------------------------------------------------------------------- /public/platform/modules/notifications/OWNERS: -------------------------------------------------------------------------------- 1 | peter@chromium.org -------------------------------------------------------------------------------- /public/platform/modules/notifications/WebNotificationData.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebNotificationData_h 6 | #define WebNotificationData_h 7 | 8 | #include "public/platform/WebString.h" 9 | #include "public/platform/WebURL.h" 10 | #include "public/platform/WebVector.h" 11 | 12 | namespace blink { 13 | 14 | // Structure representing the data associated with a Web Notification. 15 | struct WebNotificationData { 16 | enum Direction { 17 | DirectionLeftToRight, 18 | DirectionRightToLeft 19 | }; 20 | 21 | WebNotificationData() 22 | : direction(DirectionLeftToRight) 23 | , silent(false) 24 | { 25 | } 26 | 27 | WebNotificationData(const WebString& title, Direction direction, const WebString& lang, const WebString& body, const WebString& tag, const WebURL& icon, const WebVector& vibrate, bool silent, const WebVector& data) 28 | : title(title) 29 | , direction(direction) 30 | , lang(lang) 31 | , body(body) 32 | , tag(tag) 33 | , icon(icon) 34 | , vibrate(vibrate) 35 | , silent(silent) 36 | , data(data) 37 | { 38 | } 39 | 40 | WebString title; 41 | Direction direction; 42 | WebString lang; 43 | WebString body; 44 | WebString tag; 45 | WebURL icon; 46 | WebVector vibrate; 47 | bool silent; 48 | WebVector data; 49 | }; 50 | 51 | } // namespace blink 52 | 53 | #endif // WebNotificationData_h 54 | -------------------------------------------------------------------------------- /public/platform/modules/notifications/WebNotificationDelegate.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebNotificationDelegate_h 6 | #define WebNotificationDelegate_h 7 | 8 | namespace blink { 9 | 10 | // A delegate through which the embedder can trigger events on a Document-bound 11 | // Web Notifications object. Service Worker-bound Web Notifications will not have 12 | // a delegate, as their events will be fired on a Service Worker instead. 13 | class WebNotificationDelegate { 14 | public: 15 | virtual void dispatchClickEvent() = 0; 16 | virtual void dispatchShowEvent() = 0; 17 | virtual void dispatchErrorEvent() = 0; 18 | virtual void dispatchCloseEvent() = 0; 19 | }; 20 | 21 | } // namespace blink 22 | 23 | #endif // WebNotificationDelegate_h 24 | -------------------------------------------------------------------------------- /public/platform/modules/notifications/WebNotificationPermission.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebNotificationPermission_h 6 | #define WebNotificationPermission_h 7 | 8 | namespace blink { 9 | 10 | enum WebNotificationPermission { 11 | WebNotificationPermissionAllowed = 0, 12 | WebNotificationPermissionDefault, 13 | WebNotificationPermissionDenied, 14 | 15 | WebNotificationPermissionLast = WebNotificationPermissionDenied 16 | }; 17 | 18 | } // namespace blink 19 | 20 | #endif // WebNotificationPermission_h 21 | -------------------------------------------------------------------------------- /public/platform/modules/permissions/OWNERS: -------------------------------------------------------------------------------- 1 | mlamouri@chromium.org 2 | -------------------------------------------------------------------------------- /public/platform/modules/permissions/WebPermissionClient.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebPermissionClient_h 6 | #define WebPermissionClient_h 7 | 8 | #include "public/platform/WebCallbacks.h" 9 | #include "public/platform/modules/permissions/WebPermissionStatus.h" 10 | #include "public/platform/modules/permissions/WebPermissionType.h" 11 | 12 | namespace blink { 13 | 14 | using WebPermissionQueryCallback = WebCallbacks; 15 | 16 | class WebPermissionObserver; 17 | class WebURL; 18 | 19 | // This client is expected to do general permission handling. From simple 20 | // permission query to requesting new permissions. 21 | class WebPermissionClient { 22 | public: 23 | // Query the permission status of a given origin for a specific permission. 24 | virtual void queryPermission(WebPermissionType, const WebURL&, WebPermissionQueryCallback*) { } 25 | 26 | // Listen for permission changes for a given origin and inform the observer 27 | // when they happen. The observer is not owned by the WebPermissionClient. 28 | // The client should expect stopListening() to be called when the observer 29 | // will be destroyed. 30 | virtual void startListening(WebPermissionType, const WebURL&, WebPermissionObserver*) { } 31 | 32 | // Stop listening to all the permission changes associated with the given 33 | // observer. 34 | virtual void stopListening(WebPermissionObserver*) { } 35 | 36 | protected: 37 | virtual ~WebPermissionClient() { } 38 | }; 39 | 40 | } // namespace blink 41 | 42 | #endif // WebPermissionClient_h 43 | -------------------------------------------------------------------------------- /public/platform/modules/permissions/WebPermissionObserver.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebPermissionObserver_h 6 | #define WebPermissionObserver_h 7 | 8 | #include "public/platform/modules/permissions/WebPermissionStatus.h" 9 | #include "public/platform/modules/permissions/WebPermissionType.h" 10 | 11 | namespace blink { 12 | 13 | class WebPermissionObserver { 14 | public: 15 | virtual void permissionChanged(WebPermissionType, WebPermissionStatus) = 0; 16 | }; 17 | 18 | } // namespace blink 19 | 20 | #endif // WebPermissionObserver_h 21 | -------------------------------------------------------------------------------- /public/platform/modules/permissions/WebPermissionStatus.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebPermissionStatus_h 6 | #define WebPermissionStatus_h 7 | 8 | namespace blink { 9 | 10 | enum WebPermissionStatus { 11 | WebPermissionStatusGranted, 12 | WebPermissionStatusDenied, 13 | WebPermissionStatusPrompt, 14 | }; 15 | 16 | } // namespace blink 17 | 18 | #endif // WebPermissionStatus_h 19 | -------------------------------------------------------------------------------- /public/platform/modules/permissions/WebPermissionType.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebPermissionType_h 6 | #define WebPermissionType_h 7 | 8 | namespace blink { 9 | 10 | enum WebPermissionType { 11 | WebPermissionTypeGeolocation, 12 | WebPermissionTypeNotifications, 13 | WebPermissionTypePush, 14 | WebPermissionTypePushNotifications, 15 | WebPermissionTypeMidi, 16 | WebPermissionTypeMidiSysEx, 17 | }; 18 | 19 | } // namespace blink 20 | 21 | #endif // WebPermissionType_h 22 | -------------------------------------------------------------------------------- /public/platform/modules/presentation/OWNERS: -------------------------------------------------------------------------------- 1 | avayvod@chromium.org 2 | imcheng@chromium.org 3 | mfoltz@chromium.org 4 | mlamouri@chromium.org 5 | -------------------------------------------------------------------------------- /public/platform/modules/presentation/WebPresentationAvailabilityObserver.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebPresentationAvailabilityObserver_h 6 | #define WebPresentationAvailabilityObserver_h 7 | 8 | namespace blink { 9 | 10 | // WebPresentationAvailabilityObserver is an interface that is implemented by 11 | // objects that wish to be notified when there is a presentation display 12 | // availability change. 13 | class WebPresentationAvailabilityObserver { 14 | public: 15 | virtual void availabilityChanged(bool) = 0; 16 | }; 17 | 18 | } // namespace blink 19 | 20 | #endif // WebPresentationAvailabilityObserver_h 21 | -------------------------------------------------------------------------------- /public/platform/modules/presentation/WebPresentationController.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebPresentationController_h 6 | #define WebPresentationController_h 7 | 8 | #include "public/platform/WebCommon.h" 9 | 10 | namespace blink { 11 | 12 | class WebPresentationSessionClient; 13 | class WebString; 14 | enum class WebPresentationSessionState; 15 | 16 | // The delegate Blink provides to WebPresentationClient in order to get updates. 17 | class BLINK_PLATFORM_EXPORT WebPresentationController { 18 | public: 19 | virtual ~WebPresentationController() { } 20 | 21 | // Called when the presentation session is started by the embedder using 22 | // the default presentation URL and id. 23 | virtual void didStartDefaultSession(WebPresentationSessionClient*) = 0; 24 | 25 | // Called when the state of a session changes. 26 | virtual void didChangeSessionState(WebPresentationSessionClient*, WebPresentationSessionState) = 0; 27 | 28 | // Called when a text message of a session is received. 29 | virtual void didReceiveSessionTextMessage(WebPresentationSessionClient*, const WebString& message) = 0; 30 | 31 | // Called when a binary message of a session is received. 32 | virtual void didReceiveSessionBinaryMessage(WebPresentationSessionClient*, const uint8_t* data, size_t length) = 0; 33 | }; 34 | 35 | } // namespace blink 36 | 37 | #endif // WebPresentationController_h 38 | -------------------------------------------------------------------------------- /public/platform/modules/presentation/WebPresentationError.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebPresentationError_h 6 | #define WebPresentationError_h 7 | 8 | #include "public/platform/WebString.h" 9 | 10 | namespace blink { 11 | 12 | struct WebPresentationError { 13 | enum ErrorType { 14 | ErrorTypeNoAvailableScreens = 0, 15 | ErrorTypeSessionRequestCancelled, 16 | ErrorTypeNoPresentationFound, 17 | ErrorTypeAvailabilityNotSupported, 18 | ErrorTypeUnknown, 19 | ErrorTypeLast = ErrorTypeUnknown 20 | }; 21 | 22 | WebPresentationError(ErrorType errorType, const WebString& message) 23 | : errorType(errorType) 24 | , message(message) 25 | { 26 | } 27 | 28 | ErrorType errorType; 29 | WebString message; 30 | }; 31 | 32 | } // namespace blink 33 | 34 | #endif // WebPresentationError_h 35 | -------------------------------------------------------------------------------- /public/platform/modules/presentation/WebPresentationSessionClient.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebPresentationSessionClient_h 6 | #define WebPresentationSessionClient_h 7 | 8 | #include "public/platform/WebString.h" 9 | 10 | namespace blink { 11 | 12 | enum class WebPresentationSessionState { 13 | Connected = 0, 14 | Disconnected, 15 | }; 16 | 17 | // The implementation the embedder has to provide for the Presentation API to work. 18 | class WebPresentationSessionClient { 19 | public: 20 | virtual ~WebPresentationSessionClient() { } 21 | 22 | virtual WebString getId() = 0; 23 | virtual WebString getUrl() = 0; 24 | }; 25 | 26 | } // namespace blink 27 | 28 | #endif // WebPresentationSessionClient_h 29 | -------------------------------------------------------------------------------- /public/platform/modules/push_messaging/OWNERS: -------------------------------------------------------------------------------- 1 | johnme@chromium.org 2 | mvanouwerkerk@chromium.org 3 | peter@chromium.org -------------------------------------------------------------------------------- /public/platform/modules/push_messaging/WebPushClient.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebPushClient_h 6 | #define WebPushClient_h 7 | 8 | #include "public/platform/WebCallbacks.h" 9 | #include "public/platform/modules/push_messaging/WebPushError.h" 10 | 11 | namespace blink { 12 | 13 | class WebServiceWorkerRegistration; 14 | struct WebPushSubscription; 15 | struct WebPushSubscriptionOptions; 16 | 17 | using WebPushSubscriptionCallbacks = WebCallbacks; 18 | 19 | class WebPushClient { 20 | public: 21 | virtual ~WebPushClient() { } 22 | 23 | // Ownership of the WebServiceWorkerRegistration is not transferred. 24 | // Ownership of the callbacks is transferred to the client. 25 | virtual void subscribe(WebServiceWorkerRegistration*, const WebPushSubscriptionOptions&, WebPushSubscriptionCallbacks*) = 0; 26 | }; 27 | 28 | } // namespace blink 29 | 30 | #endif // WebPushClient_h 31 | -------------------------------------------------------------------------------- /public/platform/modules/push_messaging/WebPushError.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebPushError_h 6 | #define WebPushError_h 7 | 8 | #include "public/platform/WebString.h" 9 | 10 | namespace blink { 11 | 12 | struct WebPushError { 13 | enum ErrorType { 14 | ErrorTypeAbort = 0, 15 | ErrorTypeNetwork, 16 | ErrorTypeNotFound, 17 | ErrorTypeNotSupported, 18 | ErrorTypeUnknown, 19 | ErrorTypeLast = ErrorTypeUnknown 20 | }; 21 | 22 | WebPushError(ErrorType errorType, const WebString& message) 23 | : errorType(errorType) 24 | , message(message) 25 | { 26 | } 27 | 28 | ErrorType errorType; 29 | WebString message; 30 | }; 31 | 32 | } // namespace blink 33 | 34 | #endif // WebPushError_h 35 | -------------------------------------------------------------------------------- /public/platform/modules/push_messaging/WebPushPermissionStatus.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebPushPermissionStatus_h 6 | #define WebPushPermissionStatus_h 7 | 8 | namespace blink { 9 | 10 | enum WebPushPermissionStatus { 11 | WebPushPermissionStatusGranted = 0, 12 | WebPushPermissionStatusDenied, 13 | WebPushPermissionStatusPrompt, 14 | 15 | // Used for IPC message range checks. 16 | WebPushPermissionStatusLast = WebPushPermissionStatusPrompt 17 | }; 18 | 19 | } // namespace blink 20 | #endif // WebPushPermissionStatus_h 21 | -------------------------------------------------------------------------------- /public/platform/modules/push_messaging/WebPushSubscription.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebPushSubscription_h 6 | #define WebPushSubscription_h 7 | 8 | #include "public/platform/WebCommon.h" 9 | #include "public/platform/WebString.h" 10 | #include "public/platform/WebURL.h" 11 | 12 | namespace blink { 13 | 14 | struct WebPushSubscription { 15 | explicit WebPushSubscription(const WebURL& endpoint) 16 | : endpoint(endpoint) 17 | { 18 | } 19 | 20 | // TODO(peter): Remove this constructor when the embedder switched over to the one above. 21 | BLINK_PLATFORM_EXPORT WebPushSubscription(const WebString& endpointWithoutSubscriptionId, const WebString& subscriptionId); 22 | 23 | WebURL endpoint; 24 | }; 25 | 26 | } // namespace blink 27 | 28 | #endif // WebPushSubscription_h 29 | -------------------------------------------------------------------------------- /public/platform/modules/push_messaging/WebPushSubscriptionOptions.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebPushSubscriptionOptions_h 6 | #define WebPushSubscriptionOptions_h 7 | 8 | namespace blink { 9 | 10 | struct WebPushSubscriptionOptions { 11 | WebPushSubscriptionOptions() 12 | : userVisibleOnly(false) 13 | { 14 | } 15 | 16 | // Indicates that the subscription will only be used for push messages 17 | // that result in UI visible to the user. 18 | bool userVisibleOnly; 19 | }; 20 | 21 | } // namespace blink 22 | 23 | #endif // WebPushSubscriptionOptions_h 24 | -------------------------------------------------------------------------------- /public/platform/modules/screen_orientation/OWNERS: -------------------------------------------------------------------------------- 1 | mlamouri@chromium.org 2 | -------------------------------------------------------------------------------- /public/platform/modules/screen_orientation/WebLockOrientationCallback.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebLockOrientationCallback_h 6 | #define WebLockOrientationCallback_h 7 | 8 | #include "public/platform/modules/screen_orientation/WebLockOrientationError.h" 9 | #include "public/platform/modules/screen_orientation/WebScreenOrientationType.h" 10 | 11 | namespace blink { 12 | 13 | // WebScreenOrientationType is an interface to be used by the embedder in order 14 | // to inform Blink when a screen lock operation has succeeded or failed. 15 | // A success notification comes with the new orientation angle and orientation 16 | // type and a failure notification comes with an information about the type of 17 | // failure. 18 | class WebLockOrientationCallback { 19 | public: 20 | virtual ~WebLockOrientationCallback() { } 21 | 22 | virtual void onSuccess() = 0; 23 | virtual void onError(WebLockOrientationError) = 0; 24 | }; 25 | 26 | } // namespace blink 27 | 28 | #endif // WebLockOrientationCallback_h 29 | -------------------------------------------------------------------------------- /public/platform/modules/screen_orientation/WebLockOrientationError.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebLockOrientationError_h 6 | #define WebLockOrientationError_h 7 | 8 | namespace blink { 9 | 10 | enum WebLockOrientationError { 11 | // If locking isn't available on the platform. 12 | WebLockOrientationErrorNotAvailable, 13 | 14 | // If fullscreen is required to lock. 15 | WebLockOrientationErrorFullScreenRequired, 16 | 17 | // If another lock/unlock got called before that one ended. 18 | WebLockOrientationErrorCanceled, 19 | }; 20 | 21 | } // namespace blink 22 | 23 | #endif // WebLockOrientationError_h 24 | -------------------------------------------------------------------------------- /public/platform/modules/screen_orientation/WebScreenOrientationClient.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebScreenOrientationClient_h 6 | #define WebScreenOrientationClient_h 7 | 8 | #include "public/platform/modules/screen_orientation/WebScreenOrientationLockType.h" 9 | 10 | namespace blink { 11 | 12 | class WebLockOrientationCallback; 13 | 14 | // Client handling screen orientation locking for a given WebFrame. 15 | class WebScreenOrientationClient { 16 | public: 17 | virtual ~WebScreenOrientationClient() { } 18 | 19 | // Request a screen orientation lock. The implementation will own the callback. 20 | virtual void lockOrientation(WebScreenOrientationLockType, WebLockOrientationCallback*) = 0; 21 | 22 | // Unlock the screen orientation. No-op if the screen orientation was not locked. 23 | virtual void unlockOrientation() = 0; 24 | }; 25 | 26 | } // namespace blink 27 | 28 | #endif // WebScreenOrientationClient_h 29 | -------------------------------------------------------------------------------- /public/platform/modules/screen_orientation/WebScreenOrientationLockType.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebScreenOrientationLockType_h 6 | #define WebScreenOrientationLockType_h 7 | 8 | namespace blink { 9 | 10 | enum WebScreenOrientationLockType { 11 | WebScreenOrientationLockDefault = 0, // Equivalent to unlock. 12 | WebScreenOrientationLockPortraitPrimary, 13 | WebScreenOrientationLockPortraitSecondary, 14 | WebScreenOrientationLockLandscapePrimary, 15 | WebScreenOrientationLockLandscapeSecondary, 16 | WebScreenOrientationLockAny, 17 | WebScreenOrientationLockLandscape, 18 | WebScreenOrientationLockPortrait, 19 | WebScreenOrientationLockNatural, 20 | }; 21 | 22 | } // namespace blink 23 | 24 | #endif // WebScreenOrientationLockType_h 25 | -------------------------------------------------------------------------------- /public/platform/modules/screen_orientation/WebScreenOrientationType.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebScreenOrientationType_h 6 | #define WebScreenOrientationType_h 7 | 8 | namespace blink { 9 | 10 | enum WebScreenOrientationType { 11 | WebScreenOrientationUndefined = 0, 12 | WebScreenOrientationPortraitPrimary, 13 | WebScreenOrientationPortraitSecondary, 14 | WebScreenOrientationLandscapePrimary, 15 | WebScreenOrientationLandscapeSecondary 16 | }; 17 | 18 | } // namespace blink 19 | 20 | #endif // WebScreenOrientationType_h 21 | -------------------------------------------------------------------------------- /public/platform/modules/vr/OWNERS: -------------------------------------------------------------------------------- 1 | bajones@chromium.org 2 | -------------------------------------------------------------------------------- /public/platform/modules/vr/WebVRClient.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebVRClient_h 6 | #define WebVRClient_h 7 | 8 | #include "public/platform/WebCallbacks.h" 9 | #include "public/platform/WebVector.h" 10 | #include "public/platform/modules/vr/WebVR.h" 11 | 12 | namespace blink { 13 | 14 | // Success and failure callbacks for getDevices. 15 | typedef WebCallbacks, void> WebVRGetDevicesCallback; 16 | 17 | // Client handling VR device communication for a given WebFrame. 18 | class WebVRClient { 19 | public: 20 | virtual ~WebVRClient() { } 21 | 22 | virtual void getDevices(WebVRGetDevicesCallback*) = 0; 23 | 24 | virtual void getSensorState(unsigned index, blink::WebHMDSensorState& into) = 0; 25 | 26 | virtual void resetSensor(unsigned index) = 0; 27 | }; 28 | 29 | } // namespace blink 30 | 31 | #endif // WebVRClient_h 32 | -------------------------------------------------------------------------------- /public/web/DEPS: -------------------------------------------------------------------------------- 1 | include_rules = [ 2 | "+../platform", 3 | "+core", 4 | "+platform", 5 | 6 | # For subdirectories. 7 | "+../../platform", 8 | ] 9 | -------------------------------------------------------------------------------- /public/web/OWNERS: -------------------------------------------------------------------------------- 1 | per-file WebAXEnums.h=dmazzoni@chromium.org 2 | per-file WebAXEnums.h=aboxhall@chromium.org 3 | -------------------------------------------------------------------------------- /public/web/WebBeginFrameArgs.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebBeginFrameArgs_h 6 | #define WebBeginFrameArgs_h 7 | 8 | namespace blink { 9 | 10 | struct WebBeginFrameArgs { 11 | WebBeginFrameArgs(double lastFrameTimeMonotonic, double deadline, double interval) 12 | : lastFrameTimeMonotonic(lastFrameTimeMonotonic) 13 | , deadline(deadline) 14 | , interval(interval) 15 | { } 16 | 17 | // FIXME: Upgrade the time in CLOCK_MONOTONIC values to use a TimeTick like 18 | // class rather than a bare double. 19 | 20 | // FIXME: Extend this class to include the fields from Chrome 21 | // BeginFrameArgs structure. 22 | 23 | // Time in CLOCK_MONOTONIC that is the most recent vsync time. 24 | double lastFrameTimeMonotonic; 25 | 26 | // Time in CLOCK_MONOTONIC by which the renderer should finish producing the current frame. 0 means a deadline wasn't set. 27 | double deadline; 28 | 29 | // Expected delta between two successive frame times. 0 if a regular interval isn't available. 30 | double interval; 31 | }; 32 | 33 | } // namespace blink 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /public/web/WebExceptionCode.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010 Google Inc. All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are 6 | * met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above 11 | * copyright notice, this list of conditions and the following disclaimer 12 | * in the documentation and/or other materials provided with the 13 | * distribution. 14 | * * Neither the name of Google Inc. nor the names of its 15 | * contributors may be used to endorse or promote products derived from 16 | * this software without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #ifndef WebExceptionCode_h 32 | #define WebExceptionCode_h 33 | 34 | namespace blink { 35 | 36 | // This should match how ExceptionCode is defined in WebCore. 37 | typedef int WebExceptionCode; 38 | 39 | } // namespace blink 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /public/web/WebFrameLoadType.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebFrameLoadType_h 6 | #define WebFrameLoadType_h 7 | 8 | 9 | namespace blink { 10 | 11 | // The type of load for a navigation. 12 | // TODO(clamy): Return a WebFrameLoadType instead of a WebHistoryCommitType 13 | // in DidCommitProvisionalLoad. 14 | enum class WebFrameLoadType { 15 | Standard, 16 | BackForward, 17 | Reload, 18 | Same, // user loads same URL again (but not reload button) 19 | RedirectWithLockedBackForwardList, 20 | InitialInChildFrame, 21 | InitialHistoryLoad, // history navigation in a newly created frame 22 | ReloadFromOrigin, // reload bypassing cache 23 | }; 24 | 25 | } // namespace blink 26 | 27 | #endif // WebFrameLoadType_h 28 | 29 | -------------------------------------------------------------------------------- /public/web/WebGraphicsContext.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebGraphicsContext_h 6 | #define WebGraphicsContext_h 7 | 8 | #include "public/platform/WebCanvas.h" 9 | #include "public/platform/WebFloatRect.h" 10 | 11 | namespace blink { 12 | 13 | // Wraps a blink::GraphicsContext. 14 | // Internal consumers can extract the underlying context (via WebGraphicsContextImpl). 15 | // External consumers can make a single drawing using a WebCanvas. 16 | class WebGraphicsContext { 17 | public: 18 | virtual WebCanvas* beginDrawing(const WebFloatRect& bounds) = 0; 19 | virtual void endDrawing() = 0; 20 | 21 | protected: 22 | ~WebGraphicsContext() { } 23 | }; 24 | 25 | } // namespace blink 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /public/web/WebHistoryCommitType.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebHistoryCommitType_h 6 | #define WebHistoryCommitType_h 7 | 8 | namespace blink { 9 | 10 | enum WebHistoryCommitType { 11 | // The default case (link clicks, user-typed urls, etc.), appends 12 | // a new history entry to the back/forward list. 13 | WebStandardCommit, 14 | // A load that originated from history, whether from the 15 | // back/forward list or session restore. The back/forward list is 16 | // not modified, but our position in the list is. 17 | WebBackForwardCommit, 18 | // Each history entry is represented by a tree, where each node 19 | // contains the history state of a single frame in the page. Initial 20 | // loads in a new subframe append a new node to that tree. 21 | WebInitialCommitInChildFrame, 22 | // Reloads, client redirects, etc. Loads that neither originate from 23 | // nor add entries to the back/forward list. 24 | WebHistoryInertCommit 25 | }; 26 | 27 | } // namespace blink 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /public/web/WebPluginPlaceholder.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebPluginPlaceholder_h 6 | #define WebPluginPlaceholder_h 7 | 8 | #include "public/platform/WebString.h" 9 | 10 | namespace blink { 11 | 12 | // Provides content and behavior for a plugin placeholder rendered by Blink. 13 | class WebPluginPlaceholder { 14 | public: 15 | virtual ~WebPluginPlaceholder() { } 16 | 17 | // Returns a plaintext message to be displayed. 18 | virtual WebString message() const { return WebString(); } 19 | 20 | // If set, the placeholder will present UI to permit dismissing it. 21 | virtual bool isCloseable() const { return false; } 22 | }; 23 | 24 | } // namespace blink 25 | 26 | #endif // WebPluginPlaceholder_h 27 | -------------------------------------------------------------------------------- /public/web/WebPluginScriptForbiddenScope.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebPluginScriptForbiddenScope_h 6 | #define WebPluginScriptForbiddenScope_h 7 | 8 | #include "public/platform/WebCommon.h" 9 | 10 | namespace blink { 11 | 12 | class BLINK_EXPORT WebPluginScriptForbiddenScope { 13 | public: 14 | WebPluginScriptForbiddenScope() = delete; 15 | static bool isForbidden(); 16 | }; 17 | 18 | } // namespace blink 19 | 20 | #endif // WebPluginScriptForbiddenScope_h 21 | -------------------------------------------------------------------------------- /public/web/WebPrintPresetOptions.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebPrintPresetOptions_h 6 | #define WebPrintPresetOptions_h 7 | 8 | #include 9 | 10 | namespace blink { 11 | 12 | struct WebPageRange; 13 | typedef std::vector WebPageRanges; 14 | 15 | enum WebDuplexMode { 16 | WebUnknownDuplexMode = -1, 17 | WebSimplex, 18 | WebLongEdge, 19 | WebShortEdge 20 | }; 21 | 22 | struct WebPageRange { 23 | int from; 24 | int to; 25 | }; 26 | 27 | struct WebPrintPresetOptions { 28 | WebPrintPresetOptions() 29 | : isScalingDisabled(false) 30 | , copies(0) 31 | , duplexMode(WebUnknownDuplexMode) { } 32 | 33 | // Specifies whether scaling is disabled. 34 | bool isScalingDisabled; 35 | 36 | // Specifies the number of copies to be printed. 37 | int copies; 38 | 39 | // Specifies duplex mode to be used for printing. 40 | WebDuplexMode duplexMode; 41 | 42 | // Specifies page range to be used for printing. 43 | WebPageRanges pageRanges; 44 | 45 | // True if all the pages in the PDF are the same size. 46 | bool isPageSizeUniform; 47 | 48 | // Only valid if the page sizes are uniform. The page size in points. 49 | WebSize uniformPageSize; 50 | }; 51 | 52 | } // namespace blink 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /public/web/WebRemoteFrameClient.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebRemoteFrameClient_h 6 | #define WebRemoteFrameClient_h 7 | 8 | #include "public/platform/WebSecurityOrigin.h" 9 | #include "public/web/WebDOMMessageEvent.h" 10 | 11 | namespace blink { 12 | class WebInputEvent; 13 | class WebLocalFrame; 14 | class WebRemoteFrame; 15 | struct WebRect; 16 | 17 | class WebRemoteFrameClient { 18 | public: 19 | // Specifies the reason for the detachment. 20 | enum class DetachType { Remove, Swap }; 21 | 22 | // Notify the embedder that it should remove this frame from the frame tree 23 | // and release any resources associated with it. 24 | virtual void frameDetached(DetachType) { } 25 | 26 | // Notifies the embedder that a postMessage was issued to a remote frame. 27 | virtual void postMessageEvent( 28 | WebLocalFrame* sourceFrame, 29 | WebRemoteFrame* targetFrame, 30 | WebSecurityOrigin targetOrigin, 31 | WebDOMMessageEvent) { } 32 | 33 | // Send initial drawing parameters to a child frame that is being rendered 34 | // out of process. 35 | virtual void initializeChildFrame( 36 | const WebRect& frameRect, 37 | float scaleFactor) { } 38 | 39 | // A remote frame was asked to start a navigation. 40 | virtual void navigate(const WebURLRequest& request, bool shouldReplaceCurrentEntry) { } 41 | virtual void reload(bool ignoreCache, bool isClientRedirect) { } 42 | 43 | // FIXME: Remove this method once we have input routing in the browser 44 | // process. See http://crbug.com/339659. 45 | virtual void forwardInputEvent(const WebInputEvent*) { } 46 | }; 47 | 48 | } // namespace blink 49 | 50 | #endif // WebRemoteFrameClient_h 51 | -------------------------------------------------------------------------------- /public/web/WebSandboxFlags.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be found 3 | // in the LICENSE file. 4 | 5 | #ifndef WebSandboxFlags_h 6 | #define WebSandboxFlags_h 7 | 8 | #include "../platform/WebCommon.h" 9 | 10 | namespace blink { 11 | 12 | // See http://www.whatwg.org/specs/web-apps/current-work/#attr-iframe-sandbox 13 | // for a list of the sandbox flags. This enum should be kept in sync with 14 | // Source/core/dom/SandboxFlags.h. Enforced in AssertMatchingEnums.cpp 15 | enum class WebSandboxFlags : int { 16 | None = 0, 17 | Navigation = 1, 18 | Plugins = 1 << 1, 19 | Origin = 1 << 2, 20 | Forms = 1 << 3, 21 | Scripts = 1 << 4, 22 | TopNavigation = 1 << 5, 23 | Popups = 1 << 6, 24 | AutomaticFeatures = 1 << 7, 25 | PointerLock = 1 << 8, 26 | DocumentDomain = 1 << 9, 27 | OrientationLock = 1 << 10, 28 | PropagatesToAuxiliaryBrowsingContexts = 1 << 11, 29 | Modals = 1 << 12, 30 | All = -1 31 | }; 32 | 33 | inline WebSandboxFlags operator&(WebSandboxFlags a, WebSandboxFlags b) 34 | { 35 | return static_cast(static_cast(a) & static_cast(b)); 36 | } 37 | 38 | inline WebSandboxFlags operator~(WebSandboxFlags flags) 39 | { 40 | return static_cast(~static_cast(flags)); 41 | } 42 | 43 | } // namespace blink 44 | 45 | #endif // WebSandboxFlags_h 46 | -------------------------------------------------------------------------------- /public/web/WebScriptExecutionCallback.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebScriptExecutionCallback_h 6 | #define WebScriptExecutionCallback_h 7 | 8 | namespace v8 { 9 | class Value; 10 | template class Local; 11 | } 12 | 13 | namespace blink { 14 | 15 | template class WebVector; 16 | 17 | class WebScriptExecutionCallback { 18 | public: 19 | virtual ~WebScriptExecutionCallback() { } 20 | 21 | // Method to be invoked when the asynchronous script execution is complete. 22 | // After function call all objects in vector will be collected 23 | virtual void completed(const WebVector >&) { } 24 | }; 25 | 26 | } // namespace blink 27 | 28 | #endif // WebScriptExecutionCallback_h 29 | -------------------------------------------------------------------------------- /public/web/WebSelection.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebSelection_h 6 | #define WebSelection_h 7 | 8 | #include "../platform/WebCommon.h" 9 | #include "../platform/WebSelectionBound.h" 10 | 11 | namespace blink { 12 | 13 | struct CompositedSelection; 14 | 15 | // The active selection region, containing compositing data for the selection 16 | // end points as well as metadata for the selection region. 17 | class BLINK_EXPORT WebSelection { 18 | public: 19 | enum SelectionType { NoSelection, CaretSelection, RangeSelection }; 20 | 21 | #if INSIDE_BLINK 22 | explicit WebSelection(const CompositedSelection&); 23 | #endif 24 | WebSelection(const WebSelection&); 25 | 26 | const WebSelectionBound& start() const { return m_start; } 27 | const WebSelectionBound& end() const { return m_end; } 28 | 29 | bool isNone() const { return selectionType() == NoSelection; } 30 | bool isCaret() const { return selectionType() == CaretSelection; } 31 | bool isRange() const { return selectionType() == RangeSelection; } 32 | 33 | bool isEditable() const { return m_isEditable; } 34 | bool isEmptyTextFormControl() const { return m_isEmptyTextFormControl; } 35 | 36 | private: 37 | SelectionType selectionType() const { return m_selectionType; } 38 | 39 | SelectionType m_selectionType; 40 | 41 | WebSelectionBound m_start; 42 | WebSelectionBound m_end; 43 | 44 | // Whether the selection region consists of editable text. 45 | bool m_isEditable; 46 | 47 | // Whether the selection resides in an empty text form control. Note that 48 | // this only applies to caret-type selections. 49 | bool m_isEmptyTextFormControl; 50 | }; 51 | 52 | } // namespace blink 53 | 54 | #endif // WebSelection_h 55 | -------------------------------------------------------------------------------- /public/web/WebTestInterfaceFactory.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebTestInterfaceFactory_h 6 | #define WebTestInterfaceFactory_h 7 | 8 | #include 9 | 10 | namespace blink { 11 | 12 | class WebTestInterfaceFactory { 13 | public: 14 | virtual ~WebTestInterfaceFactory() { } 15 | virtual v8::Local createInstance(v8::Local) = 0; 16 | }; 17 | 18 | } // namespace blink 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /public/web/WebTreeScopeType.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be found 3 | // in the LICENSE file. 4 | 5 | #ifndef WebTreeScopeType_h 6 | #define WebTreeScopeType_h 7 | 8 | namespace blink { 9 | 10 | // Indicates if an item is in a document tree or in a shadow tree, per the 11 | // Shadow DOM spec: https://w3c.github.io/webcomponents/spec/shadow/ 12 | enum class WebTreeScopeType { 13 | Document, 14 | Shadow, 15 | Last = Shadow, 16 | }; 17 | 18 | } // namespace blink 19 | 20 | #endif // WebTreeScopeType_h 21 | -------------------------------------------------------------------------------- /public/web/WebWorkerContentSettingsClientProxy.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebWorkerContentSettingsClientProxy_h 6 | #define WebWorkerContentSettingsClientProxy_h 7 | 8 | namespace blink { 9 | 10 | class WebString; 11 | 12 | // Proxy interface to talk to the document's ContentSettingsClient 13 | // implementation. 14 | // This proxy is created by the embedder and is passed to the worker's 15 | // WorkerGlobalScope in blink. Each allow method is called on the worker thread 16 | // and may destructed on the worker thread. 17 | class WebWorkerContentSettingsClientProxy { 18 | public: 19 | virtual ~WebWorkerContentSettingsClientProxy() { } 20 | 21 | // Deprecated: This function should be removed. 22 | virtual bool allowDatabase(const WebString& name, const WebString& displayName, unsigned long estimatedSize) 23 | { 24 | return true; 25 | } 26 | 27 | virtual bool requestFileSystemAccessSync() 28 | { 29 | return true; 30 | } 31 | 32 | virtual bool allowIndexedDB(const WebString& name) 33 | { 34 | return true; 35 | } 36 | }; 37 | 38 | } // namespace blink 39 | 40 | #endif // WebWorkerContentSettingsClientProxy_h 41 | -------------------------------------------------------------------------------- /public/web/android/DEPS: -------------------------------------------------------------------------------- 1 | include_rules = [ 2 | "+..", 3 | ] 4 | -------------------------------------------------------------------------------- /public/web/modules/notifications/OWNERS: -------------------------------------------------------------------------------- 1 | peter@chromium.org -------------------------------------------------------------------------------- /public/web/win/WebFontRendering.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WebFontRendering_h 6 | #define WebFontRendering_h 7 | 8 | #include "public/platform/WebCommon.h" 9 | #include 10 | 11 | class SkTypeface; 12 | struct IDWriteFactory; 13 | 14 | namespace blink { 15 | 16 | class WebFontRendering { 17 | public: 18 | BLINK_EXPORT static void setUseDirectWrite(bool); 19 | BLINK_EXPORT static void setDirectWriteFactory(IDWriteFactory*); 20 | BLINK_EXPORT static void setDeviceScaleFactor(float); 21 | BLINK_EXPORT static void setUseSubpixelPositioning(bool); 22 | BLINK_EXPORT static void addSideloadedFontForTesting(SkTypeface*); 23 | BLINK_EXPORT static void setMenuFontMetrics(const wchar_t* familyName, int32_t fontHeight); 24 | BLINK_EXPORT static void setSmallCaptionFontMetrics(const wchar_t* familyName, int32_t fontHeight); 25 | BLINK_EXPORT static void setStatusFontMetrics(const wchar_t* familyName, int32_t fontHeight); 26 | BLINK_EXPORT static void setLCDOrder(SkFontHost::LCDOrder); 27 | BLINK_EXPORT static void setLCDOrientation(SkFontHost::LCDOrientation); 28 | }; 29 | 30 | } // namespace blink 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /web/WebKit.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef WebKit_h 3 | #define WebKit_h 4 | 5 | namespace blink { 6 | 7 | void initialize(); 8 | 9 | } 10 | 11 | 12 | 13 | #endif -------------------------------------------------------------------------------- /web/WebMemoryDumpProvider.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include "config.h" 6 | #include "public/platform/WebMemoryDumpProvider.h" 7 | 8 | namespace blink { 9 | 10 | WebMemoryDumpProvider::~WebMemoryDumpProvider() 11 | { 12 | } 13 | 14 | } // namespace blink 15 | -------------------------------------------------------------------------------- /web/WebScheduler.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include "config.h" 6 | #include "public/platform/WebScheduler.h" 7 | 8 | #include "platform/Task.h" 9 | #include "public/platform/WebTraceLocation.h" 10 | #include "wtf/Assertions.h" 11 | #include "wtf/OwnPtr.h" 12 | 13 | namespace blink { 14 | 15 | namespace { 16 | 17 | class IdleTaskRunner : public WebThread::IdleTask { 18 | WTF_MAKE_NONCOPYABLE(IdleTaskRunner); 19 | 20 | public: 21 | explicit IdleTaskRunner(PassOwnPtr task) 22 | : m_task(task) 23 | { 24 | } 25 | 26 | ~IdleTaskRunner() override 27 | { 28 | } 29 | 30 | // WebThread::IdleTask implementation. 31 | void run(double deadlineSeconds) override 32 | { 33 | (*m_task)(deadlineSeconds); 34 | } 35 | 36 | private: 37 | OwnPtr m_task; 38 | }; 39 | 40 | } // namespace 41 | 42 | void WebScheduler::postIdleTask(const WebTraceLocation& location, PassOwnPtr idleTask) 43 | { 44 | postIdleTask(location, new IdleTaskRunner(idleTask)); 45 | } 46 | 47 | void WebScheduler::postNonNestableIdleTask(const WebTraceLocation& location, PassOwnPtr idleTask) 48 | { 49 | postNonNestableIdleTask(location, new IdleTaskRunner(idleTask)); 50 | } 51 | 52 | void WebScheduler::postIdleTaskAfterWakeup(const WebTraceLocation& location, PassOwnPtr idleTask) 53 | { 54 | postIdleTaskAfterWakeup(location, new IdleTaskRunner(idleTask)); 55 | } 56 | 57 | void WebScheduler::postLoadingTask(const WebTraceLocation& location, PassOwnPtr task) 58 | { 59 | postLoadingTask(location, new blink::Task(task)); 60 | } 61 | 62 | } // namespace blink 63 | -------------------------------------------------------------------------------- /web/WebThreadImpl.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weolar/blinkgc/c830123375bc39e7767bfb5756e5614403537963/web/WebThreadImpl.cpp -------------------------------------------------------------------------------- /web/WebThreadImpl.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weolar/blinkgc/c830123375bc39e7767bfb5756e5614403537963/web/WebThreadImpl.h -------------------------------------------------------------------------------- /web/WebTraceLocation.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include "config.h" 6 | #include "public/platform/WebTraceLocation.h" 7 | 8 | namespace blink { 9 | 10 | WebTraceLocation::WebTraceLocation() 11 | : m_functionName("unknown") 12 | , m_fileName("unknown") 13 | { } 14 | 15 | WebTraceLocation::WebTraceLocation(const char* functionName, const char* fileName) 16 | : m_functionName(functionName) 17 | , m_fileName(fileName) 18 | { } 19 | 20 | const char* WebTraceLocation::functionName() const 21 | { 22 | return m_functionName; 23 | } 24 | 25 | const char* WebTraceLocation::fileName() const 26 | { 27 | return m_fileName; 28 | } 29 | 30 | } // namespace blink 31 | -------------------------------------------------------------------------------- /wtf/ASCIICTypeTest.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include "config.h" 6 | #include "wtf/ASCIICType.h" 7 | 8 | #include 9 | 10 | namespace WTF { 11 | 12 | TEST(ASCIICTypeTest, ASCIICaseFoldTable) 13 | { 14 | LChar symbol = 0xff; 15 | while (symbol--) { 16 | EXPECT_EQ(toASCIILower(symbol), ASCIICaseFoldTable[symbol]); 17 | } 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /wtf/AddressSanitizer.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WTF_AddressSanitizer_h 6 | #define WTF_AddressSanitizer_h 7 | 8 | // TODO(sof): Add SyZyASan support? 9 | #if defined(ADDRESS_SANITIZER) 10 | #include 11 | #else 12 | #define ASAN_POISON_MEMORY_REGION(addr, size) \ 13 | ((void)(addr), (void)(size)) 14 | #define ASAN_UNPOISON_MEMORY_REGION(addr, size) \ 15 | ((void)(addr), (void)(size)) 16 | #endif 17 | 18 | #if defined(LEAK_SANITIZER) 19 | #include 20 | #else 21 | #define __lsan_register_root_region(addr, size) ((void)(addr), (void)(size)) 22 | #define __lsan_unregister_root_region(addr, size) ((void)(addr), (void)(size)) 23 | #endif 24 | 25 | // TODO(sof): Have to handle (ADDRESS_SANITIZER && _WIN32) differently as it 26 | // uses both Clang (which supports the __attribute__ syntax) and CL (which doesn't) 27 | // as long as we use "clang-cl /fallback". This shouldn't be needed when Clang 28 | // handles all the code without falling back to CL. 29 | #if defined(ADDRESS_SANITIZER) && (!OS(WIN) || COMPILER(CLANG)) 30 | #define NO_SANITIZE_ADDRESS __attribute__((no_sanitize_address)) 31 | #if ENABLE(LAZY_SWEEPING) 32 | #define NO_LAZY_SWEEP_SANITIZE_ADDRESS NO_SANITIZE_ADDRESS 33 | #else 34 | #define NO_LAZY_SWEEP_SANITIZE_ADDRESS 35 | #endif 36 | #else 37 | #define NO_SANITIZE_ADDRESS 38 | #define NO_LAZY_SWEEP_SANITIZE_ADDRESS 39 | #endif 40 | 41 | #endif // WTF_AddressSanitizer_h 42 | -------------------------------------------------------------------------------- /wtf/AddressSpaceRandomization.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef WTF_AddressSpaceRandomization_h 6 | #define WTF_AddressSpaceRandomization_h 7 | 8 | #include "wtf/WTFExport.h" 9 | 10 | namespace WTF { 11 | 12 | // Calculates a random preferred mapping address. In calculating an 13 | // address, we balance good ASLR against not fragmenting the address 14 | // space too badly. 15 | WTF_EXPORT void* getRandomPageBase(); 16 | 17 | } 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /wtf/ArrayPiece.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include "config.h" 6 | #include "wtf/ArrayPiece.h" 7 | 8 | #include "wtf/ArrayBuffer.h" 9 | #include "wtf/ArrayBufferView.h" 10 | #include "wtf/Assertions.h" 11 | 12 | namespace WTF { 13 | 14 | ArrayPiece::ArrayPiece() 15 | { 16 | initNull(); 17 | } 18 | 19 | ArrayPiece::ArrayPiece(void* data, unsigned byteLength) 20 | { 21 | initWithData(data, byteLength); 22 | } 23 | 24 | ArrayPiece::ArrayPiece(ArrayBuffer* buffer) 25 | { 26 | if (buffer) { 27 | initWithData(buffer->data(), buffer->byteLength()); 28 | } else { 29 | initNull(); 30 | } 31 | } 32 | 33 | ArrayPiece::ArrayPiece(ArrayBufferView* buffer) 34 | { 35 | if (buffer) { 36 | initWithData(buffer->baseAddress(), buffer->byteLength()); 37 | } else { 38 | initNull(); 39 | } 40 | } 41 | 42 | bool ArrayPiece::isNull() const 43 | { 44 | return m_isNull; 45 | } 46 | 47 | void* ArrayPiece::data() const 48 | { 49 | ASSERT(!isNull()); 50 | return m_data; 51 | } 52 | 53 | unsigned char* ArrayPiece::bytes() const 54 | { 55 | return static_cast(data()); 56 | } 57 | 58 | unsigned ArrayPiece::byteLength() const 59 | { 60 | ASSERT(!isNull()); 61 | return m_byteLength; 62 | } 63 | 64 | void ArrayPiece::initWithData(void* data, unsigned byteLength) 65 | { 66 | m_byteLength = byteLength; 67 | m_data = data; 68 | m_isNull = false; 69 | } 70 | 71 | void ArrayPiece::initNull() 72 | { 73 | m_byteLength = 0; 74 | m_data = 0; 75 | m_isNull = true; 76 | } 77 | 78 | } // namespace WTF 79 | -------------------------------------------------------------------------------- /wtf/ArrayPiece.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef ArrayPiece_h 6 | #define ArrayPiece_h 7 | 8 | #include "wtf/Forward.h" 9 | #include "wtf/WTFExport.h" 10 | 11 | namespace WTF { 12 | 13 | // This class is for passing around un-owned bytes as a pointer + length. 14 | // It supports implicit conversion from several other data types. 15 | // 16 | // ArrayPiece has the concept of being "null". This is different from an empty 17 | // byte range. It is invalid to call methods other than isNull() on such 18 | // instances. 19 | // 20 | // IMPORTANT: The data contained by ArrayPiece is NOT OWNED, so caution must be 21 | // taken to ensure it is kept alive. 22 | class WTF_EXPORT ArrayPiece { 23 | public: 24 | // Constructs a "null" ArrayPiece object. 25 | ArrayPiece(); 26 | 27 | ArrayPiece(void* data, unsigned byteLength); 28 | 29 | // Constructs an ArrayPiece from the given ArrayBuffer. If the input is a 30 | // nullptr, then the constructed instance will be isNull(). 31 | ArrayPiece(ArrayBuffer*); 32 | ArrayPiece(ArrayBufferView*); 33 | 34 | bool isNull() const; 35 | void* data() const; 36 | unsigned char* bytes() const; 37 | unsigned byteLength() const; 38 | 39 | protected: 40 | void initWithData(void* data, unsigned byteLength); 41 | 42 | private: 43 | void initNull(); 44 | 45 | void* m_data; 46 | unsigned m_byteLength; 47 | bool m_isNull; 48 | }; 49 | 50 | } // namespace WTF 51 | 52 | using WTF::ArrayPiece; 53 | 54 | #endif // ArrayPiece_h 55 | -------------------------------------------------------------------------------- /wtf/ConditionalDestructor.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef ConditionalDestructor_h 6 | #define ConditionalDestructor_h 7 | 8 | namespace WTF { 9 | 10 | // ConditionalDestructor defines the destructor of the derived object. 11 | // This base is used in order to completely avoid creating a destructor 12 | // for an object that does not need to be destructed. By doing so, 13 | // the clang compiler will have correct information about whether or not 14 | // the object has a trivial destructor. 15 | // Note: the derived object MUST release all its recources at the finalize() 16 | // method. 17 | template 18 | class ConditionalDestructor { 19 | public: 20 | ~ConditionalDestructor() { static_cast(this)->finalize(); } 21 | }; 22 | 23 | template 24 | class ConditionalDestructor { }; 25 | 26 | } 27 | 28 | #endif // ConditionalDestructor_h 29 | -------------------------------------------------------------------------------- /wtf/FastMalloc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public License 15 | * along with this library; see the file COPYING.LIB. If not, write to 16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301, USA. 18 | * 19 | */ 20 | 21 | #ifndef WTF_FastMalloc_h 22 | #define WTF_FastMalloc_h 23 | 24 | #include "wtf/WTFExport.h" 25 | 26 | namespace WTF { 27 | 28 | // These functions crash safely if an allocation fails. 29 | WTF_EXPORT void* fastMalloc(size_t); 30 | WTF_EXPORT void* fastZeroedMalloc(size_t); 31 | WTF_EXPORT void* fastRealloc(void*, size_t); 32 | WTF_EXPORT char* fastStrDup(const char*); 33 | 34 | WTF_EXPORT void fastFree(void*); 35 | 36 | } // namespace WTF 37 | 38 | using WTF::fastFree; 39 | using WTF::fastMalloc; 40 | using WTF::fastRealloc; 41 | using WTF::fastStrDup; 42 | using WTF::fastZeroedMalloc; 43 | 44 | #endif /* WTF_FastMalloc_h */ 45 | -------------------------------------------------------------------------------- /wtf/GetPtr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2006 Apple Computer, Inc. 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public License 15 | * along with this library; see the file COPYING.LIB. If not, write to 16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301, USA. 18 | * 19 | */ 20 | 21 | #ifndef WTF_GetPtr_h 22 | #define WTF_GetPtr_h 23 | 24 | namespace WTF { 25 | 26 | template inline T* getPtr(T* p) 27 | { 28 | return p; 29 | } 30 | 31 | template inline T* getPtr(T& p) 32 | { 33 | return &p; 34 | } 35 | 36 | } // namespace WTF 37 | 38 | #endif // WTF_GetPtr_h 39 | -------------------------------------------------------------------------------- /wtf/HashTableDeletedValueType.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 Google Inc. All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are 6 | * met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above 11 | * copyright notice, this list of conditions and the following disclaimer 12 | * in the documentation and/or other materials provided with the 13 | * distribution. 14 | * * Neither the name of Google Inc. nor the names of its 15 | * contributors may be used to endorse or promote products derived from 16 | * this software without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #ifndef HashTableDeletedValueType_h 32 | #define HashTableDeletedValueType_h 33 | 34 | namespace WTF { 35 | 36 | enum HashTableDeletedValueType { HashTableDeletedValue }; 37 | 38 | } // namespace WTF 39 | 40 | #endif // HashTableDeletedValueType_h 41 | -------------------------------------------------------------------------------- /wtf/Noncopyable.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2006, 2010 Apple Inc. All rights reserved. 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public License 15 | * along with this library; see the file COPYING.LIB. If not, write to 16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301, USA. 18 | * 19 | */ 20 | 21 | #ifndef WTF_Noncopyable_h 22 | #define WTF_Noncopyable_h 23 | 24 | #define WTF_MAKE_NONCOPYABLE(ClassName) \ 25 | private: \ 26 | ClassName(const ClassName&) = delete; \ 27 | ClassName& operator=(const ClassName&) = delete 28 | 29 | #endif // WTF_Noncopyable_h 30 | -------------------------------------------------------------------------------- /wtf/NotFound.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008 Apple Inc. All Rights Reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 1. Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * 2. Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * 13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY 14 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR 17 | * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 20 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 21 | * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | #ifndef NotFound_h 27 | #define NotFound_h 28 | 29 | namespace WTF { 30 | const size_t kNotFound = static_cast(-1); 31 | } 32 | 33 | using WTF::kNotFound; 34 | 35 | #endif // NotFound_h 36 | -------------------------------------------------------------------------------- /wtf/NullPtr.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2010 Apple Inc. All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions 7 | are met: 8 | 1. Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | 2. Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY 15 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY 18 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 21 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | 25 | */ 26 | 27 | #ifndef NullPtr_h 28 | #define NullPtr_h 29 | 30 | // For compilers and standard libraries that do not yet include it, this adds the 31 | // nullptr_t type and nullptr object. They are defined in the same namespaces they 32 | // would be in compiler and library that had the support. 33 | 34 | // libstdc++ supports nullptr_t starting with gcc 4.6. STLport doesn't define it. 35 | #if (defined(__GLIBCXX__) && __GLIBCXX__ < 20110325) || defined(_STLPORT_VERSION) 36 | namespace std { 37 | typedef decltype(nullptr) nullptr_t; 38 | } 39 | #endif 40 | #endif 41 | -------------------------------------------------------------------------------- /wtf/OWNERS: -------------------------------------------------------------------------------- 1 | cevans@chromium.org 2 | jchaffraix@chromium.org 3 | jochen@chromium.org 4 | mikhail.pozdnyakov@intel.com 5 | morrita@chromium.org 6 | thakis@chromium.org 7 | tkent@chromium.org 8 | erik.corry@gmail.com 9 | -------------------------------------------------------------------------------- /wtf/OptionalTest.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include "config.h" 6 | #include "wtf/Optional.h" 7 | 8 | #include 9 | 10 | namespace WTF { 11 | namespace { 12 | 13 | struct IntBox { 14 | IntBox(int n) : number(n) { } 15 | int number; 16 | }; 17 | 18 | class DestructionNotifier { 19 | public: 20 | DestructionNotifier(bool& flag) : m_flag(flag) { } 21 | ~DestructionNotifier() { m_flag = true; } 22 | private: 23 | bool& m_flag; 24 | }; 25 | 26 | TEST(OptionalTest, BooleanTest) 27 | { 28 | Optional optional; 29 | EXPECT_FALSE(optional); 30 | optional.emplace(0); 31 | EXPECT_TRUE(optional); 32 | } 33 | 34 | TEST(OptionalTest, Dereference) 35 | { 36 | Optional optional; 37 | optional.emplace(1); 38 | EXPECT_EQ(1, *optional); 39 | 40 | Optional optionalIntbox; 41 | optionalIntbox.emplace(42); 42 | EXPECT_EQ(42, optionalIntbox->number); 43 | } 44 | 45 | TEST(OptionalTest, DestructorCalled) 46 | { 47 | // Destroying a disengaged optional shouldn't do anything. 48 | { 49 | Optional optional; 50 | } 51 | 52 | // Destroying an engaged optional should call the destructor. 53 | bool isDestroyed = false; 54 | { 55 | Optional optional; 56 | optional.emplace(isDestroyed); 57 | EXPECT_FALSE(isDestroyed); 58 | } 59 | EXPECT_TRUE(isDestroyed); 60 | } 61 | 62 | } // namespace 63 | } // namespace WTF 64 | -------------------------------------------------------------------------------- /wtf/RefCountedLeakCounter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008 Apple Inc. All rights reserved. 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public License 15 | * along with this library; see the file COPYING.LIB. If not, write to 16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301, USA. 18 | * 19 | */ 20 | 21 | #ifndef RefCountedLeakCounter_h 22 | #define RefCountedLeakCounter_h 23 | 24 | #include "wtf/Assertions.h" 25 | #include "wtf/WTFExport.h" 26 | 27 | namespace WTF { 28 | 29 | struct WTF_EXPORT RefCountedLeakCounter { 30 | static void suppressMessages(const char*); 31 | static void cancelMessageSuppression(const char*); 32 | 33 | explicit RefCountedLeakCounter(const char* description); 34 | ~RefCountedLeakCounter(); 35 | 36 | void increment(); 37 | void decrement(); 38 | 39 | #if ENABLE(ASSERT) 40 | private: 41 | volatile int m_count; 42 | const char* m_description; 43 | #endif 44 | }; 45 | 46 | } // namespace WTF 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /wtf/RefPtrTest.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include "config.h" 6 | #include "wtf/RefPtr.h" 7 | 8 | #include "wtf/text/StringImpl.h" 9 | #include 10 | 11 | namespace WTF { 12 | 13 | TEST(RefPtrTest, Basic) 14 | { 15 | RefPtr string; 16 | EXPECT_TRUE(!string); 17 | string = StringImpl::create("test"); 18 | EXPECT_TRUE(!!string); 19 | string.clear(); 20 | EXPECT_TRUE(!string); 21 | } 22 | 23 | TEST(RefPtrTest, MoveAssignmentOperator) 24 | { 25 | RefPtr a = StringImpl::create("a"); 26 | RefPtr b = StringImpl::create("b"); 27 | // FIXME: Instead of explicitly casting to RefPtr&& here, we should use std::move, but that 28 | // requires us to have a standard library that supports move semantics. 29 | b = static_cast&&>(a); 30 | EXPECT_TRUE(!!b); 31 | EXPECT_TRUE(!a); 32 | } 33 | 34 | } // namespace WTF 35 | -------------------------------------------------------------------------------- /wtf/RefVector.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef RefVector_h 6 | #define RefVector_h 7 | 8 | #include "wtf/RefCounted.h" 9 | #include "wtf/RefPtr.h" 10 | #include "wtf/Vector.h" 11 | 12 | namespace blink { 13 | 14 | template 15 | class RefVector : public RefCounted> { 16 | public: 17 | static PassRefPtr create() { return adoptRef(new RefVector); } 18 | PassRefPtr copy() { return adoptRef(new RefVector(*this)); } 19 | 20 | const T& operator[](size_t i) const { return m_vector[i]; } 21 | T& operator[](size_t i) { return m_vector[i]; } 22 | const T& at(size_t i) const { return m_vector.at(i); } 23 | T& at(size_t i) { return m_vector.at(i); } 24 | 25 | bool operator==(const RefVector& o) const { return m_vector == o.m_vector; } 26 | bool operator!=(const RefVector& o) const { return m_vector != o.m_vector; } 27 | 28 | size_t size() const { return m_vector.size(); } 29 | bool isEmpty() const { return !size(); } 30 | void append(const T& decoration) { m_vector.append(decoration); } 31 | const Vector& vector() const { return m_vector; } 32 | 33 | private: 34 | Vector m_vector; 35 | RefVector() { } 36 | RefVector(const RefVector& o) : m_vector(o.m_vector) { } 37 | }; 38 | 39 | } // namespace blink 40 | 41 | #endif // RefVector_h 42 | -------------------------------------------------------------------------------- /wtf/StaticConstructors.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2006 Apple Computer, Inc. 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public License 15 | * along with this library; see the file COPYING.LIB. If not, write to 16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301, USA. 18 | * 19 | */ 20 | 21 | #ifndef StaticConstructors_h 22 | #define StaticConstructors_h 23 | 24 | // We need to avoid having static constructors. This is accomplished by defining 25 | // a static array of the appropriate size and alignment, and defining a const 26 | // reference that points to the buffer. During initialization, the object will 27 | // be constructed with placement new into the buffer. This works with MSVC, GCC, 28 | // and Clang without producing dynamic initialization code even at -O0. The only 29 | // downside is that all external translation units will have to emit one more 30 | // load, while a real global could be referenced directly by absolute or 31 | // relative addressing. 32 | 33 | // Use an array of pointers instead of an array of char in case there is some alignment issue. 34 | #define DEFINE_GLOBAL(type, name, ...) \ 35 | void* name##Storage[(sizeof(type) + sizeof(void *) - 1) / sizeof(void *)]; \ 36 | const type& name = *reinterpret_cast(&name##Storage); 37 | 38 | #endif // StaticConstructors_h 39 | -------------------------------------------------------------------------------- /wtf/TriState.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 Apple Inc. All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 1. Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * 2. Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * 13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY 14 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR 17 | * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 20 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 21 | * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | #ifndef TriState_h 27 | #define TriState_h 28 | 29 | namespace WTF { 30 | 31 | enum TriState { 32 | FalseTriState, 33 | TrueTriState, 34 | MixedTriState 35 | }; 36 | 37 | } 38 | 39 | using WTF::TriState; 40 | using WTF::FalseTriState; 41 | using WTF::TrueTriState; 42 | using WTF::MixedTriState; 43 | 44 | #endif // TriState_h 45 | -------------------------------------------------------------------------------- /wtf/Utility.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef Utility_h 6 | #define Utility_h 7 | 8 | #include "wtf/TypeTraits.h" 9 | 10 | namespace WTF { 11 | 12 | // TODO(jbroman): When a C++11 standard library is available, replace this with 13 | // std::forward from . 14 | 15 | template 16 | T&& forward(typename RemoveReference::Type& t) { return static_cast(t); } 17 | 18 | template 19 | T&& forward(typename RemoveReference::Type&& t) { return static_cast(t); } 20 | 21 | } // namespace WTF 22 | 23 | #endif // Utility_h 24 | -------------------------------------------------------------------------------- /wtf/dtoa/COPYING: -------------------------------------------------------------------------------- 1 | Copyright 2006-2011, the V8 project authors. All rights reserved. 2 | Redistribution and use in source and binary forms, with or without 3 | modification, are permitted provided that the following conditions are 4 | met: 5 | 6 | * Redistributions of source code must retain the above copyright 7 | notice, this list of conditions and the following disclaimer. 8 | * Redistributions in binary form must reproduce the above 9 | copyright notice, this list of conditions and the following 10 | disclaimer in the documentation and/or other materials provided 11 | with the distribution. 12 | * Neither the name of Google Inc. nor the names of its 13 | contributors may be used to endorse or promote products derived 14 | from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 17 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 18 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 19 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 20 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 21 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 22 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | -------------------------------------------------------------------------------- /wtf/dtoa/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2006-2011, the V8 project authors. All rights reserved. 2 | Redistribution and use in source and binary forms, with or without 3 | modification, are permitted provided that the following conditions are 4 | met: 5 | 6 | * Redistributions of source code must retain the above copyright 7 | notice, this list of conditions and the following disclaimer. 8 | * Redistributions in binary form must reproduce the above 9 | copyright notice, this list of conditions and the following 10 | disclaimer in the documentation and/or other materials provided 11 | with the distribution. 12 | * Neither the name of Google Inc. nor the names of its 13 | contributors may be used to endorse or promote products derived 14 | from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 17 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 18 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 19 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 20 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 21 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 22 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | -------------------------------------------------------------------------------- /wtf/dtoa/README: -------------------------------------------------------------------------------- 1 | http://code.google.com/p/double-conversion 2 | 3 | This project (double-conversion) provides binary-decimal and decimal-binary 4 | routines for IEEE doubles. 5 | 6 | The library consists of efficient conversion routines that have been extracted 7 | from the V8 JavaScript engine. The code has been refactored and improved so that 8 | it can be used more easily in other projects. 9 | 10 | There is extensive documentation in src/double-conversion.h. Other examples can 11 | be found in test/cctest/test-conversions.cc. 12 | -------------------------------------------------------------------------------- /wtf/text/StringBufferTest.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | #include "config.h" 8 | #include "wtf/text/StringBuffer.h" 9 | 10 | #include 11 | 12 | namespace WTF { 13 | 14 | TEST(StringBufferTest, Initial) 15 | { 16 | StringBuffer buf1; 17 | EXPECT_EQ(0u, buf1.length()); 18 | EXPECT_FALSE(buf1.characters()); 19 | 20 | StringBuffer buf2(0); 21 | EXPECT_EQ(0u, buf2.length()); 22 | EXPECT_FALSE(buf2.characters()); 23 | 24 | StringBuffer buf3(1); 25 | EXPECT_EQ(1u, buf3.length()); 26 | EXPECT_TRUE(buf3.characters()); 27 | } 28 | 29 | TEST(StringBufferTest, shrink) 30 | { 31 | StringBuffer buf(2); 32 | EXPECT_EQ(2u, buf.length()); 33 | buf[0] = 'a'; 34 | buf[1] = 'b'; 35 | 36 | buf.shrink(1); 37 | EXPECT_EQ(1u, buf.length()); 38 | EXPECT_EQ('a', buf[0]); 39 | 40 | buf.shrink(0); 41 | EXPECT_EQ(0u, buf.length()); 42 | } 43 | 44 | } // namespace WTF 45 | -------------------------------------------------------------------------------- /wtf/text/StringImplMac.mm: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2006, 2009 Apple Inc. All rights reserved. 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public License 15 | * along with this library; see the file COPYING.LIB. If not, write to 16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301, USA. 18 | * 19 | */ 20 | 21 | #include "config.h" 22 | #include "wtf/text/StringImpl.h" 23 | 24 | #import 25 | #import 26 | #include "wtf/RetainPtr.h" 27 | 28 | namespace WTF { 29 | 30 | // Use HardAutorelease to return an object made by a CoreFoundation 31 | // "create" or "copy" function as an autoreleased and garbage collected 32 | // object. CF objects need to be "made collectable" for autorelease to work 33 | // properly under GC. 34 | 35 | static inline id HardAutorelease(CFTypeRef object) 36 | { 37 | if (object) 38 | CFMakeCollectable(object); 39 | [(id)object autorelease]; 40 | return (id)object; 41 | } 42 | 43 | StringImpl::operator NSString *() 44 | { 45 | return HardAutorelease(createCFString().leakRef()); 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /wtf/text/TextCodecReplacement.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include "config.h" 6 | #include "wtf/text/TextCodecReplacement.h" 7 | 8 | #include "wtf/PassOwnPtr.h" 9 | #include "wtf/text/CharacterNames.h" 10 | #include "wtf/text/WTFString.h" 11 | 12 | namespace WTF { 13 | 14 | TextCodecReplacement::TextCodecReplacement() 15 | : m_sentEOF(false) 16 | { 17 | } 18 | 19 | void TextCodecReplacement::registerEncodingNames(EncodingNameRegistrar registrar) 20 | { 21 | // The 'replacement' label itself should not be referenceable by 22 | // resources or script - it's a specification convenience - but much of 23 | // the wtf/text API asserts that an encoding name is a label for itself. 24 | // This is handled in TextEncoding by marking it as not valid. 25 | registrar("replacement", "replacement"); 26 | 27 | registrar("csiso2022kr", "replacement"); 28 | registrar("hz-gb-2312", "replacement"); 29 | registrar("iso-2022-cn", "replacement"); 30 | registrar("iso-2022-cn-ext", "replacement"); 31 | registrar("iso-2022-kr", "replacement"); 32 | } 33 | 34 | static PassOwnPtr newStreamingTextDecoderReplacement(const TextEncoding&, const void*) 35 | { 36 | return adoptPtr(new TextCodecReplacement); 37 | } 38 | 39 | void TextCodecReplacement::registerCodecs(TextCodecRegistrar registrar) 40 | { 41 | registrar("replacement", newStreamingTextDecoderReplacement, 0); 42 | } 43 | 44 | String TextCodecReplacement::decode(const char*, size_t, FlushBehavior, bool, bool& sawError) 45 | { 46 | sawError = true; 47 | if (m_sentEOF) 48 | return String(); 49 | 50 | m_sentEOF = true; 51 | return String(&replacementCharacter, 1); 52 | } 53 | 54 | } // namespace WTF 55 | -------------------------------------------------------------------------------- /wtf/text/TextCodecReplacement.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef TextCodecReplacement_h 6 | #define TextCodecReplacement_h 7 | 8 | #include "wtf/text/TextCodec.h" 9 | #include "wtf/text/TextCodecUTF8.h" 10 | 11 | namespace WTF { 12 | 13 | class TextCodecReplacement final : public TextCodecUTF8 { 14 | public: 15 | TextCodecReplacement(); 16 | 17 | static void registerEncodingNames(EncodingNameRegistrar); 18 | static void registerCodecs(TextCodecRegistrar); 19 | 20 | private: 21 | String decode(const char*, size_t length, FlushBehavior, bool stopOnError, bool& sawError) override; 22 | 23 | bool m_sentEOF; 24 | }; 25 | 26 | } // namespace WTF 27 | 28 | #endif // TextCodecReplacement_h 29 | -------------------------------------------------------------------------------- /wtf/text/Unicode.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2006 George Staikos 3 | * Copyright (C) 2006, 2008, 2009 Apple Inc. All rights reserved. 4 | * Copyright (C) 2007-2009 Torch Mobile, Inc. 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Library General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Library General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Library General Public License 17 | * along with this library; see the file COPYING.LIB. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 19 | * Boston, MA 02110-1301, USA. 20 | * 21 | */ 22 | 23 | #ifndef WTF_UNICODE_H 24 | #define WTF_UNICODE_H 25 | 26 | #include "wtf/Assertions.h" 27 | 28 | // Define platform neutral 8 bit character type (L is for Latin-1). 29 | typedef unsigned char LChar; 30 | 31 | #ifdef MINIBLINK_NOT_IMPLEMENTED 32 | #include "wtf/text/icu/UnicodeIcu.h" 33 | #endif // MINIBLINK_NOT_IMPLEMENTED 34 | #include "wtf/text/qt4/UnicodeQt4.h" 35 | 36 | static_assert(sizeof(UChar) == 2, "UChar should be two bytes"); 37 | 38 | #endif // WTF_UNICODE_H 39 | -------------------------------------------------------------------------------- /wtf/text/WTFStringUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weolar/blinkgc/c830123375bc39e7767bfb5756e5614403537963/wtf/text/WTFStringUtil.cpp -------------------------------------------------------------------------------- /wtf/text/WTFStringUtil.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef WTFStringUtil_h 3 | #define WTFStringUtil_h 4 | 5 | #include 6 | #include "wtf/text/WTFString.h" 7 | 8 | namespace WTF { 9 | 10 | String ensureUTF16String(const String& string); 11 | Vector ensureUTF16UChar(const String& string); 12 | Vector ensureStringToUChars(const String& string); 13 | Vector ensureStringToUTF8(const String& string); 14 | String ensureStringToUTF8String(const String& string); 15 | std::string WTFStringToStdString(const WTF::String& str); 16 | 17 | bool isTextUTF8(const char *str, int length); 18 | 19 | bool splitStringToVector(const String& strData, const char strSplit, bool needTrim, WTF::Vector& out); 20 | 21 | } 22 | 23 | #endif // WTFStringUtil_h -------------------------------------------------------------------------------- /wtf/text/qt4/QString.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef QSTRING_H 3 | #define QSTRING_H 4 | 5 | #include "QtGlobal.h" 6 | #include "QChar.h" 7 | 8 | class Q_CORE_EXPORT QString 9 | { 10 | public: 11 | inline QString(); 12 | 13 | //QChar toQCharLower() const { return QChar(*this).toLower(); } 14 | //QChar toQCharUpper() const { return QChar(*this).toUpper(); } 15 | 16 | QString toLower() const Q_REQUIRED_RESULT; 17 | QString toUpper() const Q_REQUIRED_RESULT; 18 | 19 | }; 20 | 21 | 22 | #endif // QSTRING_H -------------------------------------------------------------------------------- /wtf/text/qt4/QtGlobal.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef _QT_GLOBAL_H_ 3 | #define _QT_GLOBAL_H_ 4 | 5 | # define QT_BEGIN_NAMESPACE 6 | # define QT_END_NAMESPACE 7 | # define QT_USE_NAMESPACE 8 | # define QT_BEGIN_INCLUDE_NAMESPACE 9 | # define QT_END_INCLUDE_NAMESPACE 10 | 11 | #define Q_DECL_EXPORT 12 | #define Q_CORE_EXPORT 13 | 14 | #define QT3_SUPPORT 15 | 16 | #define Q_DECL_DEPRECATED __declspec(deprecated) 17 | #define Q_DECL_CONSTRUCTOR_DEPRECATED Q_DECL_DEPRECATED 18 | #define QT_ASCII_CAST_WARN_CONSTRUCTOR Q_DECL_CONSTRUCTOR_DEPRECATED 19 | 20 | #define Q_REQUIRED_RESULT 21 | 22 | #if defined(__i386__) || defined(_WIN32) || defined(_WIN32_WCE) 23 | # if defined(Q_CC_GNU) 24 | #if !defined(Q_CC_INTEL) && ((100*(__GNUC__ - 0) + 10*(__GNUC_MINOR__ - 0) + __GNUC_PATCHLEVEL__) >= 332) 25 | # define QT_FASTCALL __attribute__((regparm(3))) 26 | #else 27 | # define QT_FASTCALL 28 | #endif 29 | # elif defined(Q_CC_MSVC) 30 | # define QT_FASTCALL __fastcall 31 | # else 32 | # define QT_FASTCALL 33 | # endif 34 | #else 35 | # define QT_FASTCALL 36 | #endif 37 | 38 | #endif // _QT_GLOBAL_H_ -------------------------------------------------------------------------------- /wtf/wtf_config.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {739DB09A-CC57-A953-A6CF-F64FA08E4FA7} 6 | 7 | 8 | {739DB09A-CC57-A953-A6CF-F64FA08E4FA7} 9 | 10 | 11 | {739DB09A-CC57-A953-A6CF-F64FA08E4FA7} 12 | 13 | 14 | {739DB09A-CC57-A953-A6CF-F64FA08E4FA7} 15 | 16 | 17 | {D6C6CEA7-AAD0-03AD-2394-AC6FCBF8A498} 18 | 19 | 20 | {1919EB75-19A6-2BAD-ABB0-47BF57C87A0F} 21 | 22 | 23 | {26D65320-41C3-1A61-26C0-583D658C7F16} 24 | 25 | 26 | {D5519164-BF26-36DA-740B-76CEFC1827F4} 27 | 28 | 29 | {47FC5EC4-15EB-E92F-89D7-AFE51CF838A9} 30 | 31 | 32 | 33 | 34 | ..\..\..\..\third_party\WebKit\Source\build\win 35 | 36 | 37 | 38 | 39 | --------------------------------------------------------------------------------