| 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_COMMON_SHELF_SHELF_WINDOW_WATCHER_H_ | 5 #ifndef ASH_COMMON_SHELF_SHELF_WINDOW_WATCHER_H_ |
| 6 #define ASH_COMMON_SHELF_SHELF_WINDOW_WATCHER_H_ | 6 #define ASH_COMMON_SHELF_SHELF_WINDOW_WATCHER_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "ash/common/wm_activation_observer.h" | 10 #include "ash/common/wm_activation_observer.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 class UserWindowObserver : public WmWindowObserver { | 53 class UserWindowObserver : public WmWindowObserver { |
| 54 public: | 54 public: |
| 55 explicit UserWindowObserver(ShelfWindowWatcher* window_watcher); | 55 explicit UserWindowObserver(ShelfWindowWatcher* window_watcher); |
| 56 ~UserWindowObserver() override; | 56 ~UserWindowObserver() override; |
| 57 | 57 |
| 58 private: | 58 private: |
| 59 // WmWindowObserver: | 59 // WmWindowObserver: |
| 60 void OnWindowPropertyChanged(WmWindow* window, | 60 void OnWindowPropertyChanged(WmWindow* window, |
| 61 WmWindowProperty property) override; | 61 WmWindowProperty property) override; |
| 62 void OnWindowDestroying(WmWindow* window) override; | 62 void OnWindowDestroying(WmWindow* window) override; |
| 63 void OnWindowVisibilityChanged(WmWindow* window, bool visible) override; |
| 63 | 64 |
| 64 ShelfWindowWatcher* window_watcher_; | 65 ShelfWindowWatcher* window_watcher_; |
| 65 | 66 |
| 66 DISALLOW_COPY_AND_ASSIGN(UserWindowObserver); | 67 DISALLOW_COPY_AND_ASSIGN(UserWindowObserver); |
| 67 }; | 68 }; |
| 68 | 69 |
| 69 // Creates a ShelfItem for |window|. | 70 // Creates a ShelfItem for |window|. |
| 70 void AddShelfItem(WmWindow* window); | 71 void AddShelfItem(WmWindow* window); |
| 71 | 72 |
| 72 // Removes a ShelfItem for |window|. | 73 // Removes a ShelfItem for |window|. |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 | 109 |
| 109 // The set of windows with shelf items managed by this ShelfWindowWatcher. | 110 // The set of windows with shelf items managed by this ShelfWindowWatcher. |
| 110 std::set<WmWindow*> user_windows_with_items_; | 111 std::set<WmWindow*> user_windows_with_items_; |
| 111 | 112 |
| 112 DISALLOW_COPY_AND_ASSIGN(ShelfWindowWatcher); | 113 DISALLOW_COPY_AND_ASSIGN(ShelfWindowWatcher); |
| 113 }; | 114 }; |
| 114 | 115 |
| 115 } // namespace ash | 116 } // namespace ash |
| 116 | 117 |
| 117 #endif // ASH_COMMON_SHELF_SHELF_WINDOW_WATCHER_H_ | 118 #endif // ASH_COMMON_SHELF_SHELF_WINDOW_WATCHER_H_ |
| OLD | NEW |