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

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

Issue 1763113002: Move layout-test-specific switches from shell_switches to layout_test_switches.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-line-box-and-debug-from-flags-struct
Patch Set: Fix accidental condition reversal in Shell::ToggleFullscreenModeForTab. Created 4 years, 9 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
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_frame_host.h" 10 #include "content/public/browser/render_frame_host.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 RenderFrameHost* render_frame_host,
97 const ContextMenuParams& params) { 97 const ContextMenuParams& params) {
98 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 98 if (switches::IsRunLayoutTestSwitchPresent())
99 switches::kRunLayoutTest))
100 return; 99 return;
101 100
102 params_ = params; 101 params_ = params;
103 bool has_link = !params_.unfiltered_link_url.is_empty(); 102 bool has_link = !params_.unfiltered_link_url.is_empty();
104 bool has_selection = ! params_.selection_text.empty(); 103 bool has_selection = ! params_.selection_text.empty();
105 104
106 NSMenu* menu = [[[NSMenu alloc] initWithTitle:@""] autorelease]; 105 NSMenu* menu = [[[NSMenu alloc] initWithTitle:@""] autorelease];
107 ShellContextMenuDelegate* delegate = 106 ShellContextMenuDelegate* delegate =
108 [[ShellContextMenuDelegate alloc] initWithDelegate:this]; 107 [[ShellContextMenuDelegate alloc] initWithDelegate:this];
109 [menu setDelegate:delegate]; 108 [menu setDelegate:delegate];
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 break; 258 break;
260 } 259 }
261 case ShellContextMenuItemInspectTag: { 260 case ShellContextMenuItemInspectTag: {
262 ShellDevToolsFrontend::Show(web_contents_); 261 ShellDevToolsFrontend::Show(web_contents_);
263 break; 262 break;
264 } 263 }
265 } 264 }
266 } 265 }
267 266
268 } // namespace content 267 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/browser/shell_content_browser_client.cc ('k') | content/shell/browser/shell_web_contents_view_delegate_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698