OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 UI_VIEWS_MUS_NATIVE_WIDGET_MUS_H_ | 5 #ifndef UI_VIEWS_MUS_NATIVE_WIDGET_MUS_H_ |
6 #define UI_VIEWS_MUS_NATIVE_WIDGET_MUS_H_ | 6 #define UI_VIEWS_MUS_NATIVE_WIDGET_MUS_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 | 66 |
67 // Configures the set of properties supplied to the window manager when | 67 // Configures the set of properties supplied to the window manager when |
68 // creating a new Window for a Widget. | 68 // creating a new Window for a Widget. |
69 static void ConfigurePropertiesForNewWindow( | 69 static void ConfigurePropertiesForNewWindow( |
70 const Widget::InitParams& init_params, | 70 const Widget::InitParams& init_params, |
71 std::map<std::string, std::vector<uint8_t>>* properties); | 71 std::map<std::string, std::vector<uint8_t>>* properties); |
72 | 72 |
73 // Notifies all widgets the frame constants changed in some way. | 73 // Notifies all widgets the frame constants changed in some way. |
74 static void NotifyFrameChanged(mus::WindowTreeConnection* connection); | 74 static void NotifyFrameChanged(mus::WindowTreeConnection* connection); |
75 | 75 |
| 76 // Returns the widget for a mus::Window, or null if there is none. |
| 77 static Widget* GetWidgetForWindow(mus::Window* window); |
| 78 |
76 mus::Window* window() { return window_; } | 79 mus::Window* window() { return window_; } |
77 WindowTreeHostMus* window_tree_host() { return window_tree_host_.get(); } | 80 WindowTreeHostMus* window_tree_host() { return window_tree_host_.get(); } |
78 | 81 |
79 aura::Window* GetRootWindow(); | 82 aura::Window* GetRootWindow(); |
80 | 83 |
81 void OnPlatformWindowClosed(); | 84 void OnPlatformWindowClosed(); |
82 void OnActivationChanged(bool active); | 85 void OnActivationChanged(bool active); |
83 | 86 |
84 protected: | 87 protected: |
85 // Updates the client area in the mus::Window. | 88 // Updates the client area in the mus::Window. |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 std::unique_ptr<aura::client::ScreenPositionClient> screen_position_client_; | 235 std::unique_ptr<aura::client::ScreenPositionClient> screen_position_client_; |
233 std::unique_ptr<wm::CursorManager> cursor_manager_; | 236 std::unique_ptr<wm::CursorManager> cursor_manager_; |
234 base::WeakPtrFactory<NativeWidgetMus> close_widget_factory_; | 237 base::WeakPtrFactory<NativeWidgetMus> close_widget_factory_; |
235 | 238 |
236 DISALLOW_COPY_AND_ASSIGN(NativeWidgetMus); | 239 DISALLOW_COPY_AND_ASSIGN(NativeWidgetMus); |
237 }; | 240 }; |
238 | 241 |
239 } // namespace views | 242 } // namespace views |
240 | 243 |
241 #endif // UI_VIEWS_MUS_NATIVE_WIDGET_MUS_H_ | 244 #endif // UI_VIEWS_MUS_NATIVE_WIDGET_MUS_H_ |
OLD | NEW |