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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 // TODO(wjmaclean) When changing the zoom of a WebView child without also |
| 203 // changing the zoom of the embedder (e.g. using WebView.setZoom()), we |
| 204 // shouldn't propagate this change in the frame rect. We need to find a way |
| 205 // to detect when this happens. |
| 206 // http://crbug.com/xxxxxx <- Don't land without filing this bug. |
202 if (!frame_rect.size().IsEmpty()) | 207 if (!frame_rect.size().IsEmpty()) |
203 SetRect(frame_rect); | 208 SetRect(frame_rect); |
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 |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |
OLD | NEW |