Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(414)

Side by Side Diff: third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp

Issue 2515363002: Introduce AnimationWorkletProxyClient and necessary plumbing to get it in worklet messaging proxy. (Closed)
Patch Set: address feedback Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 #include "core/page/PointerLockController.h" 52 #include "core/page/PointerLockController.h"
53 #include "platform/KeyboardCodes.h" 53 #include "platform/KeyboardCodes.h"
54 #include "platform/graphics/CompositorMutatorClient.h" 54 #include "platform/graphics/CompositorMutatorClient.h"
55 #include "public/platform/WebFrameScheduler.h" 55 #include "public/platform/WebFrameScheduler.h"
56 #include "public/web/WebAutofillClient.h" 56 #include "public/web/WebAutofillClient.h"
57 #include "public/web/WebPlugin.h" 57 #include "public/web/WebPlugin.h"
58 #include "public/web/WebRange.h" 58 #include "public/web/WebRange.h"
59 #include "public/web/WebWidgetClient.h" 59 #include "public/web/WebWidgetClient.h"
60 #include "web/CompositionUnderlineVectorBuilder.h" 60 #include "web/CompositionUnderlineVectorBuilder.h"
61 #include "web/CompositorMutatorImpl.h" 61 #include "web/CompositorMutatorImpl.h"
62 #include "web/CompositorProxyClientImpl.h" 62 #include "web/CompositorWorkerProxyClientImpl.h"
63 #include "web/ContextMenuAllowedScope.h" 63 #include "web/ContextMenuAllowedScope.h"
64 #include "web/InspectorOverlay.h" 64 #include "web/InspectorOverlay.h"
65 #include "web/PageOverlay.h" 65 #include "web/PageOverlay.h"
66 #include "web/WebDevToolsAgentImpl.h" 66 #include "web/WebDevToolsAgentImpl.h"
67 #include "web/WebInputEventConversion.h" 67 #include "web/WebInputEventConversion.h"
68 #include "web/WebInputMethodControllerImpl.h" 68 #include "web/WebInputMethodControllerImpl.h"
69 #include "web/WebLocalFrameImpl.h" 69 #include "web/WebLocalFrameImpl.h"
70 #include "web/WebPluginContainerImpl.h" 70 #include "web/WebPluginContainerImpl.h"
71 #include "web/WebRemoteFrameImpl.h" 71 #include "web/WebRemoteFrameImpl.h"
72 #include "web/WebViewFrameWidget.h" 72 #include "web/WebViewFrameWidget.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 126
127 if (localRoot->parent()) 127 if (localRoot->parent())
128 setIsTransparent(true); 128 setIsTransparent(true);
129 } 129 }
130 130
131 WebFrameWidgetImpl::~WebFrameWidgetImpl() {} 131 WebFrameWidgetImpl::~WebFrameWidgetImpl() {}
132 132
133 DEFINE_TRACE(WebFrameWidgetImpl) { 133 DEFINE_TRACE(WebFrameWidgetImpl) {
134 visitor->trace(m_localRoot); 134 visitor->trace(m_localRoot);
135 visitor->trace(m_mouseCaptureNode); 135 visitor->trace(m_mouseCaptureNode);
136 visitor->trace(m_proxyClientFactory);
136 } 137 }
137 138
138 // WebWidget ------------------------------------------------------------------ 139 // WebWidget ------------------------------------------------------------------
139 140
140 void WebFrameWidgetImpl::close() { 141 void WebFrameWidgetImpl::close() {
141 WebDevToolsAgentImpl::webFrameWidgetImplClosed(this); 142 WebDevToolsAgentImpl::webFrameWidgetImplClosed(this);
142 DCHECK(allInstances().contains(this)); 143 DCHECK(allInstances().contains(this));
143 allInstances().remove(this); 144 allInstances().remove(this);
144 145
145 m_localRoot->setFrameWidget(nullptr); 146 m_localRoot->setFrameWidget(nullptr);
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 424
424 void WebFrameWidgetImpl::scheduleAnimation() { 425 void WebFrameWidgetImpl::scheduleAnimation() {
425 if (m_layerTreeView) { 426 if (m_layerTreeView) {
426 m_layerTreeView->setNeedsBeginFrame(); 427 m_layerTreeView->setNeedsBeginFrame();
427 return; 428 return;
428 } 429 }
429 if (m_client) 430 if (m_client)
430 m_client->scheduleAnimation(); 431 m_client->scheduleAnimation();
431 } 432 }
432 433
433 CompositorProxyClient* WebFrameWidgetImpl::createCompositorProxyClient() { 434 CompositorProxyClientFactory*
434 if (!m_mutator) { 435 WebFrameWidgetImpl::compositorProxyClientFactory() {
436 if (!m_proxyClientFactory) {
435 std::unique_ptr<CompositorMutatorClient> mutatorClient = 437 std::unique_ptr<CompositorMutatorClient> mutatorClient =
436 CompositorMutatorImpl::createClient(); 438 CompositorMutatorImpl::createClient();
437 m_mutator = static_cast<CompositorMutatorImpl*>(mutatorClient->mutator()); 439 m_mutator = static_cast<CompositorMutatorImpl*>(mutatorClient->mutator());
438 m_layerTreeView->setMutatorClient(std::move(mutatorClient)); 440 m_layerTreeView->setMutatorClient(std::move(mutatorClient));
441
442 m_proxyClientFactory = new CompositorProxyClientFactoryImpl(m_mutator);
439 } 443 }
440 return new CompositorProxyClientImpl(m_mutator); 444
445 return m_proxyClientFactory;
441 } 446 }
442 447
443 void WebFrameWidgetImpl::applyViewportDeltas( 448 void WebFrameWidgetImpl::applyViewportDeltas(
444 const WebFloatSize& visualViewportDelta, 449 const WebFloatSize& visualViewportDelta,
445 const WebFloatSize& mainFrameDelta, 450 const WebFloatSize& mainFrameDelta,
446 const WebFloatSize& elasticOverscrollDelta, 451 const WebFloatSize& elasticOverscrollDelta,
447 float pageScaleDelta, 452 float pageScaleDelta,
448 float browserControlsDelta) { 453 float browserControlsDelta) {
449 // FIXME: To be implemented. 454 // FIXME: To be implemented.
450 } 455 }
(...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after
1150 return nullptr; 1155 return nullptr;
1151 } 1156 }
1152 1157
1153 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const { 1158 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const {
1154 if (!m_imeAcceptEvents) 1159 if (!m_imeAcceptEvents)
1155 return nullptr; 1160 return nullptr;
1156 return focusedLocalFrameInWidget(); 1161 return focusedLocalFrameInWidget();
1157 } 1162 }
1158 1163
1159 } // namespace blink 1164 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698