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

Side by Side Diff: services/ui/public/cpp/window_tree_client.h

Issue 2248263003: Updates PointerEventRouter to handle switching move type (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge again Created 4 years, 4 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
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 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 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 void OnWindowOpacityChanged(Id window_id, 304 void OnWindowOpacityChanged(Id window_id,
305 float old_opacity, 305 float old_opacity,
306 float new_opacity) override; 306 float new_opacity) override;
307 void OnWindowParentDrawnStateChanged(Id window_id, bool drawn) override; 307 void OnWindowParentDrawnStateChanged(Id window_id, bool drawn) override;
308 void OnWindowSharedPropertyChanged(Id window_id, 308 void OnWindowSharedPropertyChanged(Id window_id,
309 const mojo::String& name, 309 const mojo::String& name,
310 mojo::Array<uint8_t> new_data) override; 310 mojo::Array<uint8_t> new_data) override;
311 void OnWindowInputEvent(uint32_t event_id, 311 void OnWindowInputEvent(uint32_t event_id,
312 Id window_id, 312 Id window_id,
313 std::unique_ptr<ui::Event> event, 313 std::unique_ptr<ui::Event> event,
314 uint32_t pointer_watcher_id) override; 314 bool matches_pointer_watcher) override;
315 void OnPointerEventObserved(std::unique_ptr<ui::Event> event, 315 void OnPointerEventObserved(std::unique_ptr<ui::Event> event,
316 uint32_t pointer_watcher_id,
317 uint32_t window_id) override; 316 uint32_t window_id) override;
318 void OnWindowFocused(Id focused_window_id) override; 317 void OnWindowFocused(Id focused_window_id) override;
319 void OnWindowPredefinedCursorChanged(Id window_id, 318 void OnWindowPredefinedCursorChanged(Id window_id,
320 mojom::Cursor cursor) override; 319 mojom::Cursor cursor) override;
321 void OnChangeCompleted(uint32_t change_id, bool success) override; 320 void OnChangeCompleted(uint32_t change_id, bool success) override;
322 void RequestClose(uint32_t window_id) override; 321 void RequestClose(uint32_t window_id) override;
323 void GetWindowManager( 322 void GetWindowManager(
324 mojo::AssociatedInterfaceRequest<WindowManager> internal) override; 323 mojo::AssociatedInterfaceRequest<WindowManager> internal) override;
325 324
326 // Overridden from WindowManager: 325 // Overridden from WindowManager:
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 mojo::ScopedSharedBufferMapping cursor_location_mapping_; 411 mojo::ScopedSharedBufferMapping cursor_location_mapping_;
413 412
414 base::ObserverList<WindowTreeClientObserver> observers_; 413 base::ObserverList<WindowTreeClientObserver> observers_;
415 414
416 std::unique_ptr<mojo::AssociatedBinding<mojom::WindowManager>> 415 std::unique_ptr<mojo::AssociatedBinding<mojom::WindowManager>>
417 window_manager_internal_; 416 window_manager_internal_;
418 mojom::WindowManagerClientAssociatedPtr window_manager_internal_client_; 417 mojom::WindowManagerClientAssociatedPtr window_manager_internal_client_;
419 418
420 bool has_pointer_watcher_ = false; 419 bool has_pointer_watcher_ = false;
421 420
422 // Monotonically increasing ID for pointer watchers.
423 uint32_t pointer_watcher_id_ = 0u;
424
425 // The current change id for the client. 421 // The current change id for the client.
426 uint32_t current_move_loop_change_ = 0u; 422 uint32_t current_move_loop_change_ = 0u;
427 423
428 // The current change id for the window manager. 424 // The current change id for the window manager.
429 uint32_t current_wm_move_loop_change_ = 0u; 425 uint32_t current_wm_move_loop_change_ = 0u;
430 Id current_wm_move_loop_window_id_ = 0u; 426 Id current_wm_move_loop_window_id_ = 0u;
431 427
432 // Callback executed when a move loop initiated by PerformWindowMove() is 428 // Callback executed when a move loop initiated by PerformWindowMove() is
433 // completed. 429 // completed.
434 base::Callback<void(bool)> on_current_move_finished_; 430 base::Callback<void(bool)> on_current_move_finished_;
435 431
436 base::WeakPtrFactory<WindowTreeClient> weak_factory_; 432 base::WeakPtrFactory<WindowTreeClient> weak_factory_;
437 433
438 DISALLOW_COPY_AND_ASSIGN(WindowTreeClient); 434 DISALLOW_COPY_AND_ASSIGN(WindowTreeClient);
439 }; 435 };
440 436
441 } // namespace ui 437 } // namespace ui
442 438
443 #endif // SERVICES_UI_PUBLIC_CPP_WINDOW_TREE_CLIENT_H_ 439 #endif // SERVICES_UI_PUBLIC_CPP_WINDOW_TREE_CLIENT_H_
OLDNEW
« no previous file with comments | « services/ui/public/cpp/tests/window_tree_client_unittest.cc ('k') | services/ui/public/cpp/window_tree_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698