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

Unified Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 148613008: [Aura] RenderWidgetHostViewAura fixes for embedding fullscreen views within browser tabs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_view_aura.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index 3e4c1ca5a68af97e127f85841fdc0a5ba4c9aa27..4564f7d37fcfd2b408c293be12477004a840b643 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -2561,11 +2561,12 @@ gfx::Size RenderWidgetHostViewAura::GetMaximumSize() const {
void RenderWidgetHostViewAura::OnBoundsChanged(const gfx::Rect& old_bounds,
const gfx::Rect& new_bounds) {
base::AutoReset<bool> in_bounds_changed(&in_bounds_changed_, true);
- // We care about this only in fullscreen mode, where there is no
- // WebContentsViewAura. We are sized via SetSize() or SetBounds() by
- // WebContentsViewAura in other cases.
- if (is_fullscreen_)
- SetSize(new_bounds.size());
+ // We care about this whenever RenderWidgetHostViewAura is not owned by a
+ // WebContentsViewAura since changes to the Window's bounds need to be
+ // messaged to the renderer. WebContentsViewAura invokes SetSize() or
+ // SetBounds() itself. No matter how we got here, any redundant calls are
+ // harmless.
+ SetSize(new_bounds.size());
}
gfx::NativeCursor RenderWidgetHostViewAura::GetCursor(const gfx::Point& point) {
@@ -2912,14 +2913,17 @@ void RenderWidgetHostViewAura::OnMouseEvent(ui::MouseEvent* event) {
break;
}
- // Needed to propagate mouse event to native_tab_contents_view_aura.
+ // Needed to propagate mouse event to |window_->parent()->delegate()|, but
+ // note that it might be something other than a WebContentsViewAura instance.
// TODO(pkotwicz): Find a better way of doing this.
// In fullscreen mode which is typically used by flash, don't forward
// the mouse events to the parent. The renderer and the plugin process
// handle these events.
if (!is_fullscreen_ && window_->parent()->delegate() &&
- !(event->flags() & ui::EF_FROM_TOUCH))
+ !(event->flags() & ui::EF_FROM_TOUCH)) {
+ event->ConvertLocationToTarget(window_, window_->parent());
window_->parent()->delegate()->OnMouseEvent(event);
+ }
if (!IsXButtonUpEvent(event))
event->SetHandled();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698