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

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

Issue 2515363002: Introduce AnimationWorkletProxyClient and necessary plumbing to get it in worklet messaging proxy. (Closed)
Patch Set: Export CompositorAnimator Created 3 years, 11 months 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) 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 #include "public/web/WebMeaningfulLayout.h" 142 #include "public/web/WebMeaningfulLayout.h"
143 #include "public/web/WebMediaPlayerAction.h" 143 #include "public/web/WebMediaPlayerAction.h"
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/AnimationWorkletProxyClientImpl.h"
152 #include "web/CompositionUnderlineVectorBuilder.h" 153 #include "web/CompositionUnderlineVectorBuilder.h"
153 #include "web/CompositorMutatorImpl.h" 154 #include "web/CompositorMutatorImpl.h"
154 #include "web/CompositorProxyClientImpl.h" 155 #include "web/CompositorWorkerProxyClientImpl.h"
155 #include "web/ContextFeaturesClientImpl.h" 156 #include "web/ContextFeaturesClientImpl.h"
156 #include "web/ContextMenuAllowedScope.h" 157 #include "web/ContextMenuAllowedScope.h"
157 #include "web/DatabaseClientImpl.h" 158 #include "web/DatabaseClientImpl.h"
158 #include "web/DedicatedWorkerMessagingProxyProviderImpl.h" 159 #include "web/DedicatedWorkerMessagingProxyProviderImpl.h"
159 #include "web/DevToolsEmulator.h" 160 #include "web/DevToolsEmulator.h"
160 #include "web/FullscreenController.h" 161 #include "web/FullscreenController.h"
161 #include "web/InspectorOverlay.h" 162 #include "web/InspectorOverlay.h"
162 #include "web/LinkHighlightImpl.h" 163 #include "web/LinkHighlightImpl.h"
163 #include "web/PageOverlay.h" 164 #include "web/PageOverlay.h"
164 #include "web/PrerendererClientImpl.h" 165 #include "web/PrerendererClientImpl.h"
(...skipping 3981 matching lines...) Expand 10 before | Expand all | Expand 10 after
4146 } 4147 }
4147 4148
4148 void WebViewImpl::forceNextWebGLContextCreationToFail() { 4149 void WebViewImpl::forceNextWebGLContextCreationToFail() {
4149 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); 4150 WebGLRenderingContext::forceNextWebGLContextCreationToFail();
4150 } 4151 }
4151 4152
4152 void WebViewImpl::forceNextDrawingBufferCreationToFail() { 4153 void WebViewImpl::forceNextDrawingBufferCreationToFail() {
4153 DrawingBuffer::forceNextDrawingBufferCreationToFail(); 4154 DrawingBuffer::forceNextDrawingBufferCreationToFail();
4154 } 4155 }
4155 4156
4156 CompositorProxyClient* WebViewImpl::createCompositorProxyClient() { 4157 CompositorProxyClient* WebViewImpl::createCompositorProxyClient(
4158 CompositorProxyClient::Type type) {
4157 if (!m_mutator) { 4159 if (!m_mutator) {
4158 std::unique_ptr<CompositorMutatorClient> mutatorClient = 4160 std::unique_ptr<CompositorMutatorClient> mutatorClient =
4159 CompositorMutatorImpl::createClient(); 4161 CompositorMutatorImpl::createClient();
4160 m_mutator = static_cast<CompositorMutatorImpl*>(mutatorClient->mutator()); 4162 m_mutator = static_cast<CompositorMutatorImpl*>(mutatorClient->mutator());
4161 m_layerTreeView->setMutatorClient(std::move(mutatorClient)); 4163 m_layerTreeView->setMutatorClient(std::move(mutatorClient));
4162 } 4164 }
4163 return new CompositorProxyClientImpl(m_mutator); 4165
4166 switch (type) {
4167 case CompositorProxyClient::kWorkerClient:
4168 return new CompositorWorkerProxyClientImpl(m_mutator);
4169 case CompositorProxyClient::kWorkletClient:
4170 return new AnimationWorkletProxyClientImpl(m_mutator);
4171 }
4172
4173 NOTREACHED() << "Unexpected CompositorProxyClient::Type: " << type;
4174 return nullptr;
4164 } 4175 }
4165 4176
4166 void WebViewImpl::updatePageOverlays() { 4177 void WebViewImpl::updatePageOverlays() {
4167 if (m_pageColorOverlay) 4178 if (m_pageColorOverlay)
4168 m_pageColorOverlay->update(); 4179 m_pageColorOverlay->update();
4169 if (InspectorOverlay* overlay = inspectorOverlay()) { 4180 if (InspectorOverlay* overlay = inspectorOverlay()) {
4170 PageOverlay* inspectorPageOverlay = overlay->pageOverlay(); 4181 PageOverlay* inspectorPageOverlay = overlay->pageOverlay();
4171 if (inspectorPageOverlay) 4182 if (inspectorPageOverlay)
4172 inspectorPageOverlay->update(); 4183 inspectorPageOverlay->update();
4173 } 4184 }
(...skipping 17 matching lines...) Expand all
4191 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame()) 4202 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame())
4192 return nullptr; 4203 return nullptr;
4193 return focusedFrame; 4204 return focusedFrame;
4194 } 4205 }
4195 4206
4196 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const { 4207 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const {
4197 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; 4208 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr;
4198 } 4209 }
4199 4210
4200 } // namespace blink 4211 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698