OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 ASH_SHELF_SHELF_WINDOW_WATCHER_H_ | 5 #ifndef ASH_SHELF_SHELF_WINDOW_WATCHER_H_ |
6 #define ASH_SHELF_SHELF_WINDOW_WATCHER_H_ | 6 #define ASH_SHELF_SHELF_WINDOW_WATCHER_H_ |
7 | 7 |
8 #include "ash/shelf/scoped_observer_with_duplicated_sources.h" | 8 #include "ash/shelf/scoped_observer_with_duplicated_sources.h" |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 // and when the drag completes added back. When this happens we don't want to | 96 // and when the drag completes added back. When this happens we don't want to |
97 // remove the shelf item. StartObservingRemovedWindow, if necessary, attaches | 97 // remove the shelf item. StartObservingRemovedWindow, if necessary, attaches |
98 // an observer. When done, FinishObservingRemovedWindow() is invoked. | 98 // an observer. When done, FinishObservingRemovedWindow() is invoked. |
99 void StartObservingRemovedWindow(aura::Window* window); | 99 void StartObservingRemovedWindow(aura::Window* window); |
100 | 100 |
101 // Stop observing |window| by RemovedWindowObserver and remove an item | 101 // Stop observing |window| by RemovedWindowObserver and remove an item |
102 // associated with |window|. | 102 // associated with |window|. |
103 void FinishObservingRemovedWindow(aura::Window* window); | 103 void FinishObservingRemovedWindow(aura::Window* window); |
104 | 104 |
105 // aura::client::ActivationChangeObserver overrides: | 105 // aura::client::ActivationChangeObserver overrides: |
106 void OnWindowActivated(aura::Window* gained_active, | 106 void OnWindowActivated( |
107 aura::Window* lost_active) override; | 107 aura::client::ActivationChangeObserver::ActivationReason reason, |
| 108 aura::Window* gained_active, |
| 109 aura::Window* lost_active) override; |
108 | 110 |
109 // aura::WindowObserver overrides: | 111 // aura::WindowObserver overrides: |
110 void OnWindowAdded(aura::Window* window) override; | 112 void OnWindowAdded(aura::Window* window) override; |
111 void OnWillRemoveWindow(aura::Window* window) override; | 113 void OnWillRemoveWindow(aura::Window* window) override; |
112 void OnWindowDestroying(aura::Window* window) override; | 114 void OnWindowDestroying(aura::Window* window) override; |
113 void OnWindowPropertyChanged(aura::Window* window, | 115 void OnWindowPropertyChanged(aura::Window* window, |
114 const void* key, | 116 const void* key, |
115 intptr_t old) override; | 117 intptr_t old) override; |
116 | 118 |
117 // gfx::DisplayObserver overrides: | 119 // gfx::DisplayObserver overrides: |
(...skipping 22 matching lines...) Expand all Loading... |
140 // Holds all observed activation clients. | 142 // Holds all observed activation clients. |
141 ScopedObserverWithDuplicatedSources<aura::client::ActivationClient, | 143 ScopedObserverWithDuplicatedSources<aura::client::ActivationClient, |
142 aura::client::ActivationChangeObserver> observed_activation_clients_; | 144 aura::client::ActivationChangeObserver> observed_activation_clients_; |
143 | 145 |
144 DISALLOW_COPY_AND_ASSIGN(ShelfWindowWatcher); | 146 DISALLOW_COPY_AND_ASSIGN(ShelfWindowWatcher); |
145 }; | 147 }; |
146 | 148 |
147 } // namespace ash | 149 } // namespace ash |
148 | 150 |
149 #endif // ASH_SHELF_SHELF_WINDOW_WATCHER_H_ | 151 #endif // ASH_SHELF_SHELF_WINDOW_WATCHER_H_ |
OLD | NEW |