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

Side by Side Diff: ash/shelf/shelf_window_watcher.h

Issue 2041423003: Converts ShellObserver from aura::Window to ash::WmWindow (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « ash/shelf/shelf_layout_manager.cc ('k') | ash/shelf/shelf_window_watcher.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 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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include "ash/shelf/scoped_observer_with_duplicated_sources.h" 10 #include "ash/shelf/scoped_observer_with_duplicated_sources.h"
(...skipping 11 matching lines...) Expand all
22 namespace client { 22 namespace client {
23 class ActivationClient; 23 class ActivationClient;
24 } 24 }
25 25
26 } // namespace aura 26 } // namespace aura
27 27
28 namespace ash { 28 namespace ash {
29 29
30 class ShelfModel; 30 class ShelfModel;
31 class ShelfItemDelegateManager; 31 class ShelfItemDelegateManager;
32 class WmWindow;
32 33
33 // ShelfWindowWatcher creates and handles a ShelfItem for windows that have 34 // ShelfWindowWatcher creates and handles a ShelfItem for windows that have
34 // a ShelfItemDetails property in the default container. 35 // a ShelfItemDetails property in the default container.
35 class ShelfWindowWatcher : public aura::client::ActivationChangeObserver, 36 class ShelfWindowWatcher : public aura::client::ActivationChangeObserver,
36 public aura::WindowObserver, 37 public aura::WindowObserver,
37 public display::DisplayObserver { 38 public display::DisplayObserver {
38 public: 39 public:
39 ShelfWindowWatcher(ShelfModel* model, 40 ShelfWindowWatcher(ShelfModel* model,
40 ShelfItemDelegateManager* item_delegate_manager); 41 ShelfItemDelegateManager* item_delegate_manager);
41 ~ShelfWindowWatcher() override; 42 ~ShelfWindowWatcher() override;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 75
75 DISALLOW_COPY_AND_ASSIGN(RemovedWindowObserver); 76 DISALLOW_COPY_AND_ASSIGN(RemovedWindowObserver);
76 }; 77 };
77 78
78 // Creates a ShelfItem for |window| that has ShelfItemDetails. 79 // Creates a ShelfItem for |window| that has ShelfItemDetails.
79 void AddShelfItem(aura::Window* window); 80 void AddShelfItem(aura::Window* window);
80 81
81 // Removes a ShelfItem for |window|. 82 // Removes a ShelfItem for |window|.
82 void RemoveShelfItem(aura::Window* window); 83 void RemoveShelfItem(aura::Window* window);
83 84
84 // Adds observer to default container and ActivationClient of |root_window|. 85 // Adds observer to default container and ActivationClient of
85 void OnRootWindowAdded(aura::Window* root_window); 86 // |root_window_wm|.
87 void OnRootWindowAdded(WmWindow* root_window_wm);
86 88
87 // Removes observer from ActivationClient of |root_window|. 89 // Removes observer from ActivationClient of |root_window|.
88 void OnRootWindowRemoved(aura::Window* root_window); 90 void OnRootWindowRemoved(aura::Window* root_window);
89 91
90 // Updates the status of ShelfItem for |window|. 92 // Updates the status of ShelfItem for |window|.
91 void UpdateShelfItemStatus(aura::Window* window, bool is_active); 93 void UpdateShelfItemStatus(aura::Window* window, bool is_active);
92 94
93 // Returns the index of ShelfItem associated with |window|. 95 // Returns the index of ShelfItem associated with |window|.
94 int GetShelfItemIndexForWindow(aura::Window* window) const; 96 int GetShelfItemIndexForWindow(aura::Window* window) const;
95 97
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 // Holds all observed activation clients. 145 // Holds all observed activation clients.
144 ScopedObserverWithDuplicatedSources<aura::client::ActivationClient, 146 ScopedObserverWithDuplicatedSources<aura::client::ActivationClient,
145 aura::client::ActivationChangeObserver> observed_activation_clients_; 147 aura::client::ActivationChangeObserver> observed_activation_clients_;
146 148
147 DISALLOW_COPY_AND_ASSIGN(ShelfWindowWatcher); 149 DISALLOW_COPY_AND_ASSIGN(ShelfWindowWatcher);
148 }; 150 };
149 151
150 } // namespace ash 152 } // namespace ash
151 153
152 #endif // ASH_SHELF_SHELF_WINDOW_WATCHER_H_ 154 #endif // ASH_SHELF_SHELF_WINDOW_WATCHER_H_
OLDNEW
« no previous file with comments | « ash/shelf/shelf_layout_manager.cc ('k') | ash/shelf/shelf_window_watcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698