| 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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 | 225 |
| 226 private: | 226 private: |
| 227 friend class NativeWidgetMusTest; | 227 friend class NativeWidgetMusTest; |
| 228 class MusWindowObserver; | 228 class MusWindowObserver; |
| 229 class MusCaptureClient; | 229 class MusCaptureClient; |
| 230 | 230 |
| 231 ui::PlatformWindowDelegate* platform_window_delegate() { | 231 ui::PlatformWindowDelegate* platform_window_delegate() { |
| 232 return window_tree_host(); | 232 return window_tree_host(); |
| 233 } | 233 } |
| 234 | 234 |
| 235 // Returns true if this NativeWidgetMus exists on the window manager side |
| 236 // to provide the frame decorations. |
| 237 bool is_parallel_widget_in_window_manager() { |
| 238 return is_parallel_widget_in_window_manager_; |
| 239 } |
| 240 |
| 235 void set_last_cursor(ui::mojom::Cursor cursor) { last_cursor_ = cursor; } | 241 void set_last_cursor(ui::mojom::Cursor cursor) { last_cursor_ = cursor; } |
| 236 void SetShowState(ui::mojom::ShowState show_state); | 242 void SetShowState(ui::mojom::ShowState show_state); |
| 237 | 243 |
| 238 void OnMusWindowVisibilityChanging(ui::Window* window); | 244 void OnMusWindowVisibilityChanging(ui::Window* window); |
| 239 void OnMusWindowVisibilityChanged(ui::Window* window); | 245 void OnMusWindowVisibilityChanged(ui::Window* window); |
| 240 | 246 |
| 241 // Propagates the widget hit test mask, if any, to the ui::Window. | 247 // Propagates the widget hit test mask, if any, to the ui::Window. |
| 242 // TODO(jamescook): Wire this through views::Widget so widgets can push | 248 // TODO(jamescook): Wire this through views::Widget so widgets can push |
| 243 // updates if needed. | 249 // updates if needed. |
| 244 void UpdateHitTestMask(); | 250 void UpdateHitTestMask(); |
| 245 | 251 |
| 246 ui::Window* window_; | 252 ui::Window* window_; |
| 247 ui::mojom::Cursor last_cursor_; | 253 ui::mojom::Cursor last_cursor_; |
| 248 | 254 |
| 249 internal::NativeWidgetDelegate* native_widget_delegate_; | 255 internal::NativeWidgetDelegate* native_widget_delegate_; |
| 250 | 256 |
| 251 const ui::mojom::SurfaceType surface_type_; | 257 const bool is_parallel_widget_in_window_manager_; |
| 252 ui::mojom::ShowState show_state_before_fullscreen_; | 258 ui::mojom::ShowState show_state_before_fullscreen_; |
| 253 | 259 |
| 254 // See class documentation for Widget in widget.h for a note about ownership. | 260 // See class documentation for Widget in widget.h for a note about ownership. |
| 255 Widget::InitParams::Ownership ownership_; | 261 Widget::InitParams::Ownership ownership_; |
| 256 | 262 |
| 257 // Functions with the same name require the ui::WindowObserver to be in | 263 // Functions with the same name require the ui::WindowObserver to be in |
| 258 // a separate class. | 264 // a separate class. |
| 259 std::unique_ptr<MusWindowObserver> mus_window_observer_; | 265 std::unique_ptr<MusWindowObserver> mus_window_observer_; |
| 260 | 266 |
| 261 // This is misnamed; The native widget interface offers something called | 267 // This is misnamed; The native widget interface offers something called |
| (...skipping 12 matching lines...) Expand all Loading... |
| 274 std::unique_ptr<wm::CursorManager> cursor_manager_; | 280 std::unique_ptr<wm::CursorManager> cursor_manager_; |
| 275 | 281 |
| 276 base::WeakPtrFactory<NativeWidgetMus> close_widget_factory_; | 282 base::WeakPtrFactory<NativeWidgetMus> close_widget_factory_; |
| 277 | 283 |
| 278 DISALLOW_COPY_AND_ASSIGN(NativeWidgetMus); | 284 DISALLOW_COPY_AND_ASSIGN(NativeWidgetMus); |
| 279 }; | 285 }; |
| 280 | 286 |
| 281 } // namespace views | 287 } // namespace views |
| 282 | 288 |
| 283 #endif // UI_VIEWS_MUS_NATIVE_WIDGET_MUS_H_ | 289 #endif // UI_VIEWS_MUS_NATIVE_WIDGET_MUS_H_ |
| OLD | NEW |