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

Side by Side Diff: components/test_runner/test_plugin.cc

Issue 1739743003: Blink Compositor Animation: Erase old animation system. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Exclude histograms.xml Created 4 years, 9 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 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/test_runner/test_plugin.h" 5 #include "components/test_runner/test_plugin.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <utility> 9 #include <utility>
10 10
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/memory/shared_memory.h" 13 #include "base/memory/shared_memory.h"
14 #include "base/strings/stringprintf.h" 14 #include "base/strings/stringprintf.h"
15 #include "cc/blink/web_layer_impl.h" 15 #include "cc/blink/web_layer_impl.h"
16 #include "cc/layers/layer_settings.h"
16 #include "cc/layers/texture_layer.h" 17 #include "cc/layers/texture_layer.h"
17 #include "cc/resources/shared_bitmap_manager.h" 18 #include "cc/resources/shared_bitmap_manager.h"
18 #include "components/test_runner/web_test_delegate.h" 19 #include "components/test_runner/web_test_delegate.h"
19 #include "third_party/WebKit/public/platform/Platform.h" 20 #include "third_party/WebKit/public/platform/Platform.h"
20 #include "third_party/WebKit/public/platform/WebCompositorSupport.h" 21 #include "third_party/WebKit/public/platform/WebCompositorSupport.h"
21 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" 22 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h"
22 #include "third_party/WebKit/public/platform/WebTaskRunner.h" 23 #include "third_party/WebKit/public/platform/WebTaskRunner.h"
23 #include "third_party/WebKit/public/platform/WebThread.h" 24 #include "third_party/WebKit/public/platform/WebThread.h"
24 #include "third_party/WebKit/public/platform/WebTraceLocation.h" 25 #include "third_party/WebKit/public/platform/WebTraceLocation.h"
25 #include "third_party/WebKit/public/web/WebFrame.h" 26 #include "third_party/WebKit/public/web/WebFrame.h"
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 202
202 bool TestPlugin::initialize(blink::WebPluginContainer* container) { 203 bool TestPlugin::initialize(blink::WebPluginContainer* container) {
203 blink::WebGraphicsContext3D::Attributes attrs; 204 blink::WebGraphicsContext3D::Attributes attrs;
204 context_ = 205 context_ =
205 blink::Platform::current()->createOffscreenGraphicsContext3D(attrs); 206 blink::Platform::current()->createOffscreenGraphicsContext3D(attrs);
206 207
207 if (!InitScene()) 208 if (!InitScene())
208 return false; 209 return false;
209 210
210 layer_ = cc::TextureLayer::CreateForMailbox( 211 layer_ = cc::TextureLayer::CreateForMailbox(
211 cc_blink::WebLayerImpl::LayerSettings(), this); 212 cc::LayerSettings(), this);
212 web_layer_ = make_scoped_ptr(new cc_blink::WebLayerImpl(layer_)); 213 web_layer_ = make_scoped_ptr(new cc_blink::WebLayerImpl(layer_));
213 container_ = container; 214 container_ = container;
214 container_->setWebLayer(web_layer_.get()); 215 container_->setWebLayer(web_layer_.get());
215 if (re_request_touch_events_) { 216 if (re_request_touch_events_) {
216 container_->requestTouchEventType( 217 container_->requestTouchEventType(
217 blink::WebPluginContainer::TouchEventRequestTypeSynthesizedMouse); 218 blink::WebPluginContainer::TouchEventRequestTypeSynthesizedMouse);
218 container_->requestTouchEventType( 219 container_->requestTouchEventType(
219 blink::WebPluginContainer::TouchEventRequestTypeRaw); 220 blink::WebPluginContainer::TouchEventRequestTypeRaw);
220 } 221 }
221 container_->requestTouchEventType(touch_event_request_); 222 container_->requestTouchEventType(touch_event_request_);
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
759 return kPluginPersistsMimeType; 760 return kPluginPersistsMimeType;
760 } 761 }
761 762
762 bool TestPlugin::IsSupportedMimeType(const blink::WebString& mime_type) { 763 bool TestPlugin::IsSupportedMimeType(const blink::WebString& mime_type) {
763 return mime_type == TestPlugin::MimeType() || 764 return mime_type == TestPlugin::MimeType() ||
764 mime_type == PluginPersistsMimeType() || 765 mime_type == PluginPersistsMimeType() ||
765 mime_type == CanCreateWithoutRendererMimeType(); 766 mime_type == CanCreateWithoutRendererMimeType();
766 } 767 }
767 768
768 } // namespace test_runner 769 } // namespace test_runner
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/chrome_restart_request.cc ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698