| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_layout_manager.h" | 5 #include "ash/shelf/shelf_layout_manager.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 // auto hidden shelf. The region is used to make it easier to trigger showing | 70 // auto hidden shelf. The region is used to make it easier to trigger showing |
| 71 // the auto hidden shelf when the shelf is on the boundary between displays. | 71 // the auto hidden shelf when the shelf is on the boundary between displays. |
| 72 const int kMaxAutoHideShowShelfRegionSize = 10; | 72 const int kMaxAutoHideShowShelfRegionSize = 10; |
| 73 | 73 |
| 74 ui::Layer* GetLayer(views::Widget* widget) { | 74 ui::Layer* GetLayer(views::Widget* widget) { |
| 75 return widget->GetNativeView()->layer(); | 75 return widget->GetNativeView()->layer(); |
| 76 } | 76 } |
| 77 | 77 |
| 78 // Returns true if the window is in the app list window container. | 78 // Returns true if the window is in the app list window container. |
| 79 bool IsAppListWindow(WmWindow* window) { | 79 bool IsAppListWindow(WmWindow* window) { |
| 80 return window->GetParent() && | 80 return window->GetParent() && window->GetParent()->aura_window()->id() == |
| 81 window->GetParent()->GetShellWindowId() == | 81 kShellWindowId_AppListContainer; |
| 82 kShellWindowId_AppListContainer; | |
| 83 } | 82 } |
| 84 | 83 |
| 85 } // namespace | 84 } // namespace |
| 86 | 85 |
| 87 // ShelfLayoutManager::UpdateShelfObserver ------------------------------------- | 86 // ShelfLayoutManager::UpdateShelfObserver ------------------------------------- |
| 88 | 87 |
| 89 // UpdateShelfObserver is used to delay updating the background until the | 88 // UpdateShelfObserver is used to delay updating the background until the |
| 90 // animation completes. | 89 // animation completes. |
| 91 class ShelfLayoutManager::UpdateShelfObserver | 90 class ShelfLayoutManager::UpdateShelfObserver |
| 92 : public ui::ImplicitAnimationObserver { | 91 : public ui::ImplicitAnimationObserver { |
| (...skipping 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1140 gesture_drag_status_ = GESTURE_DRAG_NONE; | 1139 gesture_drag_status_ = GESTURE_DRAG_NONE; |
| 1141 } | 1140 } |
| 1142 | 1141 |
| 1143 void ShelfLayoutManager::CancelGestureDrag() { | 1142 void ShelfLayoutManager::CancelGestureDrag() { |
| 1144 gesture_drag_status_ = GESTURE_DRAG_CANCEL_IN_PROGRESS; | 1143 gesture_drag_status_ = GESTURE_DRAG_CANCEL_IN_PROGRESS; |
| 1145 UpdateVisibilityState(); | 1144 UpdateVisibilityState(); |
| 1146 gesture_drag_status_ = GESTURE_DRAG_NONE; | 1145 gesture_drag_status_ = GESTURE_DRAG_NONE; |
| 1147 } | 1146 } |
| 1148 | 1147 |
| 1149 } // namespace ash | 1148 } // namespace ash |
| OLD | NEW |