| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/renderer/render_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "cc/switches.h" | 9 #include "cc/switches.h" |
| 10 #include "content/common/view_messages.h" | 10 #include "content/common/view_messages.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 void RenderViewImpl::SendUpdateFrameInfo() { | 28 void RenderViewImpl::SendUpdateFrameInfo() { |
| 29 if (CommandLine::ForCurrentProcess()->HasSwitch( | 29 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 30 cc::switches::kEnableCompositorFrameMessage)) | 30 cc::switches::kEnableCompositorFrameMessage)) |
| 31 return; | 31 return; |
| 32 | 32 |
| 33 update_frame_info_scheduled_ = false; | 33 update_frame_info_scheduled_ = false; |
| 34 | 34 |
| 35 if (!webview() || !webview()->mainFrame()) | 35 if (!webview() || !webview()->mainFrame()) |
| 36 return; | 36 return; |
| 37 | 37 |
| 38 Send(new ViewHostMsg_UpdateFrameInfo( | 38 ViewHostMsg_UpdateFrameInfo_Params params; |
| 39 routing_id_, | 39 params.scroll_offset = GetScrollOffset(); |
| 40 GetScrollOffset(), | 40 params.unused_scroll_delta = gfx::Vector2d(); |
| 41 webview()->pageScaleFactor(), | 41 params.page_scale_factor = webview()->pageScaleFactor(); |
| 42 webview()->minimumPageScaleFactor(), | 42 params.min_page_scale_factor = webview()->minimumPageScaleFactor(); |
| 43 webview()->maximumPageScaleFactor(), | 43 params.max_page_scale_factor = webview()->maximumPageScaleFactor(); |
| 44 gfx::Size(webview()->mainFrame()->contentsSize()))); | 44 params.content_size = gfx::Size(webview()->mainFrame()->contentsSize()); |
| 45 |
| 46 Send(new ViewHostMsg_UpdateFrameInfo(routing_id_, params)); |
| 45 } | 47 } |
| 46 | 48 |
| 47 } // namespace content | 49 } // namespace content |
| OLD | NEW |