| 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_TREE_CLIENT_H_ | 5 #ifndef SERVICES_UI_PUBLIC_CPP_WINDOW_TREE_CLIENT_H_ |
| 6 #define SERVICES_UI_PUBLIC_CPP_WINDOW_TREE_CLIENT_H_ | 6 #define SERVICES_UI_PUBLIC_CPP_WINDOW_TREE_CLIENT_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 uint32_t flags, | 126 uint32_t flags, |
| 127 const mojom::WindowTree::EmbedCallback& callback); | 127 const mojom::WindowTree::EmbedCallback& callback); |
| 128 | 128 |
| 129 void RequestClose(Window* window); | 129 void RequestClose(Window* window); |
| 130 | 130 |
| 131 void AttachSurface(Id window_id, | 131 void AttachSurface(Id window_id, |
| 132 mojom::SurfaceType type, | 132 mojom::SurfaceType type, |
| 133 mojo::InterfaceRequest<mojom::Surface> surface, | 133 mojo::InterfaceRequest<mojom::Surface> surface, |
| 134 mojom::SurfaceClientPtr client); | 134 mojom::SurfaceClientPtr client); |
| 135 | 135 |
| 136 void OnWindowSurfaceDetached(Id window_id, | |
| 137 const cc::SurfaceSequence& sequence); | |
| 138 | |
| 139 // Sets the input capture to |window| without notifying the server. | 136 // Sets the input capture to |window| without notifying the server. |
| 140 void LocalSetCapture(Window* window); | 137 void LocalSetCapture(Window* window); |
| 141 // Sets focus to |window| without notifying the server. | 138 // Sets focus to |window| without notifying the server. |
| 142 void LocalSetFocus(Window* window); | 139 void LocalSetFocus(Window* window); |
| 143 | 140 |
| 144 // Start/stop tracking windows. While tracked, they can be retrieved via | 141 // Start/stop tracking windows. While tracked, they can be retrieved via |
| 145 // WindowTreeClient::GetWindowById. | 142 // WindowTreeClient::GetWindowById. |
| 146 void AddWindow(Window* window); | 143 void AddWindow(Window* window); |
| 147 | 144 |
| 148 bool IsRoot(Window* window) const { return roots_.count(window) > 0; } | 145 bool IsRoot(Window* window) const { return roots_.count(window) > 0; } |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 mojo::Array<uint8_t> new_data) override; | 321 mojo::Array<uint8_t> new_data) override; |
| 325 void OnWindowInputEvent(uint32_t event_id, | 322 void OnWindowInputEvent(uint32_t event_id, |
| 326 Id window_id, | 323 Id window_id, |
| 327 std::unique_ptr<ui::Event> event, | 324 std::unique_ptr<ui::Event> event, |
| 328 bool matches_pointer_watcher) override; | 325 bool matches_pointer_watcher) override; |
| 329 void OnPointerEventObserved(std::unique_ptr<ui::Event> event, | 326 void OnPointerEventObserved(std::unique_ptr<ui::Event> event, |
| 330 uint32_t window_id) override; | 327 uint32_t window_id) override; |
| 331 void OnWindowFocused(Id focused_window_id) override; | 328 void OnWindowFocused(Id focused_window_id) override; |
| 332 void OnWindowPredefinedCursorChanged(Id window_id, | 329 void OnWindowPredefinedCursorChanged(Id window_id, |
| 333 mojom::Cursor cursor) override; | 330 mojom::Cursor cursor) override; |
| 334 void OnWindowSurfaceChanged(Id window_id, | |
| 335 const cc::SurfaceId& surface_id, | |
| 336 const cc::SurfaceSequence& surface_sequence, | |
| 337 const gfx::Size& frame_size, | |
| 338 float device_scale_factor) override; | |
| 339 void OnDragDropStart( | 331 void OnDragDropStart( |
| 340 mojo::Map<mojo::String, mojo::Array<uint8_t>> mime_data) override; | 332 mojo::Map<mojo::String, mojo::Array<uint8_t>> mime_data) override; |
| 341 void OnDragEnter(Id window_id, | 333 void OnDragEnter(Id window_id, |
| 342 uint32_t event_flags, | 334 uint32_t event_flags, |
| 343 const gfx::Point& position, | 335 const gfx::Point& position, |
| 344 uint32_t effect_bitmask, | 336 uint32_t effect_bitmask, |
| 345 const OnDragEnterCallback& callback) override; | 337 const OnDragEnterCallback& callback) override; |
| 346 void OnDragOver(Id window_id, | 338 void OnDragOver(Id window_id, |
| 347 uint32_t event_flags, | 339 uint32_t event_flags, |
| 348 const gfx::Point& position, | 340 const gfx::Point& position, |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 std::set<Id> drag_entered_windows_; | 478 std::set<Id> drag_entered_windows_; |
| 487 | 479 |
| 488 base::WeakPtrFactory<WindowTreeClient> weak_factory_; | 480 base::WeakPtrFactory<WindowTreeClient> weak_factory_; |
| 489 | 481 |
| 490 DISALLOW_COPY_AND_ASSIGN(WindowTreeClient); | 482 DISALLOW_COPY_AND_ASSIGN(WindowTreeClient); |
| 491 }; | 483 }; |
| 492 | 484 |
| 493 } // namespace ui | 485 } // namespace ui |
| 494 | 486 |
| 495 #endif // SERVICES_UI_PUBLIC_CPP_WINDOW_TREE_CLIENT_H_ | 487 #endif // SERVICES_UI_PUBLIC_CPP_WINDOW_TREE_CLIENT_H_ |
| OLD | NEW |