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

Side by Side Diff: ui/aura/mus/window_tree_client.h

Issue 2511883006: Mojo C++ bindings: switch services/ui/public/interfaces mojom target to use STL types. (Closed)
Patch Set: . Created 4 years 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 | « ui/aura/mus/drag_drop_controller_mus.cc ('k') | ui/aura/mus/window_tree_client.cc » ('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 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 UI_AURA_MUS_WINDOW_TREE_CLIENT_H_ 5 #ifndef UI_AURA_MUS_WINDOW_TREE_CLIENT_H_
6 #define UI_AURA_MUS_WINDOW_TREE_CLIENT_H_ 6 #define UI_AURA_MUS_WINDOW_TREE_CLIENT_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 181
182 // See InFlightChange for details on how InFlightChanges are used. 182 // See InFlightChange for details on how InFlightChanges are used.
183 uint32_t ScheduleInFlightChange(std::unique_ptr<InFlightChange> change); 183 uint32_t ScheduleInFlightChange(std::unique_ptr<InFlightChange> change);
184 184
185 // Returns true if there is an InFlightChange that matches |change|. If there 185 // Returns true if there is an InFlightChange that matches |change|. If there
186 // is an existing change SetRevertValueFrom() is invoked on it. Returns false 186 // is an existing change SetRevertValueFrom() is invoked on it. Returns false
187 // if there is no InFlightChange matching |change|. 187 // if there is no InFlightChange matching |change|.
188 // See InFlightChange for details on how InFlightChanges are used. 188 // See InFlightChange for details on how InFlightChanges are used.
189 bool ApplyServerChangeToExistingInFlightChange(const InFlightChange& change); 189 bool ApplyServerChangeToExistingInFlightChange(const InFlightChange& change);
190 190
191 void BuildWindowTree(const mojo::Array<ui::mojom::WindowDataPtr>& windows); 191 void BuildWindowTree(const std::vector<ui::mojom::WindowDataPtr>& windows);
192 192
193 // Creates a WindowPortMus from the server side data. 193 // Creates a WindowPortMus from the server side data.
194 std::unique_ptr<WindowPortMus> CreateWindowPortMus( 194 std::unique_ptr<WindowPortMus> CreateWindowPortMus(
195 const ui::mojom::WindowDataPtr& window_data, 195 const ui::mojom::WindowDataPtr& window_data,
196 WindowMusType window_mus_type); 196 WindowMusType window_mus_type);
197 197
198 // Sets local properties on the associated Window from the server properties. 198 // Sets local properties on the associated Window from the server properties.
199 void SetLocalPropertiesFromServerProperties( 199 void SetLocalPropertiesFromServerProperties(
200 WindowMus* window, 200 WindowMus* window,
201 const ui::mojom::WindowDataPtr& window_data); 201 const ui::mojom::WindowDataPtr& window_data);
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 void OnTopLevelCreated(uint32_t change_id, 288 void OnTopLevelCreated(uint32_t change_id,
289 ui::mojom::WindowDataPtr data, 289 ui::mojom::WindowDataPtr data,
290 int64_t display_id, 290 int64_t display_id,
291 bool drawn) override; 291 bool drawn) override;
292 void OnWindowBoundsChanged(Id window_id, 292 void OnWindowBoundsChanged(Id window_id,
293 const gfx::Rect& old_bounds, 293 const gfx::Rect& old_bounds,
294 const gfx::Rect& new_bounds) override; 294 const gfx::Rect& new_bounds) override;
295 void OnClientAreaChanged( 295 void OnClientAreaChanged(
296 uint32_t window_id, 296 uint32_t window_id,
297 const gfx::Insets& new_client_area, 297 const gfx::Insets& new_client_area,
298 mojo::Array<gfx::Rect> new_additional_client_areas) override; 298 const std::vector<gfx::Rect>& new_additional_client_areas) override;
299 void OnTransientWindowAdded(uint32_t window_id, 299 void OnTransientWindowAdded(uint32_t window_id,
300 uint32_t transient_window_id) override; 300 uint32_t transient_window_id) override;
301 void OnTransientWindowRemoved(uint32_t window_id, 301 void OnTransientWindowRemoved(uint32_t window_id,
302 uint32_t transient_window_id) override; 302 uint32_t transient_window_id) override;
303 void OnWindowHierarchyChanged( 303 void OnWindowHierarchyChanged(
304 Id window_id, 304 Id window_id,
305 Id old_parent_id, 305 Id old_parent_id,
306 Id new_parent_id, 306 Id new_parent_id,
307 mojo::Array<ui::mojom::WindowDataPtr> windows) override; 307 std::vector<ui::mojom::WindowDataPtr> windows) override;
308 void OnWindowReordered(Id window_id, 308 void OnWindowReordered(Id window_id,
309 Id relative_window_id, 309 Id relative_window_id,
310 ui::mojom::OrderDirection direction) override; 310 ui::mojom::OrderDirection direction) override;
311 void OnWindowDeleted(Id window_id) override; 311 void OnWindowDeleted(Id window_id) override;
312 void OnWindowVisibilityChanged(Id window_id, bool visible) override; 312 void OnWindowVisibilityChanged(Id window_id, bool visible) override;
313 void OnWindowOpacityChanged(Id window_id, 313 void OnWindowOpacityChanged(Id window_id,
314 float old_opacity, 314 float old_opacity,
315 float new_opacity) override; 315 float new_opacity) override;
316 void OnWindowParentDrawnStateChanged(Id window_id, bool drawn) override; 316 void OnWindowParentDrawnStateChanged(Id window_id, bool drawn) override;
317 void OnWindowSharedPropertyChanged( 317 void OnWindowSharedPropertyChanged(
318 Id window_id, 318 Id window_id,
319 const mojo::String& name, 319 const std::string& name,
320 mojo::Array<uint8_t> transport_data) override; 320 const base::Optional<std::vector<uint8_t>>& transport_data) override;
321 void OnWindowInputEvent(uint32_t event_id, 321 void OnWindowInputEvent(uint32_t event_id,
322 Id window_id, 322 Id window_id,
323 std::unique_ptr<ui::Event> event, 323 std::unique_ptr<ui::Event> event,
324 bool matches_pointer_watcher) override; 324 bool matches_pointer_watcher) override;
325 void OnPointerEventObserved(std::unique_ptr<ui::Event> event, 325 void OnPointerEventObserved(std::unique_ptr<ui::Event> event,
326 uint32_t window_id) override; 326 uint32_t window_id) override;
327 void OnWindowFocused(Id focused_window_id) override; 327 void OnWindowFocused(Id focused_window_id) override;
328 void OnWindowPredefinedCursorChanged(Id window_id, 328 void OnWindowPredefinedCursorChanged(Id window_id,
329 ui::mojom::Cursor cursor) override; 329 ui::mojom::Cursor cursor) override;
330 void OnWindowSurfaceChanged(Id window_id, 330 void OnWindowSurfaceChanged(Id window_id,
331 const cc::SurfaceId& surface_id, 331 const cc::SurfaceId& surface_id,
332 const gfx::Size& frame_size, 332 const gfx::Size& frame_size,
333 float device_scale_factor) override; 333 float device_scale_factor) override;
334 void OnDragDropStart( 334 void OnDragDropStart(
335 mojo::Map<mojo::String, mojo::Array<uint8_t>> mime_data) override; 335 const std::unordered_map<std::string, std::vector<uint8_t>>& mime_data)
336 override;
336 void OnDragEnter(Id window_id, 337 void OnDragEnter(Id window_id,
337 uint32_t event_flags, 338 uint32_t event_flags,
338 const gfx::Point& position, 339 const gfx::Point& position,
339 uint32_t effect_bitmask, 340 uint32_t effect_bitmask,
340 const OnDragEnterCallback& callback) override; 341 const OnDragEnterCallback& callback) override;
341 void OnDragOver(Id window_id, 342 void OnDragOver(Id window_id,
342 uint32_t event_flags, 343 uint32_t event_flags,
343 const gfx::Point& position, 344 const gfx::Point& position,
344 uint32_t effect_bitmask, 345 uint32_t effect_bitmask,
345 const OnDragOverCallback& callback) override; 346 const OnDragOverCallback& callback) override;
(...skipping 15 matching lines...) Expand all
361 // Overridden from WindowManager: 362 // Overridden from WindowManager:
362 void OnConnect(ClientSpecificId client_id) override; 363 void OnConnect(ClientSpecificId client_id) override;
363 void WmNewDisplayAdded(const display::Display& display, 364 void WmNewDisplayAdded(const display::Display& display,
364 ui::mojom::WindowDataPtr root_data, 365 ui::mojom::WindowDataPtr root_data,
365 bool parent_drawn) override; 366 bool parent_drawn) override;
366 void WmDisplayRemoved(int64_t display_id) override; 367 void WmDisplayRemoved(int64_t display_id) override;
367 void WmDisplayModified(const display::Display& display) override; 368 void WmDisplayModified(const display::Display& display) override;
368 void WmSetBounds(uint32_t change_id, 369 void WmSetBounds(uint32_t change_id,
369 Id window_id, 370 Id window_id,
370 const gfx::Rect& transit_bounds) override; 371 const gfx::Rect& transit_bounds) override;
371 void WmSetProperty(uint32_t change_id, 372 void WmSetProperty(
372 Id window_id, 373 uint32_t change_id,
373 const mojo::String& name, 374 Id window_id,
374 mojo::Array<uint8_t> transit_data) override; 375 const std::string& name,
375 void WmCreateTopLevelWindow(uint32_t change_id, 376 const base::Optional<std::vector<uint8_t>>& transit_data) override;
376 ClientSpecificId requesting_client_id, 377 void WmCreateTopLevelWindow(
377 mojo::Map<mojo::String, mojo::Array<uint8_t>> 378 uint32_t change_id,
378 transport_properties) override; 379 ClientSpecificId requesting_client_id,
380 const std::unordered_map<std::string, std::vector<uint8_t>>&
381 transport_properties) override;
379 void WmClientJankinessChanged(ClientSpecificId client_id, 382 void WmClientJankinessChanged(ClientSpecificId client_id,
380 bool janky) override; 383 bool janky) override;
381 void WmPerformMoveLoop(uint32_t change_id, 384 void WmPerformMoveLoop(uint32_t change_id,
382 Id window_id, 385 Id window_id,
383 ui::mojom::MoveLoopSource source, 386 ui::mojom::MoveLoopSource source,
384 const gfx::Point& cursor_location) override; 387 const gfx::Point& cursor_location) override;
385 void WmCancelMoveLoop(uint32_t window_id) override; 388 void WmCancelMoveLoop(uint32_t window_id) override;
386 void OnAccelerator(uint32_t ack_id, 389 void OnAccelerator(uint32_t ack_id,
387 uint32_t accelerator_id, 390 uint32_t accelerator_id,
388 std::unique_ptr<ui::Event> event) override; 391 std::unique_ptr<ui::Event> event) override;
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 std::unique_ptr<DragDropControllerMus> drag_drop_controller_; 495 std::unique_ptr<DragDropControllerMus> drag_drop_controller_;
493 496
494 base::WeakPtrFactory<WindowTreeClient> weak_factory_; 497 base::WeakPtrFactory<WindowTreeClient> weak_factory_;
495 498
496 DISALLOW_COPY_AND_ASSIGN(WindowTreeClient); 499 DISALLOW_COPY_AND_ASSIGN(WindowTreeClient);
497 }; 500 };
498 501
499 } // namespace aura 502 } // namespace aura
500 503
501 #endif // UI_AURA_MUS_WINDOW_TREE_CLIENT_H_ 504 #endif // UI_AURA_MUS_WINDOW_TREE_CLIENT_H_
OLDNEW
« no previous file with comments | « ui/aura/mus/drag_drop_controller_mus.cc ('k') | ui/aura/mus/window_tree_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698