| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 SERVICES_UI_PUBLIC_CPP_WINDOW_H_ | 5 #ifndef SERVICES_UI_PUBLIC_CPP_WINDOW_H_ |
| 6 #define SERVICES_UI_PUBLIC_CPP_WINDOW_H_ | 6 #define SERVICES_UI_PUBLIC_CPP_WINDOW_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "base/observer_list.h" | 13 #include "base/observer_list.h" |
| 14 #include "cc/surfaces/surface_info.h" | 14 #include "cc/surfaces/surface_info.h" |
| 15 #include "mojo/public/cpp/bindings/array.h" | 15 #include "mojo/public/cpp/bindings/array.h" |
| 16 #include "services/service_manager/public/interfaces/interface_provider.mojom.h" | 16 #include "services/service_manager/public/interfaces/interface_provider.mojom.h" |
| 17 #include "services/ui/common/types.h" | 17 #include "services/ui/common/types.h" |
| 18 #include "services/ui/public/cpp/surface_id_handler.h" | |
| 19 #include "services/ui/public/cpp/window_compositor_frame_sink.h" | 18 #include "services/ui/public/cpp/window_compositor_frame_sink.h" |
| 20 #include "services/ui/public/interfaces/mus_constants.mojom.h" | 19 #include "services/ui/public/interfaces/mus_constants.mojom.h" |
| 21 #include "services/ui/public/interfaces/window_tree.mojom.h" | 20 #include "services/ui/public/interfaces/window_tree.mojom.h" |
| 22 #include "ui/gfx/geometry/insets.h" | 21 #include "ui/gfx/geometry/insets.h" |
| 23 #include "ui/gfx/geometry/rect.h" | 22 #include "ui/gfx/geometry/rect.h" |
| 24 | 23 |
| 25 namespace gpu { | 24 namespace gpu { |
| 26 class GpuMemoryBufferManager; | 25 class GpuMemoryBufferManager; |
| 27 } | 26 } |
| 28 | 27 |
| 29 namespace ui { | 28 namespace ui { |
| 30 | 29 |
| 31 class InputEventHandler; | 30 class InputEventHandler; |
| 32 class SurfaceIdHandler; | |
| 33 class WindowCompositorFrameSinkBinding; | 31 class WindowCompositorFrameSinkBinding; |
| 34 class WindowObserver; | 32 class WindowObserver; |
| 35 class WindowDropTarget; | 33 class WindowDropTarget; |
| 36 class WindowTreeClient; | 34 class WindowTreeClient; |
| 37 class WindowTreeClientPrivate; | 35 class WindowTreeClientPrivate; |
| 38 | 36 |
| 39 namespace { | 37 namespace { |
| 40 class OrderChangedNotifier; | 38 class OrderChangedNotifier; |
| 41 } | 39 } |
| 42 | 40 |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 // | 160 // |
| 163 // These properties are only visible in the current process and are not | 161 // These properties are only visible in the current process and are not |
| 164 // shared with other mojo services. | 162 // shared with other mojo services. |
| 165 template <typename T> | 163 template <typename T> |
| 166 void ClearLocalProperty(const WindowProperty<T>* property); | 164 void ClearLocalProperty(const WindowProperty<T>* property); |
| 167 | 165 |
| 168 void set_input_event_handler(InputEventHandler* input_event_handler) { | 166 void set_input_event_handler(InputEventHandler* input_event_handler) { |
| 169 input_event_handler_ = input_event_handler; | 167 input_event_handler_ = input_event_handler; |
| 170 } | 168 } |
| 171 | 169 |
| 172 void set_surface_id_handler(SurfaceIdHandler* surface_id_handler) { | |
| 173 surface_id_handler_ = surface_id_handler; | |
| 174 } | |
| 175 | |
| 176 // Observation. | 170 // Observation. |
| 177 void AddObserver(WindowObserver* observer); | 171 void AddObserver(WindowObserver* observer); |
| 178 void RemoveObserver(WindowObserver* observer); | 172 void RemoveObserver(WindowObserver* observer); |
| 179 | 173 |
| 180 // Tree. | 174 // Tree. |
| 181 Window* parent() { return parent_; } | 175 Window* parent() { return parent_; } |
| 182 const Window* parent() const { return parent_; } | 176 const Window* parent() const { return parent_; } |
| 183 | 177 |
| 184 Window* GetRoot() { | 178 Window* GetRoot() { |
| 185 return const_cast<Window*>(const_cast<const Window*>(this)->GetRoot()); | 179 return const_cast<Window*>(const_cast<const Window*>(this)->GetRoot()); |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 Children children_; | 355 Children children_; |
| 362 | 356 |
| 363 Window* stacking_target_; | 357 Window* stacking_target_; |
| 364 Window* transient_parent_; | 358 Window* transient_parent_; |
| 365 Children transient_children_; | 359 Children transient_children_; |
| 366 | 360 |
| 367 bool is_modal_; | 361 bool is_modal_; |
| 368 | 362 |
| 369 base::ObserverList<WindowObserver> observers_; | 363 base::ObserverList<WindowObserver> observers_; |
| 370 InputEventHandler* input_event_handler_; | 364 InputEventHandler* input_event_handler_; |
| 371 SurfaceIdHandler* surface_id_handler_; | |
| 372 | 365 |
| 373 gfx::Rect bounds_; | 366 gfx::Rect bounds_; |
| 374 gfx::Insets client_area_; | 367 gfx::Insets client_area_; |
| 375 std::vector<gfx::Rect> additional_client_areas_; | 368 std::vector<gfx::Rect> additional_client_areas_; |
| 376 std::unique_ptr<gfx::Rect> hit_test_mask_; | 369 std::unique_ptr<gfx::Rect> hit_test_mask_; |
| 377 | 370 |
| 378 bool visible_; | 371 bool visible_; |
| 379 float opacity_; | 372 float opacity_; |
| 380 int64_t display_id_; | 373 int64_t display_id_; |
| 381 | 374 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 407 std::map<const void*, Value> prop_map_; | 400 std::map<const void*, Value> prop_map_; |
| 408 | 401 |
| 409 cc::SurfaceInfo surface_info_; | 402 cc::SurfaceInfo surface_info_; |
| 410 | 403 |
| 411 DISALLOW_COPY_AND_ASSIGN(Window); | 404 DISALLOW_COPY_AND_ASSIGN(Window); |
| 412 }; | 405 }; |
| 413 | 406 |
| 414 } // namespace ui | 407 } // namespace ui |
| 415 | 408 |
| 416 #endif // SERVICES_UI_PUBLIC_CPP_WINDOW_H_ | 409 #endif // SERVICES_UI_PUBLIC_CPP_WINDOW_H_ |
| OLD | NEW |