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

Side by Side Diff: content/shell/browser/shell_web_contents_view_delegate_win.cc

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 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "content/public/browser/render_frame_host.h" 8 #include "content/public/browser/render_frame_host.h"
9 #include "content/public/browser/render_process_host.h" 9 #include "content/public/browser/render_process_host.h"
10 #include "content/public/browser/render_view_host.h" 10 #include "content/public/browser/render_view_host.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 WebContents* web_contents) 65 WebContents* web_contents)
66 : web_contents_(web_contents) { 66 : web_contents_(web_contents) {
67 } 67 }
68 68
69 ShellWebContentsViewDelegate::~ShellWebContentsViewDelegate() { 69 ShellWebContentsViewDelegate::~ShellWebContentsViewDelegate() {
70 } 70 }
71 71
72 void ShellWebContentsViewDelegate::ShowContextMenu( 72 void ShellWebContentsViewDelegate::ShowContextMenu(
73 RenderFrameHost* render_frame_host, 73 RenderFrameHost* render_frame_host,
74 const ContextMenuParams& params) { 74 const ContextMenuParams& params) {
75 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 75 if (switches::IsRunLayoutTestSwitchPresent())
76 switches::kRunLayoutTest))
77 return; 76 return;
78 77
79 params_ = params; 78 params_ = params;
80 bool has_link = !params_.unfiltered_link_url.is_empty(); 79 bool has_link = !params_.unfiltered_link_url.is_empty();
81 bool has_selection = !params_.selection_text.empty(); 80 bool has_selection = !params_.selection_text.empty();
82 81
83 HMENU menu = CreateMenu(); 82 HMENU menu = CreateMenu();
84 HMENU sub_menu = CreatePopupMenu(); 83 HMENU sub_menu = CreatePopupMenu();
85 AppendMenu(menu, MF_STRING | MF_POPUP, reinterpret_cast<UINT_PTR>(sub_menu), 84 AppendMenu(menu, MF_STRING | MF_POPUP, reinterpret_cast<UINT_PTR>(sub_menu),
86 L""); 85 L"");
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 web_contents_->Focus(); 210 web_contents_->Focus();
212 break; 211 break;
213 case ShellContextMenuItemInspectId: { 212 case ShellContextMenuItemInspectId: {
214 ShellDevToolsFrontend::Show(web_contents_); 213 ShellDevToolsFrontend::Show(web_contents_);
215 break; 214 break;
216 } 215 }
217 } 216 }
218 } 217 }
219 218
220 } // namespace content 219 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/browser/shell_web_contents_view_delegate_mac.mm ('k') | content/shell/common/layout_test/layout_test_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698