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

Side by Side Diff: content/shell/renderer/test_runner/test_plugin.cc

Issue 1023783008: Migrate plugins to support new 'unobscured' rect interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 'git cl format' Created 5 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
« no previous file with comments | « content/shell/renderer/test_runner/test_plugin.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "content/shell/renderer/test_runner/test_plugin.h" 5 #include "content/shell/renderer/test_runner/test_plugin.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/shared_memory.h" 10 #include "base/memory/shared_memory.h"
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 253
254 NPObject* TestPlugin::scriptableObject() { 254 NPObject* TestPlugin::scriptableObject() {
255 return 0; 255 return 0;
256 } 256 }
257 257
258 bool TestPlugin::canProcessDrag() const { 258 bool TestPlugin::canProcessDrag() const {
259 return can_process_drag_; 259 return can_process_drag_;
260 } 260 }
261 261
262 void TestPlugin::updateGeometry( 262 void TestPlugin::updateGeometry(
263 const blink::WebRect& frame_rect, 263 const blink::WebRect& window_rect,
264 const blink::WebRect& clip_rect, 264 const blink::WebRect& clip_rect,
265 const blink::WebRect& unobscured_rect,
265 const blink::WebVector<blink::WebRect>& cut_outs_rects, 266 const blink::WebVector<blink::WebRect>& cut_outs_rects,
266 bool is_visible) { 267 bool is_visible) {
267 if (clip_rect == rect_) 268 if (clip_rect == rect_)
268 return; 269 return;
269 rect_ = clip_rect; 270 rect_ = clip_rect;
270 271
271 if (rect_.isEmpty()) { 272 if (rect_.isEmpty()) {
272 texture_mailbox_ = cc::TextureMailbox(); 273 texture_mailbox_ = cc::TextureMailbox();
273 } else if (context_) { 274 } else if (context_) {
274 context_->viewport(0, 0, rect_.width, rect_.height); 275 context_->viewport(0, 0, rect_.width, rect_.height);
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
763 return kPluginPersistsMimeType; 764 return kPluginPersistsMimeType;
764 } 765 }
765 766
766 bool TestPlugin::IsSupportedMimeType(const blink::WebString& mime_type) { 767 bool TestPlugin::IsSupportedMimeType(const blink::WebString& mime_type) {
767 return mime_type == TestPlugin::MimeType() || 768 return mime_type == TestPlugin::MimeType() ||
768 mime_type == PluginPersistsMimeType() || 769 mime_type == PluginPersistsMimeType() ||
769 mime_type == CanCreateWithoutRendererMimeType(); 770 mime_type == CanCreateWithoutRendererMimeType();
770 } 771 }
771 772
772 } // namespace content 773 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/renderer/test_runner/test_plugin.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698