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

Side by Side Diff: content/shell/browser/layout_test/layout_test_content_browser_client.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/layout_test/layout_test_content_browser_client.h " 5 #include "content/shell/browser/layout_test/layout_test_content_browser_client.h "
6 6
7 #include "content/public/browser/browser_context.h" 7 #include "content/public/browser/browser_context.h"
8 #include "content/public/browser/browser_thread.h" 8 #include "content/public/browser/browser_thread.h"
9 #include "content/public/browser/navigator_connect_context.h" 9 #include "content/public/browser/navigator_connect_context.h"
10 #include "content/public/browser/render_process_host.h" 10 #include "content/public/browser/render_process_host.h"
11 #include "content/public/browser/resource_dispatcher_host.h" 11 #include "content/public/browser/resource_dispatcher_host.h"
12 #include "content/public/browser/storage_partition.h" 12 #include "content/public/browser/storage_partition.h"
13 #include "content/shell/browser/layout_test/blink_test_controller.h" 13 #include "content/shell/browser/layout_test/blink_test_controller.h"
14 #include "content/shell/browser/layout_test/layout_test_browser_context.h" 14 #include "content/shell/browser/layout_test/layout_test_browser_context.h"
15 #include "content/shell/browser/layout_test/layout_test_browser_main_parts.h" 15 #include "content/shell/browser/layout_test/layout_test_browser_main_parts.h"
16 #include "content/shell/browser/layout_test/layout_test_message_filter.h" 16 #include "content/shell/browser/layout_test/layout_test_message_filter.h"
17 #include "content/shell/browser/layout_test/layout_test_navigator_connect_servic e_factory.h" 17 #include "content/shell/browser/layout_test/layout_test_navigator_connect_servic e_factory.h"
18 #include "content/shell/browser/layout_test/layout_test_notification_manager.h" 18 #include "content/shell/browser/layout_test/layout_test_notification_manager.h"
19 #include "content/shell/browser/layout_test/layout_test_resource_dispatcher_host _delegate.h" 19 #include "content/shell/browser/layout_test/layout_test_resource_dispatcher_host _delegate.h"
20 #include "content/shell/browser/shell_browser_context.h" 20 #include "content/shell/browser/shell_browser_context.h"
21 #include "content/shell/common/layout_test/layout_test_switches.h"
21 #include "content/shell/common/shell_messages.h" 22 #include "content/shell/common/shell_messages.h"
22 #include "content/shell/common/shell_switches.h"
23 #include "content/shell/renderer/layout_test/blink_test_helpers.h" 23 #include "content/shell/renderer/layout_test/blink_test_helpers.h"
24 24
25 namespace content { 25 namespace content {
26 namespace { 26 namespace {
27 27
28 LayoutTestContentBrowserClient* g_layout_test_browser_client; 28 LayoutTestContentBrowserClient* g_layout_test_browser_client;
29 29
30 } // namespace 30 } // namespace
31 31
32 LayoutTestContentBrowserClient::LayoutTestContentBrowserClient() { 32 LayoutTestContentBrowserClient::LayoutTestContentBrowserClient() {
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 ResourceDispatcherHost::Get()->SetDelegate( 82 ResourceDispatcherHost::Get()->SetDelegate(
83 resource_dispatcher_host_delegate()); 83 resource_dispatcher_host_delegate());
84 } 84 }
85 85
86 void LayoutTestContentBrowserClient::AppendExtraCommandLineSwitches( 86 void LayoutTestContentBrowserClient::AppendExtraCommandLineSwitches(
87 base::CommandLine* command_line, 87 base::CommandLine* command_line,
88 int child_process_id) { 88 int child_process_id) {
89 command_line->AppendSwitch(switches::kRunLayoutTest); 89 command_line->AppendSwitch(switches::kRunLayoutTest);
90 ShellContentBrowserClient::AppendExtraCommandLineSwitches(command_line, 90 ShellContentBrowserClient::AppendExtraCommandLineSwitches(command_line,
91 child_process_id); 91 child_process_id);
92 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
93 switches::kAlwaysUseComplexText)) {
94 command_line->AppendSwitch(switches::kAlwaysUseComplexText);
95 }
96 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
97 switches::kEnableFontAntialiasing)) {
98 command_line->AppendSwitch(switches::kEnableFontAntialiasing);
99 }
100 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
101 switches::kExposeInternalsForTesting)) {
102 command_line->AppendSwitch(switches::kExposeInternalsForTesting);
103 }
104 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
105 switches::kStableReleaseMode)) {
106 command_line->AppendSwitch(switches::kStableReleaseMode);
107 }
108 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
109 switches::kEnableLeakDetection)) {
110 command_line->AppendSwitchASCII(
111 switches::kEnableLeakDetection,
112 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
113 switches::kEnableLeakDetection));
114 }
92 } 115 }
93 116
94 BrowserMainParts* LayoutTestContentBrowserClient::CreateBrowserMainParts( 117 BrowserMainParts* LayoutTestContentBrowserClient::CreateBrowserMainParts(
95 const MainFunctionParams& parameters) { 118 const MainFunctionParams& parameters) {
96 set_browser_main_parts(new LayoutTestBrowserMainParts(parameters)); 119 set_browser_main_parts(new LayoutTestBrowserMainParts(parameters));
97 return shell_browser_main_parts(); 120 return shell_browser_main_parts();
98 } 121 }
99 122
100 PlatformNotificationService* 123 PlatformNotificationService*
101 LayoutTestContentBrowserClient::GetPlatformNotificationService() { 124 LayoutTestContentBrowserClient::GetPlatformNotificationService() {
102 return layout_test_notification_manager_.get(); 125 return layout_test_notification_manager_.get();
103 } 126 }
104 127
105 void LayoutTestContentBrowserClient::GetAdditionalNavigatorConnectServices( 128 void LayoutTestContentBrowserClient::GetAdditionalNavigatorConnectServices(
106 const scoped_refptr<NavigatorConnectContext>& context) { 129 const scoped_refptr<NavigatorConnectContext>& context) {
107 context->AddFactory( 130 context->AddFactory(
108 make_scoped_ptr(new LayoutTestNavigatorConnectServiceFactory)); 131 make_scoped_ptr(new LayoutTestNavigatorConnectServiceFactory));
109 } 132 }
110 133
111 } // namespace content 134 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/browser/layout_test/layout_test_browser_main.cc ('k') | content/shell/browser/shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698