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

Side by Side Diff: content/shell/browser/shell_web_contents_view_delegate_mac.mm

Issue 130773004: Start moving context menu code to RenderFrame. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 6 years, 10 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/shell/browser/shell_web_contents_view_delegate.h" 5 #include "content/shell/browser/shell_web_contents_view_delegate.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "content/public/browser/render_process_host.h" 10 #include "content/public/browser/render_process_host.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 86
87 ShellWebContentsViewDelegate::ShellWebContentsViewDelegate( 87 ShellWebContentsViewDelegate::ShellWebContentsViewDelegate(
88 WebContents* web_contents) 88 WebContents* web_contents)
89 : web_contents_(web_contents) { 89 : web_contents_(web_contents) {
90 } 90 }
91 91
92 ShellWebContentsViewDelegate::~ShellWebContentsViewDelegate() { 92 ShellWebContentsViewDelegate::~ShellWebContentsViewDelegate() {
93 } 93 }
94 94
95 void ShellWebContentsViewDelegate::ShowContextMenu( 95 void ShellWebContentsViewDelegate::ShowContextMenu(
96 RenderFrameHost* render_frame_host,
96 const ContextMenuParams& params) { 97 const ContextMenuParams& params) {
97 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) 98 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree))
98 return; 99 return;
99 100
100 params_ = params; 101 params_ = params;
101 bool has_link = !params_.unfiltered_link_url.is_empty(); 102 bool has_link = !params_.unfiltered_link_url.is_empty();
102 bool has_selection = ! params_.selection_text.empty(); 103 bool has_selection = ! params_.selection_text.empty();
103 104
104 NSMenu* menu = [[[NSMenu alloc] initWithTitle:@""] autorelease]; 105 NSMenu* menu = [[[NSMenu alloc] initWithTitle:@""] autorelease];
105 ShellContextMenuDelegate* delegate = 106 ShellContextMenuDelegate* delegate =
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 return NULL; 269 return NULL;
269 } 270 }
270 271
271 NSObject<RenderWidgetHostViewMacDelegate>* 272 NSObject<RenderWidgetHostViewMacDelegate>*
272 ShellWebContentsViewDelegate::CreateRenderWidgetHostViewDelegate( 273 ShellWebContentsViewDelegate::CreateRenderWidgetHostViewDelegate(
273 content::RenderWidgetHost* render_widget_host) { 274 content::RenderWidgetHost* render_widget_host) {
274 return NULL; 275 return NULL;
275 } 276 }
276 277
277 } // namespace content 278 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698