| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 MASH_SIMPLE_WM_SIMPLE_WM_H_ | 5 #ifndef MASH_SIMPLE_WM_SIMPLE_WM_H_ |
| 6 #define MASH_SIMPLE_WM_SIMPLE_WM_H_ | 6 #define MASH_SIMPLE_WM_SIMPLE_WM_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 namespace simple_wm { | 40 namespace simple_wm { |
| 41 | 41 |
| 42 class SimpleWM : public service_manager::Service, | 42 class SimpleWM : public service_manager::Service, |
| 43 public aura::WindowTreeClientDelegate, | 43 public aura::WindowTreeClientDelegate, |
| 44 public aura::WindowManagerDelegate { | 44 public aura::WindowManagerDelegate { |
| 45 public: | 45 public: |
| 46 SimpleWM(); | 46 SimpleWM(); |
| 47 ~SimpleWM() override; | 47 ~SimpleWM() override; |
| 48 | 48 |
| 49 private: | 49 private: |
| 50 class DisplayLayoutManager; |
| 50 class FrameView; | 51 class FrameView; |
| 52 class WindowListModel; |
| 53 class WindowListModelObserver; |
| 54 class WindowListView; |
| 51 | 55 |
| 52 // service_manager::Service: | 56 // service_manager::Service: |
| 53 void OnStart() override; | 57 void OnStart() override; |
| 54 bool OnConnect(const service_manager::ServiceInfo& remote_info, | 58 bool OnConnect(const service_manager::ServiceInfo& remote_info, |
| 55 service_manager::InterfaceRegistry* registry) override; | 59 service_manager::InterfaceRegistry* registry) override; |
| 56 | 60 |
| 57 // aura::WindowTreeClientDelegate: | 61 // aura::WindowTreeClientDelegate: |
| 58 void OnEmbed( | 62 void OnEmbed( |
| 59 std::unique_ptr<aura::WindowTreeHostMus> window_tree_host) override; | 63 std::unique_ptr<aura::WindowTreeHostMus> window_tree_host) override; |
| 60 void OnLostConnection(aura::WindowTreeClient* client) override; | 64 void OnLostConnection(aura::WindowTreeClient* client) override; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 86 const gfx::Point& cursor_location, | 90 const gfx::Point& cursor_location, |
| 87 const base::Callback<void(bool)>& on_done) override; | 91 const base::Callback<void(bool)>& on_done) override; |
| 88 void OnWmCancelMoveLoop(aura::Window* window) override; | 92 void OnWmCancelMoveLoop(aura::Window* window) override; |
| 89 void OnWmSetClientArea( | 93 void OnWmSetClientArea( |
| 90 aura::Window* window, | 94 aura::Window* window, |
| 91 const gfx::Insets& insets, | 95 const gfx::Insets& insets, |
| 92 const std::vector<gfx::Rect>& additional_client_areas) override; | 96 const std::vector<gfx::Rect>& additional_client_areas) override; |
| 93 | 97 |
| 94 FrameView* GetFrameViewForClientWindow(aura::Window* client_window); | 98 FrameView* GetFrameViewForClientWindow(aura::Window* client_window); |
| 95 | 99 |
| 100 void OnWindowListViewItemActivated(aura::Window* index); |
| 101 |
| 96 std::unique_ptr<views::AuraInit> aura_init_; | 102 std::unique_ptr<views::AuraInit> aura_init_; |
| 97 ::wm::WMState wm_state_; | 103 ::wm::WMState wm_state_; |
| 98 std::unique_ptr<display::ScreenBase> screen_; | 104 std::unique_ptr<display::ScreenBase> screen_; |
| 99 aura::PropertyConverter property_converter_; | 105 aura::PropertyConverter property_converter_; |
| 100 aura::test::TestFocusClient focus_client_; | 106 aura::test::TestFocusClient focus_client_; |
| 101 std::unique_ptr<aura::WindowTreeHostMus> window_tree_host_; | 107 std::unique_ptr<aura::WindowTreeHostMus> window_tree_host_; |
| 102 aura::Window* root_ = nullptr; | 108 aura::Window* display_root_ = nullptr; |
| 109 aura::Window* window_root_ = nullptr; |
| 103 aura::WindowManagerClient* window_manager_client_ = nullptr; | 110 aura::WindowManagerClient* window_manager_client_ = nullptr; |
| 104 std::unique_ptr<aura::WindowTreeClient> window_tree_client_; | 111 std::unique_ptr<aura::WindowTreeClient> window_tree_client_; |
| 105 std::unique_ptr<ui::GpuService> gpu_service_; | 112 std::unique_ptr<ui::GpuService> gpu_service_; |
| 106 std::unique_ptr<aura::MusContextFactory> compositor_context_factory_; | 113 std::unique_ptr<aura::MusContextFactory> compositor_context_factory_; |
| 107 std::map<aura::Window*, FrameView*> client_window_to_frame_view_; | 114 std::map<aura::Window*, FrameView*> client_window_to_frame_view_; |
| 115 std::unique_ptr<WindowListModel> window_list_model_; |
| 108 | 116 |
| 109 bool started_ = false; | 117 bool started_ = false; |
| 110 | 118 |
| 111 DISALLOW_COPY_AND_ASSIGN(SimpleWM); | 119 DISALLOW_COPY_AND_ASSIGN(SimpleWM); |
| 112 }; | 120 }; |
| 113 | 121 |
| 114 } // namespace simple_wm | 122 } // namespace simple_wm |
| 115 | 123 |
| 116 #endif // MASH_SIMPLE_WM_SIMPLE_WM_H_ | 124 #endif // MASH_SIMPLE_WM_SIMPLE_WM_H_ |
| OLD | NEW |