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

Side by Side Diff: content/shell/shell_main_delegate.cc

Issue 12315103: mac content shell drt: Hook up a dummy image transport (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 7 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/shell_main_delegate.h" 5 #include "content/shell/shell_main_delegate.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
11 #include "content/common/gpu/image_transport_surface.h"
jochen (gone - plz use gerrit) 2013/02/26 14:12:07 content_shell is a content embedder and therefore
Nico 2013/02/26 14:26:52 Done. Is this automatically enforced somehow?
jochen (gone - plz use gerrit) 2013/02/26 14:35:18 sure, via include rules in the DEPS files.
11 #include "content/public/browser/browser_main_runner.h" 12 #include "content/public/browser/browser_main_runner.h"
12 #include "content/public/common/content_switches.h" 13 #include "content/public/common/content_switches.h"
13 #include "content/public/common/url_constants.h" 14 #include "content/public/common/url_constants.h"
14 #include "content/shell/shell_browser_main.h" 15 #include "content/shell/shell_browser_main.h"
15 #include "content/shell/shell_content_browser_client.h" 16 #include "content/shell/shell_content_browser_client.h"
16 #include "content/shell/shell_content_renderer_client.h" 17 #include "content/shell/shell_content_renderer_client.h"
17 #include "content/shell/shell_switches.h" 18 #include "content/shell/shell_switches.h"
18 #include "content/shell/webkit_test_platform_support.h" 19 #include "content/shell/webkit_test_platform_support.h"
19 #include "net/cookies/cookie_monster.h" 20 #include "net/cookies/cookie_monster.h"
20 #include "ui/base/resource/resource_bundle.h" 21 #include "ui/base/resource/resource_bundle.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 logging::LogEventProvider::Initialize(kContentShellProviderName); 95 logging::LogEventProvider::Initialize(kContentShellProviderName);
95 #endif 96 #endif
96 97
97 InitLogging(); 98 InitLogging();
98 CommandLine& command_line = *CommandLine::ForCurrentProcess(); 99 CommandLine& command_line = *CommandLine::ForCurrentProcess();
99 if (command_line.HasSwitch(switches::kDumpRenderTree)) { 100 if (command_line.HasSwitch(switches::kDumpRenderTree)) {
100 command_line.AppendSwitch(switches::kAllowFileAccessFromFiles); 101 command_line.AppendSwitch(switches::kAllowFileAccessFromFiles);
101 command_line.AppendSwitchASCII( 102 command_line.AppendSwitchASCII(
102 switches::kUseGL, gfx::kGLImplementationOSMesaName); 103 switches::kUseGL, gfx::kGLImplementationOSMesaName);
103 command_line.AppendSwitch(switches::kIgnoreGpuBlacklist); 104 command_line.AppendSwitch(switches::kIgnoreGpuBlacklist);
105 #if defined(OS_MACOSX)
106 ImageTransportSurface::SetAllowOSMesa(true);
107 #endif
104 command_line.AppendSwitch(switches::kEnableExperimentalWebKitFeatures); 108 command_line.AppendSwitch(switches::kEnableExperimentalWebKitFeatures);
105 command_line.AppendSwitch(switches::kEnableCssShaders); 109 command_line.AppendSwitch(switches::kEnableCssShaders);
106 command_line.AppendSwitchASCII(switches::kTouchEvents, 110 command_line.AppendSwitchASCII(switches::kTouchEvents,
107 switches::kTouchEventsEnabled); 111 switches::kTouchEventsEnabled);
108 if (command_line.HasSwitch(switches::kEnableSoftwareCompositing)) 112 if (command_line.HasSwitch(switches::kEnableSoftwareCompositing))
109 command_line.AppendSwitch(switches::kEnableSoftwareCompositingGLAdapter); 113 command_line.AppendSwitch(switches::kEnableSoftwareCompositingGLAdapter);
110 114
111 net::CookieMonster::EnableFileScheme(); 115 net::CookieMonster::EnableFileScheme();
112 if (!WebKitTestPlatformInitialize()) { 116 if (!WebKitTestPlatformInitialize()) {
113 if (exit_code) 117 if (exit_code)
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 browser_client_.reset(new ShellContentBrowserClient); 188 browser_client_.reset(new ShellContentBrowserClient);
185 return browser_client_.get(); 189 return browser_client_.get();
186 } 190 }
187 191
188 ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() { 192 ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() {
189 renderer_client_.reset(new ShellContentRendererClient); 193 renderer_client_.reset(new ShellContentRendererClient);
190 return renderer_client_.get(); 194 return renderer_client_.get();
191 } 195 }
192 196
193 } // namespace content 197 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698