| 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> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 namespace client { | 26 namespace client { |
| 27 class ScreenPositionClient; | 27 class ScreenPositionClient; |
| 28 } | 28 } |
| 29 } | 29 } |
| 30 | 30 |
| 31 namespace display { | 31 namespace display { |
| 32 class Display; | 32 class Display; |
| 33 } | 33 } |
| 34 | 34 |
| 35 namespace ui { | 35 namespace ui { |
| 36 class DisplayInfo; |
| 36 class Reflector; | 37 class Reflector; |
| 37 } | 38 } |
| 38 | 39 |
| 39 namespace ash { | 40 namespace ash { |
| 40 class AshWindowTreeHost; | 41 class AshWindowTreeHost; |
| 41 class DisplayInfo; | |
| 42 class RootWindowTransformer; | 42 class RootWindowTransformer; |
| 43 | 43 |
| 44 namespace test { | 44 namespace test { |
| 45 class MirrorWindowTestApi; | 45 class MirrorWindowTestApi; |
| 46 } | 46 } |
| 47 | 47 |
| 48 // An object that copies the content of the primary root window to a | 48 // An object that copies the content of the primary root window to a |
| 49 // mirror window. This also draws a mouse cursor as the mouse cursor | 49 // mirror window. This also draws a mouse cursor as the mouse cursor |
| 50 // is typically drawn by the window system. | 50 // is typically drawn by the window system. |
| 51 class ASH_EXPORT MirrorWindowController : public aura::WindowTreeHostObserver { | 51 class ASH_EXPORT MirrorWindowController : public aura::WindowTreeHostObserver { |
| 52 public: | 52 public: |
| 53 MirrorWindowController(); | 53 MirrorWindowController(); |
| 54 ~MirrorWindowController() override; | 54 ~MirrorWindowController() override; |
| 55 | 55 |
| 56 // Updates the root window's bounds using |display_info|. | 56 // Updates the root window's bounds using |display_info|. |
| 57 // Creates the new root window if one doesn't exist. | 57 // Creates the new root window if one doesn't exist. |
| 58 void UpdateWindow(const std::vector<DisplayInfo>& display_info); | 58 void UpdateWindow(const std::vector<ui::DisplayInfo>& display_info); |
| 59 | 59 |
| 60 // Same as above, but using existing display info | 60 // Same as above, but using existing display info |
| 61 // for the mirrored display. | 61 // for the mirrored display. |
| 62 void UpdateWindow(); | 62 void UpdateWindow(); |
| 63 | 63 |
| 64 // Close the mirror window if they're not necessary any longer. | 64 // Close the mirror window if they're not necessary any longer. |
| 65 void CloseIfNotNecessary(); | 65 void CloseIfNotNecessary(); |
| 66 | 66 |
| 67 // aura::WindowTreeHostObserver overrides: | 67 // aura::WindowTreeHostObserver overrides: |
| 68 void OnHostResized(const aura::WindowTreeHost* host) override; | 68 void OnHostResized(const aura::WindowTreeHost* host) override; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 std::unique_ptr<aura::client::ScreenPositionClient> screen_position_client_; | 101 std::unique_ptr<aura::client::ScreenPositionClient> screen_position_client_; |
| 102 | 102 |
| 103 std::unique_ptr<ui::Reflector> reflector_; | 103 std::unique_ptr<ui::Reflector> reflector_; |
| 104 | 104 |
| 105 DISALLOW_COPY_AND_ASSIGN(MirrorWindowController); | 105 DISALLOW_COPY_AND_ASSIGN(MirrorWindowController); |
| 106 }; | 106 }; |
| 107 | 107 |
| 108 } // namespace ash | 108 } // namespace ash |
| 109 | 109 |
| 110 #endif // ASH_DISPLAY_MIRROR_WINDOW_CONTROLLER_H_ | 110 #endif // ASH_DISPLAY_MIRROR_WINDOW_CONTROLLER_H_ |
| OLD | NEW |