Index: content/browser/compositor/gpu_process_transport_factory.cc |
diff --git a/content/browser/compositor/gpu_process_transport_factory.cc b/content/browser/compositor/gpu_process_transport_factory.cc |
index 2b9cd69683d4ed6c4b9a8f643ec0d72b30c34b0c..5c08731d4fb06016c5beadb4df475f91d0646664 100644 |
--- a/content/browser/compositor/gpu_process_transport_factory.cc |
+++ b/content/browser/compositor/gpu_process_transport_factory.cc |
@@ -53,6 +53,10 @@ |
#include "ui/gfx/geometry/size.h" |
#include "ui/gfx/native_widget_types.h" |
+#if defined(MOJO_RUNNER_CLIENT) |
+#include "content/common/mojo/mojo_shell_connection_impl.h" |
+#endif |
+ |
#if defined(OS_WIN) |
#include "content/browser/compositor/software_output_device_win.h" |
#elif defined(USE_OZONE) |
@@ -150,8 +154,7 @@ scoped_ptr<cc::SoftwareOutputDevice> |
GpuProcessTransportFactory::CreateSoftwareOutputDevice( |
ui::Compositor* compositor) { |
#if defined(MOJO_RUNNER_CLIENT) |
- if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
- "mojo-platform-channel-handle")) { |
+ if (IsRunningInMojoShell()) { |
return scoped_ptr<cc::SoftwareOutputDevice>( |
new SoftwareOutputDeviceMus(compositor)); |
} |
@@ -204,9 +207,7 @@ static bool ShouldCreateGpuOutputSurface(ui::Compositor* compositor) { |
#if defined(MOJO_RUNNER_CLIENT) |
// Chrome running as a mojo app currently can only use software compositing. |
// TODO(rjkroege): http://crbug.com/548451 |
- // TODO(rjkroege): Make IsRunningInMojoRunner callable from content. |
- if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
- "mojo-platform-channel-handle")) { |
+ if (IsRunningInMojoShell()) { |
return false; |
} |
#endif |