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

Side by Side Diff: content/renderer/browser_plugin/browser_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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/renderer/browser_plugin/browser_plugin.h" 5 #include "content/renderer/browser_plugin/browser_plugin.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 case BrowserPluginMsg_SetMouseLock::ID: 418 case BrowserPluginMsg_SetMouseLock::ID:
419 case BrowserPluginMsg_SetTooltipText::ID: 419 case BrowserPluginMsg_SetTooltipText::ID:
420 case BrowserPluginMsg_ShouldAcceptTouchEvents::ID: 420 case BrowserPluginMsg_ShouldAcceptTouchEvents::ID:
421 return true; 421 return true;
422 default: 422 default:
423 break; 423 break;
424 } 424 }
425 return false; 425 return false;
426 } 426 }
427 427
428 void BrowserPlugin::updateGeometry( 428 void BrowserPlugin::updateGeometry(const WebRect& window_rect,
429 const WebRect& window_rect, 429 const WebRect& clip_rect,
430 const WebRect& clip_rect, 430 const WebRect& unobscured_rect,
431 const WebVector<WebRect>& cut_outs_rects, 431 const WebVector<WebRect>& cut_outs_rects,
432 bool is_visible) { 432 bool is_visible) {
433 int old_width = view_rect_.width(); 433 int old_width = view_rect_.width();
434 int old_height = view_rect_.height(); 434 int old_height = view_rect_.height();
435 view_rect_ = window_rect; 435 view_rect_ = window_rect;
436 if (!ready_) { 436 if (!ready_) {
437 if (delegate_) { 437 if (delegate_) {
438 delegate_->DidResizeElement(gfx::Size(), view_rect_.size()); 438 delegate_->DidResizeElement(gfx::Size(), view_rect_.size());
439 delegate_->Ready(); 439 delegate_->Ready();
440 } 440 }
441 ready_ = true; 441 ready_ = true;
442 } 442 }
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 bool BrowserPlugin::HandleMouseLockedInputEvent( 628 bool BrowserPlugin::HandleMouseLockedInputEvent(
629 const blink::WebMouseEvent& event) { 629 const blink::WebMouseEvent& event) {
630 BrowserPluginManager::Get()->Send( 630 BrowserPluginManager::Get()->Send(
631 new BrowserPluginHostMsg_HandleInputEvent(browser_plugin_instance_id_, 631 new BrowserPluginHostMsg_HandleInputEvent(browser_plugin_instance_id_,
632 view_rect_, 632 view_rect_,
633 &event)); 633 &event));
634 return true; 634 return true;
635 } 635 }
636 636
637 } // namespace content 637 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/browser_plugin/browser_plugin.h ('k') | content/renderer/npapi/webplugin_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698