| 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 #include "services/ui/ws/window_manager_state.h" | 5 #include "services/ui/ws/window_manager_state.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "services/shell/public/interfaces/connector.mojom.h" | 10 #include "services/shell/public/interfaces/connector.mojom.h" |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 | 147 |
| 148 void WindowManagerState::ReleaseCaptureBlockedByModalWindow( | 148 void WindowManagerState::ReleaseCaptureBlockedByModalWindow( |
| 149 const ServerWindow* modal_window) { | 149 const ServerWindow* modal_window) { |
| 150 event_dispatcher_.ReleaseCaptureBlockedByModalWindow(modal_window); | 150 event_dispatcher_.ReleaseCaptureBlockedByModalWindow(modal_window); |
| 151 } | 151 } |
| 152 | 152 |
| 153 void WindowManagerState::ReleaseCaptureBlockedByAnyModalWindow() { | 153 void WindowManagerState::ReleaseCaptureBlockedByAnyModalWindow() { |
| 154 event_dispatcher_.ReleaseCaptureBlockedByAnyModalWindow(); | 154 event_dispatcher_.ReleaseCaptureBlockedByAnyModalWindow(); |
| 155 } | 155 } |
| 156 | 156 |
| 157 void WindowManagerState::SetDragDropSourceWindow( |
| 158 DragSource* drag_source, |
| 159 ServerWindow* window, |
| 160 int32_t drag_pointer, |
| 161 mojo::Map<mojo::String, mojo::Array<uint8_t>> drag_data, |
| 162 uint32_t drag_operation) { |
| 163 event_dispatcher_.SetDragDropSourceWindow( |
| 164 drag_source, window, drag_pointer, std::move(drag_data), drag_operation); |
| 165 } |
| 166 |
| 167 void WindowManagerState::EndDragDrop() { |
| 168 event_dispatcher_.EndDragDrop(); |
| 169 } |
| 170 |
| 157 void WindowManagerState::AddSystemModalWindow(ServerWindow* window) { | 171 void WindowManagerState::AddSystemModalWindow(ServerWindow* window) { |
| 158 DCHECK(!window->transient_parent()); | 172 DCHECK(!window->transient_parent()); |
| 159 event_dispatcher_.AddSystemModalWindow(window); | 173 event_dispatcher_.AddSystemModalWindow(window); |
| 160 } | 174 } |
| 161 | 175 |
| 162 const UserId& WindowManagerState::user_id() const { | 176 const UserId& WindowManagerState::user_id() const { |
| 163 return window_tree_->user_id(); | 177 return window_tree_->user_id(); |
| 164 } | 178 } |
| 165 | 179 |
| 166 void WindowManagerState::OnWillDestroyTree(WindowTree* tree) { | 180 void WindowManagerState::OnWillDestroyTree(WindowTree* tree) { |
| (...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 561 return display_root->root(); | 575 return display_root->root(); |
| 562 } | 576 } |
| 563 | 577 |
| 564 void WindowManagerState::OnEventTargetNotFound(const ui::Event& event) { | 578 void WindowManagerState::OnEventTargetNotFound(const ui::Event& event) { |
| 565 window_server()->SendToPointerWatchers(event, user_id(), nullptr, /* window */ | 579 window_server()->SendToPointerWatchers(event, user_id(), nullptr, /* window */ |
| 566 nullptr /* ignore_tree */); | 580 nullptr /* ignore_tree */); |
| 567 } | 581 } |
| 568 | 582 |
| 569 } // namespace ws | 583 } // namespace ws |
| 570 } // namespace ui | 584 } // namespace ui |
| OLD | NEW |