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

Side by Side Diff: content/renderer/browser_plugin/browser_plugin.cc

Issue 1958903005: Fix positioning of Browser Plugins (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix positioning problem and update test Created 4 years, 7 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 <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 delegate_->Ready(); 375 delegate_->Ready();
376 ready_ = true; 376 ready_ = true;
377 } 377 }
378 378
379 if (delegate_ && (view_rect_.size() != old_view_rect.size())) 379 if (delegate_ && (view_rect_.size() != old_view_rect.size()))
380 delegate_->DidResizeElement(view_rect_.size()); 380 delegate_->DidResizeElement(view_rect_.size());
381 381
382 if (!attached()) 382 if (!attached())
383 return; 383 return;
384 384
385 if (old_view_rect.size() == view_rect_.size()) { 385 if (old_view_rect != view_rect_) {
Stephen Chennney 2016/05/10 18:40:23 This very odd condition is a remnant of https://ch
lazyboy 2016/05/10 20:51:58 Which change was that? which are wasteful. The in
386 // Let the browser know about the updated view rect. 386 // Let the browser know about the updated view rect.
387 BrowserPluginManager::Get()->Send(new BrowserPluginHostMsg_UpdateGeometry( 387 BrowserPluginManager::Get()->Send(new BrowserPluginHostMsg_UpdateGeometry(
388 browser_plugin_instance_id_, view_rect_)); 388 browser_plugin_instance_id_, view_rect_));
389 return; 389 return;
390 } 390 }
391 } 391 }
392 392
393 void BrowserPlugin::updateFocus(bool focused, blink::WebFocusType focus_type) { 393 void BrowserPlugin::updateFocus(bool focused, blink::WebFocusType focus_type) {
394 plugin_focused_ = focused; 394 plugin_focused_ = focused;
395 UpdateGuestFocusState(focus_type); 395 UpdateGuestFocusState(focus_type);
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 567
568 bool BrowserPlugin::HandleMouseLockedInputEvent( 568 bool BrowserPlugin::HandleMouseLockedInputEvent(
569 const blink::WebMouseEvent& event) { 569 const blink::WebMouseEvent& event) {
570 BrowserPluginManager::Get()->Send( 570 BrowserPluginManager::Get()->Send(
571 new BrowserPluginHostMsg_HandleInputEvent(browser_plugin_instance_id_, 571 new BrowserPluginHostMsg_HandleInputEvent(browser_plugin_instance_id_,
572 &event)); 572 &event));
573 return true; 573 return true;
574 } 574 }
575 575
576 } // namespace content 576 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698