Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Side by Side Diff: services/ui/ws/window_manager_state.cc

Issue 2603893002: Remove mojo::Map. (Closed)
Patch Set: rebase Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « services/ui/ws/window_manager_state.h ('k') | services/ui/ws/window_tree.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/service_manager/public/interfaces/connector.mojom.h" 10 #include "services/service_manager/public/interfaces/connector.mojom.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 } 158 }
159 159
160 void WindowManagerState::ReleaseCaptureBlockedByAnyModalWindow() { 160 void WindowManagerState::ReleaseCaptureBlockedByAnyModalWindow() {
161 event_dispatcher_.ReleaseCaptureBlockedByAnyModalWindow(); 161 event_dispatcher_.ReleaseCaptureBlockedByAnyModalWindow();
162 } 162 }
163 163
164 void WindowManagerState::SetDragDropSourceWindow( 164 void WindowManagerState::SetDragDropSourceWindow(
165 DragSource* drag_source, 165 DragSource* drag_source,
166 ServerWindow* window, 166 ServerWindow* window,
167 DragTargetConnection* source_connection, 167 DragTargetConnection* source_connection,
168 mojo::Map<mojo::String, mojo::Array<uint8_t>> drag_data, 168 const std::unordered_map<std::string, std::vector<uint8_t>>& drag_data,
169 uint32_t drag_operation) { 169 uint32_t drag_operation) {
170 int32_t drag_pointer = PointerEvent::kMousePointerId; 170 int32_t drag_pointer = PointerEvent::kMousePointerId;
171 if (event_awaiting_input_ack_ && 171 if (event_awaiting_input_ack_ &&
172 event_awaiting_input_ack_->IsPointerEvent()) { 172 event_awaiting_input_ack_->IsPointerEvent()) {
173 drag_pointer = event_awaiting_input_ack_->AsPointerEvent()->pointer_id(); 173 drag_pointer = event_awaiting_input_ack_->AsPointerEvent()->pointer_id();
174 } else { 174 } else {
175 NOTIMPLEMENTED() << "Set drag drop set up during something other than a " 175 NOTIMPLEMENTED() << "Set drag drop set up during something other than a "
176 << "pointer event; rejecting drag."; 176 << "pointer event; rejecting drag.";
177 drag_source->OnDragCompleted(false, ui::mojom::kDropEffectNone); 177 drag_source->OnDragCompleted(false, ui::mojom::kDropEffectNone);
178 return; 178 return;
179 } 179 }
180 180
181 event_dispatcher_.SetDragDropSourceWindow( 181 event_dispatcher_.SetDragDropSourceWindow(drag_source, window,
182 drag_source, window, source_connection, drag_pointer, 182 source_connection, drag_pointer,
183 std::move(drag_data), drag_operation); 183 drag_data, drag_operation);
184 } 184 }
185 185
186 void WindowManagerState::CancelDragDrop() { 186 void WindowManagerState::CancelDragDrop() {
187 event_dispatcher_.CancelDragDrop(); 187 event_dispatcher_.CancelDragDrop();
188 } 188 }
189 189
190 void WindowManagerState::EndDragDrop() { 190 void WindowManagerState::EndDragDrop() {
191 event_dispatcher_.EndDragDrop(); 191 event_dispatcher_.EndDragDrop();
192 UpdateNativeCursorFromDispatcher(); 192 UpdateNativeCursorFromDispatcher();
193 } 193 }
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 window->RemoveObserver(this); 635 window->RemoveObserver(this);
636 orphaned_window_manager_display_roots_.erase(iter); 636 orphaned_window_manager_display_roots_.erase(iter);
637 return; 637 return;
638 } 638 }
639 } 639 }
640 NOTREACHED(); 640 NOTREACHED();
641 } 641 }
642 642
643 } // namespace ws 643 } // namespace ws
644 } // namespace ui 644 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/window_manager_state.h ('k') | services/ui/ws/window_tree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698