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

Side by Side Diff: ui/views/mus/pointer_watcher_event_router.h

Issue 2696573003: Have WindowTreeClient detect error state earlier (Closed)
Patch Set: Fix test exposed by new check Created 3 years, 10 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 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 #ifndef UI_VIEWS_MUS_POINTER_WATCHER_EVENT_ROUTER_H_ 5 #ifndef UI_VIEWS_MUS_POINTER_WATCHER_EVENT_ROUTER_H_
6 #define UI_VIEWS_MUS_POINTER_WATCHER_EVENT_ROUTER_H_ 6 #define UI_VIEWS_MUS_POINTER_WATCHER_EVENT_ROUTER_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/observer_list.h" 10 #include "base/observer_list.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 void AttachToCaptureClient(aura::client::CaptureClient* capture_client); 64 void AttachToCaptureClient(aura::client::CaptureClient* capture_client);
65 void DetachFromCaptureClient(aura::client::CaptureClient* capture_client); 65 void DetachFromCaptureClient(aura::client::CaptureClient* capture_client);
66 66
67 private: 67 private:
68 friend class PointerWatcherEventRouterTest; 68 friend class PointerWatcherEventRouterTest;
69 69
70 // Determines EventTypes based on the number and type of PointerWatchers. 70 // Determines EventTypes based on the number and type of PointerWatchers.
71 EventTypes DetermineEventTypes(); 71 EventTypes DetermineEventTypes();
72 72
73 // aura::WindowTreeClientObserver: 73 // aura::WindowTreeClientObserver:
74 void OnDidDestroyClient(aura::WindowTreeClient* client) override; 74 void OnWillDestroyClient(aura::WindowTreeClient* client) override;
75 75
76 // aura::client::CaptureClientObserver: 76 // aura::client::CaptureClientObserver:
77 void OnCaptureChanged(aura::Window* lost_capture, 77 void OnCaptureChanged(aura::Window* lost_capture,
78 aura::Window* gained_capture) override; 78 aura::Window* gained_capture) override;
79 79
80 aura::WindowTreeClient* window_tree_client_; 80 aura::WindowTreeClient* window_tree_client_;
81 // The true parameter to ObserverList indicates the list must be empty on 81 // The true parameter to ObserverList indicates the list must be empty on
82 // destruction. Two sets of observers are maintained, one for observers not 82 // destruction. Two sets of observers are maintained, one for observers not
83 // needing moves |non_move_watchers_| and |move_watchers_| for those 83 // needing moves |non_move_watchers_| and |move_watchers_| for those
84 // observers wanting moves too. 84 // observers wanting moves too.
85 base::ObserverList<views::PointerWatcher, true> non_move_watchers_; 85 base::ObserverList<views::PointerWatcher, true> non_move_watchers_;
86 base::ObserverList<views::PointerWatcher, true> move_watchers_; 86 base::ObserverList<views::PointerWatcher, true> move_watchers_;
87 87
88 EventTypes event_types_ = EventTypes::NONE; 88 EventTypes event_types_ = EventTypes::NONE;
89 89
90 DISALLOW_COPY_AND_ASSIGN(PointerWatcherEventRouter); 90 DISALLOW_COPY_AND_ASSIGN(PointerWatcherEventRouter);
91 }; 91 };
92 92
93 } // namespace views 93 } // namespace views
94 94
95 #endif // UI_VIEWS_MUS_POINTER_WATCHER_EVENT_ROUTER_H_ 95 #endif // UI_VIEWS_MUS_POINTER_WATCHER_EVENT_ROUTER_H_
OLDNEW
« no previous file with comments | « ui/views/controls/native/native_view_host_aura_unittest.cc ('k') | ui/views/mus/pointer_watcher_event_router.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698