OLD | NEW |
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 "ash/host/ash_window_tree_host.h" | 5 #include "ash/host/ash_window_tree_host.h" |
6 | 6 |
7 #include "ash/host/ash_window_tree_host_init_params.h" | 7 #include "ash/host/ash_window_tree_host_init_params.h" |
8 #include "ash/host/root_window_transformer.h" | 8 #include "ash/host/root_window_transformer.h" |
9 #include "ash/host/transformer_helper.h" | 9 #include "ash/host/transformer_helper.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "ui/aura/window_tree_host_ozone.h" | 11 #include "ui/aura/window_tree_host_ozone.h" |
12 #include "ui/gfx/geometry/insets.h" | 12 #include "ui/gfx/geometry/insets.h" |
13 #include "ui/gfx/transform.h" | 13 #include "ui/gfx/transform.h" |
14 | 14 |
15 namespace ash { | 15 namespace ash { |
16 namespace { | 16 namespace { |
17 | 17 |
18 class AshWindowTreeHostOzone : public AshWindowTreeHost, | 18 class AshWindowTreeHostOzone : public AshWindowTreeHost, |
19 public aura::WindowTreeHostOzone { | 19 public aura::WindowTreeHostOzone { |
20 public: | 20 public: |
21 explicit AshWindowTreeHostOzone(const gfx::Rect& initial_bounds); | 21 AshWindowTreeHostOzone(const gfx::Rect& initial_bounds, |
22 virtual ~AshWindowTreeHostOzone(); | 22 ui::ContextFactory* context_factory) |
| 23 : aura::WindowTreeHostOzone(initial_bounds, context_factory) {} |
| 24 virtual ~AshWindowTreeHostOzone() {} |
23 | 25 |
24 private: | 26 private: |
25 // AshWindowTreeHost: | 27 // AshWindowTreeHost: |
26 virtual void ToggleFullScreen() OVERRIDE; | 28 virtual void ToggleFullScreen() OVERRIDE; |
27 virtual bool ConfineCursorToRootWindow() OVERRIDE; | 29 virtual bool ConfineCursorToRootWindow() OVERRIDE; |
28 virtual void UnConfineCursor() OVERRIDE; | 30 virtual void UnConfineCursor() OVERRIDE; |
29 virtual void SetRootWindowTransformer( | 31 virtual void SetRootWindowTransformer( |
30 scoped_ptr<RootWindowTransformer> transformer) OVERRIDE; | 32 scoped_ptr<RootWindowTransformer> transformer) OVERRIDE; |
31 virtual gfx::Insets GetHostInsets() const OVERRIDE; | 33 virtual gfx::Insets GetHostInsets() const OVERRIDE; |
32 virtual aura::WindowTreeHost* AsWindowTreeHost() OVERRIDE; | 34 virtual aura::WindowTreeHost* AsWindowTreeHost() OVERRIDE; |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 } | 86 } |
85 | 87 |
86 void AshWindowTreeHostOzone::UpdateRootWindowSize(const gfx::Size& host_size) { | 88 void AshWindowTreeHostOzone::UpdateRootWindowSize(const gfx::Size& host_size) { |
87 transformer_helper_.UpdateWindowSize(host_size); | 89 transformer_helper_.UpdateWindowSize(host_size); |
88 } | 90 } |
89 | 91 |
90 } // namespace | 92 } // namespace |
91 | 93 |
92 AshWindowTreeHost* AshWindowTreeHost::Create( | 94 AshWindowTreeHost* AshWindowTreeHost::Create( |
93 const AshWindowTreeHostInitParams& init_params) { | 95 const AshWindowTreeHostInitParams& init_params) { |
94 return new AshWindowTreeHostOzone(init_params.initial_bounds); | 96 return new AshWindowTreeHostOzone(init_params.initial_bounds, |
| 97 init_params.context_factory); |
95 } | 98 } |
96 | 99 |
97 } // namespace ash | 100 } // namespace ash |
OLD | NEW |