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

Side by Side Diff: content/browser/frame_host/cross_process_frame_connector.cc

Issue 1804023002: Fix page zoom to be frame-centric for out-of-process frames. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test compile. Created 4 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/browser/frame_host/cross_process_frame_connector.h" 5 #include "content/browser/frame_host/cross_process_frame_connector.h"
6 6
7 #include "cc/surfaces/surface.h" 7 #include "cc/surfaces/surface.h"
8 #include "cc/surfaces/surface_manager.h" 8 #include "cc/surfaces/surface_manager.h"
9 #include "content/browser/compositor/surface_utils.h" 9 #include "content/browser/compositor/surface_utils.h"
10 #include "content/browser/frame_host/frame_tree.h" 10 #include "content/browser/frame_host/frame_tree.h"
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 192
193 if (event->type == blink::WebInputEvent::MouseWheel) { 193 if (event->type == blink::WebInputEvent::MouseWheel) {
194 view_->ProcessMouseWheelEvent( 194 view_->ProcessMouseWheelEvent(
195 *static_cast<const blink::WebMouseWheelEvent*>(event)); 195 *static_cast<const blink::WebMouseWheelEvent*>(event));
196 return; 196 return;
197 } 197 }
198 } 198 }
199 199
200 void CrossProcessFrameConnector::OnFrameRectChanged( 200 void CrossProcessFrameConnector::OnFrameRectChanged(
201 const gfx::Rect& frame_rect) { 201 const gfx::Rect& frame_rect) {
202 if (!frame_rect.size().IsEmpty()) 202 // Don't propagate these messages to WebViews.
203 if (!frame_rect.size().IsEmpty() &&
204 !frame_proxy_in_parent_renderer_->frame_tree_node()
205 ->render_manager()
206 ->ForInnerDelegate()) {
203 SetRect(frame_rect); 207 SetRect(frame_rect);
208 }
204 } 209 }
205 210
206 void CrossProcessFrameConnector::OnVisibilityChanged(bool visible) { 211 void CrossProcessFrameConnector::OnVisibilityChanged(bool visible) {
207 if (!view_) 212 if (!view_)
208 return; 213 return;
209 214
210 // If there is an inner WebContents, it should be notified of the change in 215 // If there is an inner WebContents, it should be notified of the change in
211 // the visibility. The Show/Hide methods will not be called if an inner 216 // the visibility. The Show/Hide methods will not be called if an inner
212 // WebContents exists since the corresponding WebContents will itself call 217 // WebContents exists since the corresponding WebContents will itself call
213 // Show/Hide on all the RenderWidgetHostViews (including this) one. 218 // Show/Hide on all the RenderWidgetHostViews (including this) one.
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 296
292 if (parent) { 297 if (parent) {
293 return static_cast<RenderWidgetHostViewBase*>( 298 return static_cast<RenderWidgetHostViewBase*>(
294 parent->current_frame_host()->GetView()); 299 parent->current_frame_host()->GetView());
295 } 300 }
296 301
297 return nullptr; 302 return nullptr;
298 } 303 }
299 304
300 } // namespace content 305 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698