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 ASH_DISPLAY_MIRROR_WINDOW_CONTROLLER_H_ | 5 #ifndef ASH_DISPLAY_MIRROR_WINDOW_CONTROLLER_H_ |
6 #define ASH_DISPLAY_MIRROR_WINDOW_CONTROLLER_H_ | 6 #define ASH_DISPLAY_MIRROR_WINDOW_CONTROLLER_H_ |
7 | 7 |
| 8 #include <stdint.h> |
| 9 |
8 #include <map> | 10 #include <map> |
9 #include <vector> | 11 #include <vector> |
10 | 12 |
11 #include "ash/ash_export.h" | 13 #include "ash/ash_export.h" |
12 #include "ash/display/display_manager.h" | 14 #include "ash/display/display_manager.h" |
13 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
| 16 #include "base/macros.h" |
14 #include "base/memory/ref_counted.h" | 17 #include "base/memory/ref_counted.h" |
15 #include "base/memory/scoped_ptr.h" | 18 #include "base/memory/scoped_ptr.h" |
16 #include "ui/aura/window.h" | 19 #include "ui/aura/window.h" |
17 #include "ui/aura/window_tree_host_observer.h" | 20 #include "ui/aura/window_tree_host_observer.h" |
18 #include "ui/gfx/geometry/size.h" | 21 #include "ui/gfx/geometry/size.h" |
19 #include "ui/gfx/native_widget_types.h" | 22 #include "ui/gfx/native_widget_types.h" |
20 | 23 |
21 namespace aura { | 24 namespace aura { |
22 class Window; | 25 class Window; |
23 namespace client { | 26 namespace client { |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 void OnHostResized(const aura::WindowTreeHost* host) override; | 68 void OnHostResized(const aura::WindowTreeHost* host) override; |
66 | 69 |
67 // Return the root window used to mirror the content. NULL if the | 70 // Return the root window used to mirror the content. NULL if the |
68 // display is not mirrored by the compositor path. | 71 // display is not mirrored by the compositor path. |
69 aura::Window* GetWindow(); | 72 aura::Window* GetWindow(); |
70 | 73 |
71 // Returns the gfx::Display for the mirroring root window. | 74 // Returns the gfx::Display for the mirroring root window. |
72 gfx::Display GetDisplayForRootWindow(const aura::Window* root) const; | 75 gfx::Display GetDisplayForRootWindow(const aura::Window* root) const; |
73 | 76 |
74 // Returns the AshWindwoTreeHost created for |display_id|. | 77 // Returns the AshWindwoTreeHost created for |display_id|. |
75 AshWindowTreeHost* GetAshWindowTreeHostForDisplayId(int64 display_id); | 78 AshWindowTreeHost* GetAshWindowTreeHostForDisplayId(int64_t display_id); |
76 | 79 |
77 // Returns all root windows hosting mirroring displays. | 80 // Returns all root windows hosting mirroring displays. |
78 aura::Window::Windows GetAllRootWindows() const; | 81 aura::Window::Windows GetAllRootWindows() const; |
79 | 82 |
80 private: | 83 private: |
81 friend class test::MirrorWindowTestApi; | 84 friend class test::MirrorWindowTestApi; |
82 | 85 |
83 struct MirroringHostInfo; | 86 struct MirroringHostInfo; |
84 | 87 |
85 // Close the mirror window. When |delay_host_deletion| is true, the window | 88 // Close the mirror window. When |delay_host_deletion| is true, the window |
(...skipping 12 matching lines...) Expand all Loading... |
98 scoped_ptr<aura::client::ScreenPositionClient> screen_position_client_; | 101 scoped_ptr<aura::client::ScreenPositionClient> screen_position_client_; |
99 | 102 |
100 scoped_ptr<ui::Reflector> reflector_; | 103 scoped_ptr<ui::Reflector> reflector_; |
101 | 104 |
102 DISALLOW_COPY_AND_ASSIGN(MirrorWindowController); | 105 DISALLOW_COPY_AND_ASSIGN(MirrorWindowController); |
103 }; | 106 }; |
104 | 107 |
105 } // namespace ash | 108 } // namespace ash |
106 | 109 |
107 #endif // ASH_DISPLAY_MIRROR_WINDOW_CONTROLLER_H_ | 110 #endif // ASH_DISPLAY_MIRROR_WINDOW_CONTROLLER_H_ |
OLD | NEW |