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 3898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3909 gfx::Rect* clip) { | 3909 gfx::Rect* clip) { |
3910 return pepper_delegate_.GetBitmapForOptimizedPluginPaint( | 3910 return pepper_delegate_.GetBitmapForOptimizedPluginPaint( |
3911 paint_bounds, dib, location, clip); | 3911 paint_bounds, dib, location, clip); |
3912 } | 3912 } |
3913 | 3913 |
3914 gfx::Point RenderView::GetScrollOffset() { | 3914 gfx::Point RenderView::GetScrollOffset() { |
3915 WebSize scroll_offset = webview()->mainFrame()->scrollOffset(); | 3915 WebSize scroll_offset = webview()->mainFrame()->scrollOffset(); |
3916 return gfx::Point(scroll_offset.width, scroll_offset.height); | 3916 return gfx::Point(scroll_offset.width, scroll_offset.height); |
3917 } | 3917 } |
3918 | 3918 |
| 3919 gfx::Size RenderView::GetContentsSize() { |
| 3920 WebSize bounds = webview()->mainFrame()->contentsSize(); |
| 3921 return gfx::Size(bounds.width, bounds.height); |
| 3922 } |
| 3923 |
3919 void RenderView::OnClearFocusedNode() { | 3924 void RenderView::OnClearFocusedNode() { |
3920 if (webview()) | 3925 if (webview()) |
3921 webview()->clearFocusedNode(); | 3926 webview()->clearFocusedNode(); |
3922 } | 3927 } |
3923 | 3928 |
3924 void RenderView::OnSetBackground(const SkBitmap& background) { | 3929 void RenderView::OnSetBackground(const SkBitmap& background) { |
3925 if (webview()) | 3930 if (webview()) |
3926 webview()->setIsTransparent(!background.empty()); | 3931 webview()->setIsTransparent(!background.empty()); |
3927 | 3932 |
3928 SetBackground(background); | 3933 SetBackground(background); |
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4456 } | 4461 } |
4457 #endif | 4462 #endif |
4458 | 4463 |
4459 void RenderView::OnContextMenuClosed( | 4464 void RenderView::OnContextMenuClosed( |
4460 const webkit_glue::CustomContextMenuContext& custom_context) { | 4465 const webkit_glue::CustomContextMenuContext& custom_context) { |
4461 if (custom_context.is_pepper_menu) | 4466 if (custom_context.is_pepper_menu) |
4462 pepper_delegate_.OnContextMenuClosed(custom_context); | 4467 pepper_delegate_.OnContextMenuClosed(custom_context); |
4463 else | 4468 else |
4464 context_menu_node_.reset(); | 4469 context_menu_node_.reset(); |
4465 } | 4470 } |
OLD | NEW |