Chromium Code Reviews| Index: mojo/services/native_viewport/main.cc |
| diff --git a/mojo/services/native_viewport/main.cc b/mojo/services/native_viewport/main.cc |
| index fb150da28daed961b7aa3c6bec9f2196de998703..b726e52345ce12ace24bbec53dca9c1909aa672c 100644 |
| --- a/mojo/services/native_viewport/main.cc |
| +++ b/mojo/services/native_viewport/main.cc |
| @@ -26,6 +26,7 @@ class NativeViewportAppDelegate |
| : share_group_(new gfx::GLShareGroup), |
| mailbox_manager_(new gpu::gles2::MailboxManager), |
| is_test_(false), |
| + is_headless_(false), |
| is_initialized_(false) {} |
| virtual ~NativeViewportAppDelegate() {} |
| @@ -41,6 +42,12 @@ class NativeViewportAppDelegate |
| callback.Run(); |
| } |
| + virtual void UseHeadlessConfig( |
| + const mojo::Callback<void()>& callback) OVERRIDE { |
|
jamesr
2014/09/25 22:18:14
this code is in namespace mojo, no need to specify
|
| + app_delegate_->is_headless_ = true; |
| + callback.Run(); |
| + } |
| + |
| private: |
| NativeViewportAppDelegate* app_delegate_; |
| }; |
| @@ -70,7 +77,7 @@ class NativeViewportAppDelegate |
| is_initialized_ = true; |
| } |
| #endif |
| - BindToRequest(new NativeViewportImpl(app_), &request); |
| + BindToRequest(new NativeViewportImpl(app_, is_headless_), &request); |
| } |
| // InterfaceFactory<Gpu> implementation. |
| @@ -90,6 +97,7 @@ class NativeViewportAppDelegate |
| scoped_refptr<gfx::GLShareGroup> share_group_; |
| scoped_refptr<gpu::gles2::MailboxManager> mailbox_manager_; |
| bool is_test_; |
| + bool is_headless_; |
| bool is_initialized_; |
| DISALLOW_COPY_AND_ASSIGN(NativeViewportAppDelegate); |
| }; |