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 #include "ash/shelf/shelf_window_watcher.h" | 5 #include "ash/shelf/shelf_window_watcher.h" |
6 | 6 |
7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
8 #include "ash/display/display_controller.h" | 8 #include "ash/display/display_controller.h" |
9 #include "ash/shelf/shelf_constants.h" | 9 #include "ash/shelf/shelf_constants.h" |
10 #include "ash/shelf/shelf_item_delegate_manager.h" | 10 #include "ash/shelf/shelf_item_delegate_manager.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 } | 43 } |
44 | 44 |
45 // Returns true if |window| is in the process of being dragged. | 45 // Returns true if |window| is in the process of being dragged. |
46 bool IsDragging(aura::Window* window) { | 46 bool IsDragging(aura::Window* window) { |
47 return ash::wm::GetWindowState(window)->is_dragged(); | 47 return ash::wm::GetWindowState(window)->is_dragged(); |
48 } | 48 } |
49 | 49 |
50 } // namespace | 50 } // namespace |
51 | 51 |
52 namespace ash { | 52 namespace ash { |
53 namespace internal { | |
54 | 53 |
55 ShelfWindowWatcher::RootWindowObserver::RootWindowObserver( | 54 ShelfWindowWatcher::RootWindowObserver::RootWindowObserver( |
56 ShelfWindowWatcher* window_watcher) | 55 ShelfWindowWatcher* window_watcher) |
57 : window_watcher_(window_watcher) { | 56 : window_watcher_(window_watcher) { |
58 } | 57 } |
59 | 58 |
60 ShelfWindowWatcher::RootWindowObserver::~RootWindowObserver() { | 59 ShelfWindowWatcher::RootWindowObserver::~RootWindowObserver() { |
61 } | 60 } |
62 | 61 |
63 void ShelfWindowWatcher::RootWindowObserver::OnWindowDestroying( | 62 void ShelfWindowWatcher::RootWindowObserver::OnWindowDestroying( |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 OnRootWindowAdded(root_window); | 281 OnRootWindowAdded(root_window); |
283 } | 282 } |
284 | 283 |
285 void ShelfWindowWatcher::OnDisplayRemoved(const gfx::Display& old_display) { | 284 void ShelfWindowWatcher::OnDisplayRemoved(const gfx::Display& old_display) { |
286 // When this is called, RootWindow of |old_display| is already removed. | 285 // When this is called, RootWindow of |old_display| is already removed. |
287 // Instead, we remove an observer from RootWindow and ActivationClient in the | 286 // Instead, we remove an observer from RootWindow and ActivationClient in the |
288 // OnRootWindowDestroyed(). | 287 // OnRootWindowDestroyed(). |
289 // Do nothing here. | 288 // Do nothing here. |
290 } | 289 } |
291 | 290 |
292 } // namespace internal | |
293 } // namespace ash | 291 } // namespace ash |
OLD | NEW |