OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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.h" | 5 #include "content/renderer/render_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 3877 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3888 gfx::Rect* clip) { | 3888 gfx::Rect* clip) { |
3889 return pepper_delegate_.GetBitmapForOptimizedPluginPaint( | 3889 return pepper_delegate_.GetBitmapForOptimizedPluginPaint( |
3890 paint_bounds, dib, location, clip); | 3890 paint_bounds, dib, location, clip); |
3891 } | 3891 } |
3892 | 3892 |
3893 gfx::Point RenderView::GetScrollOffset() { | 3893 gfx::Point RenderView::GetScrollOffset() { |
3894 WebSize scroll_offset = webview()->mainFrame()->scrollOffset(); | 3894 WebSize scroll_offset = webview()->mainFrame()->scrollOffset(); |
3895 return gfx::Point(scroll_offset.width, scroll_offset.height); | 3895 return gfx::Point(scroll_offset.width, scroll_offset.height); |
3896 } | 3896 } |
3897 | 3897 |
| 3898 gfx::Size RenderView::GetContentsSize() { |
| 3899 WebSize bounds = webview()->mainFrame()->contentsSize(); |
| 3900 return gfx::Size(bounds.width, bounds.height); |
| 3901 } |
| 3902 |
3898 void RenderView::OnClearFocusedNode() { | 3903 void RenderView::OnClearFocusedNode() { |
3899 if (webview()) | 3904 if (webview()) |
3900 webview()->clearFocusedNode(); | 3905 webview()->clearFocusedNode(); |
3901 } | 3906 } |
3902 | 3907 |
3903 void RenderView::OnSetBackground(const SkBitmap& background) { | 3908 void RenderView::OnSetBackground(const SkBitmap& background) { |
3904 if (webview()) | 3909 if (webview()) |
3905 webview()->setIsTransparent(!background.empty()); | 3910 webview()->setIsTransparent(!background.empty()); |
3906 | 3911 |
3907 SetBackground(background); | 3912 SetBackground(background); |
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4435 } | 4440 } |
4436 #endif | 4441 #endif |
4437 | 4442 |
4438 void RenderView::OnContextMenuClosed( | 4443 void RenderView::OnContextMenuClosed( |
4439 const webkit_glue::CustomContextMenuContext& custom_context) { | 4444 const webkit_glue::CustomContextMenuContext& custom_context) { |
4440 if (custom_context.is_pepper_menu) | 4445 if (custom_context.is_pepper_menu) |
4441 pepper_delegate_.OnContextMenuClosed(custom_context); | 4446 pepper_delegate_.OnContextMenuClosed(custom_context); |
4442 else | 4447 else |
4443 context_menu_node_.reset(); | 4448 context_menu_node_.reset(); |
4444 } | 4449 } |
OLD | NEW |