| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #ifndef MOJO_EXAMPLES_AURA_DEMO_ROOT_WINDOW_HOST_MOJO_H_ | 5 #ifndef MOJO_EXAMPLES_AURA_DEMO_ROOT_WINDOW_HOST_MOJO_H_ |
| 6 #define MOJO_EXAMPLES_AURA_DEMO_ROOT_WINDOW_HOST_MOJO_H_ | 6 #define MOJO_EXAMPLES_AURA_DEMO_ROOT_WINDOW_HOST_MOJO_H_ |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "mojo/public/bindings/lib/remote_ptr.h" | 9 #include "mojo/public/bindings/lib/remote_ptr.h" |
| 10 #include "mojom/native_viewport.h" | 10 #include "mojom/native_viewport.h" |
| 11 #include "ui/aura/window_tree_host.h" | 11 #include "ui/aura/window_tree_host.h" |
| 12 #include "ui/gfx/size.h" |
| 12 | 13 |
| 13 namespace ui { | 14 namespace ui { |
| 14 class ContextFactory; | 15 class ContextFactory; |
| 15 } | 16 } |
| 16 | 17 |
| 17 namespace mojo { | 18 namespace mojo { |
| 18 namespace examples { | 19 namespace examples { |
| 19 | 20 |
| 20 class GLES2ClientImpl; | 21 class GLES2ClientImpl; |
| 21 | 22 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 46 virtual bool QueryMouseLocation(gfx::Point* location_return) OVERRIDE; | 47 virtual bool QueryMouseLocation(gfx::Point* location_return) OVERRIDE; |
| 47 virtual bool ConfineCursorToRootWindow() OVERRIDE; | 48 virtual bool ConfineCursorToRootWindow() OVERRIDE; |
| 48 virtual void UnConfineCursor() OVERRIDE; | 49 virtual void UnConfineCursor() OVERRIDE; |
| 49 virtual void OnCursorVisibilityChanged(bool show) OVERRIDE; | 50 virtual void OnCursorVisibilityChanged(bool show) OVERRIDE; |
| 50 virtual void MoveCursorTo(const gfx::Point& location) OVERRIDE; | 51 virtual void MoveCursorTo(const gfx::Point& location) OVERRIDE; |
| 51 virtual void PostNativeEvent(const base::NativeEvent& native_event) OVERRIDE; | 52 virtual void PostNativeEvent(const base::NativeEvent& native_event) OVERRIDE; |
| 52 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE; | 53 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE; |
| 53 virtual void PrepareForShutdown() OVERRIDE; | 54 virtual void PrepareForShutdown() OVERRIDE; |
| 54 | 55 |
| 55 // Overridden from NativeViewportClient: | 56 // Overridden from NativeViewportClient: |
| 56 virtual void OnCreated() OVERRIDE; | 57 virtual void OnCreated(uint32_t width, uint32_t height) MOJO_OVERRIDE; |
| 57 virtual void OnDestroyed() OVERRIDE; | 58 virtual void OnDestroyed() OVERRIDE; |
| 58 virtual void OnEvent(const Event& event) OVERRIDE; | 59 virtual void OnEvent(const Event& event) OVERRIDE; |
| 59 | 60 |
| 60 void DidCreateContext(gfx::Size size); | 61 void DidCreateContext(); |
| 62 void MaybeCreateCompositor(); |
| 61 | 63 |
| 62 static ui::ContextFactory* context_factory_; | 64 static ui::ContextFactory* context_factory_; |
| 63 | 65 |
| 66 gfx::Size viewport_size_; |
| 64 scoped_ptr<GLES2ClientImpl> gles2_client_; | 67 scoped_ptr<GLES2ClientImpl> gles2_client_; |
| 68 bool context_created_; |
| 65 RemotePtr<NativeViewport> native_viewport_; | 69 RemotePtr<NativeViewport> native_viewport_; |
| 66 base::Callback<void()> compositor_created_callback_; | 70 base::Callback<void()> compositor_created_callback_; |
| 67 | 71 |
| 68 DISALLOW_COPY_AND_ASSIGN(WindowTreeHostMojo); | 72 DISALLOW_COPY_AND_ASSIGN(WindowTreeHostMojo); |
| 69 }; | 73 }; |
| 70 | 74 |
| 71 } // namespace examples | 75 } // namespace examples |
| 72 } // namespace mojo | 76 } // namespace mojo |
| 73 | 77 |
| 74 #endif // MOJO_EXAMPLES_AURA_DEMO_ROOT_WINDOW_HOST_MOJO_H_ | 78 #endif // MOJO_EXAMPLES_AURA_DEMO_ROOT_WINDOW_HOST_MOJO_H_ |
| OLD | NEW |