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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 | 188 |
189 if (event->type == blink::WebInputEvent::MouseWheel) { | 189 if (event->type == blink::WebInputEvent::MouseWheel) { |
190 view_->ProcessMouseWheelEvent( | 190 view_->ProcessMouseWheelEvent( |
191 *static_cast<const blink::WebMouseWheelEvent*>(event)); | 191 *static_cast<const blink::WebMouseWheelEvent*>(event)); |
192 return; | 192 return; |
193 } | 193 } |
194 } | 194 } |
195 | 195 |
196 void CrossProcessFrameConnector::OnFrameRectChanged( | 196 void CrossProcessFrameConnector::OnFrameRectChanged( |
197 const gfx::Rect& frame_rect) { | 197 const gfx::Rect& frame_rect) { |
| 198 // TODO(wjmaclean) When changing the zoom of a WebView child without also |
| 199 // changing the zoom of the embedder (e.g. using WebView.setZoom()), we |
| 200 // shouldn't propagate this change in the frame rect. We need to find a way |
| 201 // to detect when this happens. http://crbug.com/607978 |
198 if (!frame_rect.size().IsEmpty()) | 202 if (!frame_rect.size().IsEmpty()) |
199 SetRect(frame_rect); | 203 SetRect(frame_rect); |
200 } | 204 } |
201 | 205 |
202 void CrossProcessFrameConnector::OnVisibilityChanged(bool visible) { | 206 void CrossProcessFrameConnector::OnVisibilityChanged(bool visible) { |
203 if (!view_) | 207 if (!view_) |
204 return; | 208 return; |
205 | 209 |
206 // If there is an inner WebContents, it should be notified of the change in | 210 // If there is an inner WebContents, it should be notified of the change in |
207 // the visibility. The Show/Hide methods will not be called if an inner | 211 // 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... |
287 | 291 |
288 if (parent) { | 292 if (parent) { |
289 return static_cast<RenderWidgetHostViewBase*>( | 293 return static_cast<RenderWidgetHostViewBase*>( |
290 parent->current_frame_host()->GetView()); | 294 parent->current_frame_host()->GetView()); |
291 } | 295 } |
292 | 296 |
293 return nullptr; | 297 return nullptr; |
294 } | 298 } |
295 | 299 |
296 } // namespace content | 300 } // namespace content |
OLD | NEW |