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 #ifndef ASH_HOST_REMOTE_WINDOW_TREE_HOST_WIN_H_ | 5 #ifndef ASH_HOST_REMOTE_WINDOW_TREE_HOST_WIN_H_ |
6 #define ASH_HOST_REMOTE_WINDOW_TREE_HOST_WIN_H_ | 6 #define ASH_HOST_REMOTE_WINDOW_TREE_HOST_WIN_H_ |
7 | 7 |
| 8 #include <windows.h> |
| 9 |
8 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
9 #include "ash/host/ash_window_tree_host.h" | 11 #include "ash/host/ash_window_tree_host.h" |
10 #include "ash/host/transformer_helper.h" | 12 #include "ash/host/transformer_helper.h" |
11 #include "ui/aura/remote_window_tree_host_win.h" | 13 #include "ui/aura/remote_window_tree_host_win.h" |
12 | 14 |
13 namespace ash { | 15 namespace ash { |
14 | 16 |
15 class ASH_EXPORT AshRemoteWindowTreeHostWin | 17 class ASH_EXPORT AshRemoteWindowTreeHostWin |
16 : public AshWindowTreeHost, | 18 : public AshWindowTreeHost, |
17 public aura::RemoteWindowTreeHostWin { | 19 public aura::RemoteWindowTreeHostWin { |
18 public: | 20 public: |
19 // Creates an instance of AshRemoteWindowTreeHostWin | 21 explicit AshRemoteWindowTreeHostWin(HWND remote_hwnd); |
20 // and sets it to RemoteWindowTreeHostWin::SetInstance. | |
21 static void Init(); | |
22 | |
23 // Returns the instance created in Init() method above. | |
24 // This also performs an extra check if the instance is same | |
25 // one that aura::RemoteWindowTreeHostWin::Instance() returns. | |
26 static AshRemoteWindowTreeHostWin* GetInstance(); | |
27 | 22 |
28 private: | 23 private: |
29 AshRemoteWindowTreeHostWin(); | |
30 virtual ~AshRemoteWindowTreeHostWin(); | 24 virtual ~AshRemoteWindowTreeHostWin(); |
31 | 25 |
32 // AshWindowTreeHost: | 26 // AshWindowTreeHost: |
33 virtual void ToggleFullScreen() OVERRIDE; | 27 virtual void ToggleFullScreen() OVERRIDE; |
34 virtual bool ConfineCursorToRootWindow() OVERRIDE; | 28 virtual bool ConfineCursorToRootWindow() OVERRIDE; |
35 virtual void UnConfineCursor() OVERRIDE; | 29 virtual void UnConfineCursor() OVERRIDE; |
36 virtual void SetRootWindowTransformer( | 30 virtual void SetRootWindowTransformer( |
37 scoped_ptr<RootWindowTransformer> transformer) OVERRIDE; | 31 scoped_ptr<RootWindowTransformer> transformer) OVERRIDE; |
38 virtual gfx::Insets GetHostInsets() const OVERRIDE; | 32 virtual gfx::Insets GetHostInsets() const OVERRIDE; |
39 virtual aura::WindowTreeHost* AsWindowTreeHost() OVERRIDE; | 33 virtual aura::WindowTreeHost* AsWindowTreeHost() OVERRIDE; |
40 | 34 |
41 // WindowTreeHostWin: | 35 // WindowTreeHostWin: |
42 virtual gfx::Transform GetRootTransform() const OVERRIDE; | 36 virtual gfx::Transform GetRootTransform() const OVERRIDE; |
43 virtual void SetRootTransform(const gfx::Transform& transform) OVERRIDE; | 37 virtual void SetRootTransform(const gfx::Transform& transform) OVERRIDE; |
44 virtual gfx::Transform GetInverseRootTransform() const OVERRIDE; | 38 virtual gfx::Transform GetInverseRootTransform() const OVERRIDE; |
45 virtual void UpdateRootWindowSize(const gfx::Size& host_size) OVERRIDE; | 39 virtual void UpdateRootWindowSize(const gfx::Size& host_size) OVERRIDE; |
46 | 40 |
47 TransformerHelper transformer_helper_; | 41 TransformerHelper transformer_helper_; |
48 | 42 |
49 DISALLOW_COPY_AND_ASSIGN(AshRemoteWindowTreeHostWin); | 43 DISALLOW_COPY_AND_ASSIGN(AshRemoteWindowTreeHostWin); |
50 }; | 44 }; |
51 | 45 |
52 } // namespace ash | 46 } // namespace ash |
53 | 47 |
54 #endif // ASH_HOST_REMOTE_WINDOW_TREE_HOST_WIN_H_ | 48 #endif // ASH_HOST_REMOTE_WINDOW_TREE_HOST_WIN_H_ |
OLD | NEW |