Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(500)

Side by Side Diff: content/renderer/render_view.cc

Issue 7280001: Printing: Pass the context menu WebNode to WebFrame::executeCommand, as the (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698