| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 #include "public/web/WebNode.h" | 144 #include "public/web/WebNode.h" |
| 145 #include "public/web/WebPlugin.h" | 145 #include "public/web/WebPlugin.h" |
| 146 #include "public/web/WebPluginAction.h" | 146 #include "public/web/WebPluginAction.h" |
| 147 #include "public/web/WebRange.h" | 147 #include "public/web/WebRange.h" |
| 148 #include "public/web/WebScopedUserGesture.h" | 148 #include "public/web/WebScopedUserGesture.h" |
| 149 #include "public/web/WebSelection.h" | 149 #include "public/web/WebSelection.h" |
| 150 #include "public/web/WebViewClient.h" | 150 #include "public/web/WebViewClient.h" |
| 151 #include "public/web/WebWindowFeatures.h" | 151 #include "public/web/WebWindowFeatures.h" |
| 152 #include "web/CompositionUnderlineVectorBuilder.h" | 152 #include "web/CompositionUnderlineVectorBuilder.h" |
| 153 #include "web/CompositorMutatorImpl.h" | 153 #include "web/CompositorMutatorImpl.h" |
| 154 #include "web/CompositorProxyClientImpl.h" | |
| 155 #include "web/ContextFeaturesClientImpl.h" | 154 #include "web/ContextFeaturesClientImpl.h" |
| 156 #include "web/ContextMenuAllowedScope.h" | 155 #include "web/ContextMenuAllowedScope.h" |
| 157 #include "web/DatabaseClientImpl.h" | 156 #include "web/DatabaseClientImpl.h" |
| 158 #include "web/DedicatedWorkerMessagingProxyProviderImpl.h" | 157 #include "web/DedicatedWorkerMessagingProxyProviderImpl.h" |
| 159 #include "web/DevToolsEmulator.h" | 158 #include "web/DevToolsEmulator.h" |
| 160 #include "web/FullscreenController.h" | 159 #include "web/FullscreenController.h" |
| 161 #include "web/InspectorOverlay.h" | 160 #include "web/InspectorOverlay.h" |
| 162 #include "web/LinkHighlightImpl.h" | 161 #include "web/LinkHighlightImpl.h" |
| 163 #include "web/PageOverlay.h" | 162 #include "web/PageOverlay.h" |
| 164 #include "web/PrerendererClientImpl.h" | 163 #include "web/PrerendererClientImpl.h" |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 m_baseBackgroundColor(Color::white), | 376 m_baseBackgroundColor(Color::white), |
| 378 m_backgroundColorOverride(Color::transparent), | 377 m_backgroundColorOverride(Color::transparent), |
| 379 m_zoomFactorOverride(0), | 378 m_zoomFactorOverride(0), |
| 380 m_userGestureObserved(false), | 379 m_userGestureObserved(false), |
| 381 m_shouldDispatchFirstVisuallyNonEmptyLayout(false), | 380 m_shouldDispatchFirstVisuallyNonEmptyLayout(false), |
| 382 m_shouldDispatchFirstLayoutAfterFinishedParsing(false), | 381 m_shouldDispatchFirstLayoutAfterFinishedParsing(false), |
| 383 m_shouldDispatchFirstLayoutAfterFinishedLoading(false), | 382 m_shouldDispatchFirstLayoutAfterFinishedLoading(false), |
| 384 m_displayMode(WebDisplayModeBrowser), | 383 m_displayMode(WebDisplayModeBrowser), |
| 385 m_elasticOverscroll(FloatSize()), | 384 m_elasticOverscroll(FloatSize()), |
| 386 m_mutator(nullptr), | 385 m_mutator(nullptr), |
| 386 m_proxyClientFactory(nullptr), |
| 387 m_scheduler(wrapUnique(Platform::current() | 387 m_scheduler(wrapUnique(Platform::current() |
| 388 ->currentThread() | 388 ->currentThread() |
| 389 ->scheduler() | 389 ->scheduler() |
| 390 ->createWebViewScheduler(this, this) | 390 ->createWebViewScheduler(this, this) |
| 391 .release())), | 391 .release())), |
| 392 m_lastFrameTimeMonotonic(0), | 392 m_lastFrameTimeMonotonic(0), |
| 393 m_overrideCompositorVisibility(false) { | 393 m_overrideCompositorVisibility(false) { |
| 394 Page::PageClients pageClients; | 394 Page::PageClients pageClients; |
| 395 pageClients.chromeClient = m_chromeClientImpl.get(); | 395 pageClients.chromeClient = m_chromeClientImpl.get(); |
| 396 pageClients.contextMenuClient = &m_contextMenuClientImpl; | 396 pageClients.contextMenuClient = &m_contextMenuClientImpl; |
| (...skipping 2118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2515 detachCompositorAnimationTimeline(m_linkHighlightsTimeline.get()); | 2515 detachCompositorAnimationTimeline(m_linkHighlightsTimeline.get()); |
| 2516 m_linkHighlightsTimeline.reset(); | 2516 m_linkHighlightsTimeline.reset(); |
| 2517 } | 2517 } |
| 2518 | 2518 |
| 2519 if (m_layerTreeView) | 2519 if (m_layerTreeView) |
| 2520 page()->willCloseLayerTreeView(*m_layerTreeView); | 2520 page()->willCloseLayerTreeView(*m_layerTreeView); |
| 2521 | 2521 |
| 2522 setRootLayer(nullptr); | 2522 setRootLayer(nullptr); |
| 2523 | 2523 |
| 2524 m_mutator = nullptr; | 2524 m_mutator = nullptr; |
| 2525 m_proxyClientFactory = nullptr; |
| 2525 m_layerTreeView = nullptr; | 2526 m_layerTreeView = nullptr; |
| 2526 } | 2527 } |
| 2527 | 2528 |
| 2528 void WebViewImpl::didAcquirePointerLock() { | 2529 void WebViewImpl::didAcquirePointerLock() { |
| 2529 if (page()) | 2530 if (page()) |
| 2530 page()->pointerLockController().didAcquirePointerLock(); | 2531 page()->pointerLockController().didAcquirePointerLock(); |
| 2531 } | 2532 } |
| 2532 | 2533 |
| 2533 void WebViewImpl::didNotAcquirePointerLock() { | 2534 void WebViewImpl::didNotAcquirePointerLock() { |
| 2534 if (page()) | 2535 if (page()) |
| (...skipping 1616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4151 } | 4152 } |
| 4152 | 4153 |
| 4153 void WebViewImpl::forceNextWebGLContextCreationToFail() { | 4154 void WebViewImpl::forceNextWebGLContextCreationToFail() { |
| 4154 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); | 4155 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); |
| 4155 } | 4156 } |
| 4156 | 4157 |
| 4157 void WebViewImpl::forceNextDrawingBufferCreationToFail() { | 4158 void WebViewImpl::forceNextDrawingBufferCreationToFail() { |
| 4158 DrawingBuffer::forceNextDrawingBufferCreationToFail(); | 4159 DrawingBuffer::forceNextDrawingBufferCreationToFail(); |
| 4159 } | 4160 } |
| 4160 | 4161 |
| 4161 CompositorProxyClient* WebViewImpl::createCompositorProxyClient() { | 4162 CompositorProxyClientFactory* WebViewImpl::compositorProxyClientFactory() { |
| 4162 if (!m_mutator) { | 4163 if (!m_proxyClientFactory) { |
| 4163 std::unique_ptr<CompositorMutatorClient> mutatorClient = | 4164 std::unique_ptr<CompositorMutatorClient> mutatorClient = |
| 4164 CompositorMutatorImpl::createClient(); | 4165 CompositorMutatorImpl::createClient(); |
| 4165 m_mutator = static_cast<CompositorMutatorImpl*>(mutatorClient->mutator()); | 4166 m_mutator = static_cast<CompositorMutatorImpl*>(mutatorClient->mutator()); |
| 4166 m_layerTreeView->setMutatorClient(std::move(mutatorClient)); | 4167 m_layerTreeView->setMutatorClient(std::move(mutatorClient)); |
| 4168 m_proxyClientFactory = new CompositorProxyClientFactoryImpl(m_mutator); |
| 4167 } | 4169 } |
| 4168 return new CompositorProxyClientImpl(m_mutator); | 4170 return m_proxyClientFactory; |
| 4169 } | 4171 } |
| 4170 | 4172 |
| 4171 void WebViewImpl::updatePageOverlays() { | 4173 void WebViewImpl::updatePageOverlays() { |
| 4172 if (m_pageColorOverlay) | 4174 if (m_pageColorOverlay) |
| 4173 m_pageColorOverlay->update(); | 4175 m_pageColorOverlay->update(); |
| 4174 if (InspectorOverlay* overlay = inspectorOverlay()) { | 4176 if (InspectorOverlay* overlay = inspectorOverlay()) { |
| 4175 PageOverlay* inspectorPageOverlay = overlay->pageOverlay(); | 4177 PageOverlay* inspectorPageOverlay = overlay->pageOverlay(); |
| 4176 if (inspectorPageOverlay) | 4178 if (inspectorPageOverlay) |
| 4177 inspectorPageOverlay->update(); | 4179 inspectorPageOverlay->update(); |
| 4178 } | 4180 } |
| (...skipping 17 matching lines...) Expand all Loading... |
| 4196 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame()) | 4198 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame()) |
| 4197 return nullptr; | 4199 return nullptr; |
| 4198 return focusedFrame; | 4200 return focusedFrame; |
| 4199 } | 4201 } |
| 4200 | 4202 |
| 4201 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const { | 4203 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const { |
| 4202 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; | 4204 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; |
| 4203 } | 4205 } |
| 4204 | 4206 |
| 4205 } // namespace blink | 4207 } // namespace blink |
| OLD | NEW |