| 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 854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 865 if (!webview()) | 865 if (!webview()) |
| 866 return; | 866 return; |
| 867 | 867 |
| 868 webview()->focusedFrame()->executeCommand(WebString::fromUTF8("Cut")); | 868 webview()->focusedFrame()->executeCommand(WebString::fromUTF8("Cut")); |
| 869 } | 869 } |
| 870 | 870 |
| 871 void RenderView::OnCopy() { | 871 void RenderView::OnCopy() { |
| 872 if (!webview()) | 872 if (!webview()) |
| 873 return; | 873 return; |
| 874 | 874 |
| 875 webview()->focusedFrame()->executeCommand(WebString::fromUTF8("Copy")); | 875 webview()->focusedFrame()->executeCommand(WebString::fromUTF8("Copy"), |
| 876 context_menu_node_); |
| 876 } | 877 } |
| 877 | 878 |
| 878 #if defined(OS_MACOSX) | 879 #if defined(OS_MACOSX) |
| 879 void RenderView::OnCopyToFindPboard() { | 880 void RenderView::OnCopyToFindPboard() { |
| 880 if (!webview()) | 881 if (!webview()) |
| 881 return; | 882 return; |
| 882 | 883 |
| 883 // Since the find pasteboard supports only plain text, this can be simpler | 884 // Since the find pasteboard supports only plain text, this can be simpler |
| 884 // than the |OnCopy()| case. | 885 // than the |OnCopy()| case. |
| 885 WebFrame* frame = webview()->focusedFrame(); | 886 WebFrame* frame = webview()->focusedFrame(); |
| (...skipping 3372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4258 const webkit_glue::CustomContextMenuContext& custom_context) { | 4259 const webkit_glue::CustomContextMenuContext& custom_context) { |
| 4259 if (custom_context.is_pepper_menu) | 4260 if (custom_context.is_pepper_menu) |
| 4260 pepper_delegate_.OnContextMenuClosed(custom_context); | 4261 pepper_delegate_.OnContextMenuClosed(custom_context); |
| 4261 else | 4262 else |
| 4262 context_menu_node_.reset(); | 4263 context_menu_node_.reset(); |
| 4263 } | 4264 } |
| 4264 | 4265 |
| 4265 void RenderView::OnNetworkStateChanged(bool online) { | 4266 void RenderView::OnNetworkStateChanged(bool online) { |
| 4266 WebNetworkStateNotifier::setOnLine(online); | 4267 WebNetworkStateNotifier::setOnLine(online); |
| 4267 } | 4268 } |
| OLD | NEW |