| OLD | NEW |
| 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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 | 223 |
| 224 if (event->type == blink::WebInputEvent::MouseWheel) { | 224 if (event->type == blink::WebInputEvent::MouseWheel) { |
| 225 view_->ProcessMouseWheelEvent( | 225 view_->ProcessMouseWheelEvent( |
| 226 *static_cast<const blink::WebMouseWheelEvent*>(event)); | 226 *static_cast<const blink::WebMouseWheelEvent*>(event)); |
| 227 return; | 227 return; |
| 228 } | 228 } |
| 229 } | 229 } |
| 230 | 230 |
| 231 void CrossProcessFrameConnector::OnFrameRectChanged( | 231 void CrossProcessFrameConnector::OnFrameRectChanged( |
| 232 const gfx::Rect& frame_rect) { | 232 const gfx::Rect& frame_rect) { |
| 233 // TODO(wjmaclean) When changing the zoom of a WebView child without also | |
| 234 // changing the zoom of the embedder (e.g. using WebView.setZoom()), we | |
| 235 // shouldn't propagate this change in the frame rect. We need to find a way | |
| 236 // to detect when this happens. http://crbug.com/607978 | |
| 237 if (!frame_rect.size().IsEmpty()) | 233 if (!frame_rect.size().IsEmpty()) |
| 238 SetRect(frame_rect); | 234 SetRect(frame_rect); |
| 239 } | 235 } |
| 240 | 236 |
| 241 void CrossProcessFrameConnector::OnVisibilityChanged(bool visible) { | 237 void CrossProcessFrameConnector::OnVisibilityChanged(bool visible) { |
| 242 if (!view_) | 238 if (!view_) |
| 243 return; | 239 return; |
| 244 | 240 |
| 245 // If there is an inner WebContents, it should be notified of the change in | 241 // If there is an inner WebContents, it should be notified of the change in |
| 246 // the visibility. The Show/Hide methods will not be called if an inner | 242 // the visibility. The Show/Hide methods will not be called if an inner |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 | 322 |
| 327 if (parent) { | 323 if (parent) { |
| 328 return static_cast<RenderWidgetHostViewBase*>( | 324 return static_cast<RenderWidgetHostViewBase*>( |
| 329 parent->current_frame_host()->GetView()); | 325 parent->current_frame_host()->GetView()); |
| 330 } | 326 } |
| 331 | 327 |
| 332 return nullptr; | 328 return nullptr; |
| 333 } | 329 } |
| 334 | 330 |
| 335 } // namespace content | 331 } // namespace content |
| OLD | NEW |