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 981 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
992 } | 992 } |
993 | 993 |
994 void RenderView::OnSetInitialFocus(bool reverse) { | 994 void RenderView::OnSetInitialFocus(bool reverse) { |
995 if (!webview()) | 995 if (!webview()) |
996 return; | 996 return; |
997 webview()->setInitialFocus(reverse); | 997 webview()->setInitialFocus(reverse); |
998 } | 998 } |
999 | 999 |
1000 #if defined(OS_MACOSX) | 1000 #if defined(OS_MACOSX) |
1001 void RenderView::OnSetInLiveResize(bool in_live_resize) { | 1001 void RenderView::OnSetInLiveResize(bool in_live_resize) { |
1002 if (!webview()) | 1002 if (!webview()) |
1003 return; | 1003 return; |
1004 if (in_live_resize) | 1004 if (in_live_resize) |
1005 webview()->willStartLiveResize(); | 1005 webview()->willStartLiveResize(); |
1006 else | 1006 else |
1007 webview()->willEndLiveResize(); | 1007 webview()->willEndLiveResize(); |
1008 } | 1008 } |
1009 #endif | 1009 #endif |
1010 | 1010 |
1011 void RenderView::OnScrollFocusedEditableNodeIntoView() { | 1011 void RenderView::OnScrollFocusedEditableNodeIntoView() { |
1012 WebKit::WebNode node = GetFocusedNode(); | 1012 WebKit::WebNode node = GetFocusedNode(); |
1013 if (!node.isNull()) { | 1013 if (!node.isNull()) { |
1014 if (IsEditableNode(node)) | 1014 if (IsEditableNode(node)) |
1015 // TODO(varunjain): Change webkit API to scroll a particular node into | 1015 // TODO(varunjain): Change webkit API to scroll a particular node into |
1016 // view and use that API here instead. | 1016 // view and use that API here instead. |
1017 webview()->scrollFocusedNodeIntoView(); | 1017 webview()->scrollFocusedNodeIntoView(); |
(...skipping 3438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4456 } | 4456 } |
4457 #endif | 4457 #endif |
4458 | 4458 |
4459 void RenderView::OnContextMenuClosed( | 4459 void RenderView::OnContextMenuClosed( |
4460 const webkit_glue::CustomContextMenuContext& custom_context) { | 4460 const webkit_glue::CustomContextMenuContext& custom_context) { |
4461 if (custom_context.is_pepper_menu) | 4461 if (custom_context.is_pepper_menu) |
4462 pepper_delegate_.OnContextMenuClosed(custom_context); | 4462 pepper_delegate_.OnContextMenuClosed(custom_context); |
4463 else | 4463 else |
4464 context_menu_node_.reset(); | 4464 context_menu_node_.reset(); |
4465 } | 4465 } |
OLD | NEW |