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 <cstring> | 9 #include <cstring> |
10 #include <string> | 10 #include <string> |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 // from the right edge of the primary display which can trigger showing the | 71 // from the right edge of the primary display which can trigger showing the |
72 // auto hidden shelf. The region is used to make it easier to trigger showing | 72 // auto hidden shelf. The region is used to make it easier to trigger showing |
73 // the auto hidden shelf when the shelf is on the boundary between displays. | 73 // the auto hidden shelf when the shelf is on the boundary between displays. |
74 const int kMaxAutoHideShowShelfRegionSize = 10; | 74 const int kMaxAutoHideShowShelfRegionSize = 10; |
75 | 75 |
76 ui::Layer* GetLayer(views::Widget* widget) { | 76 ui::Layer* GetLayer(views::Widget* widget) { |
77 return widget->GetNativeView()->layer(); | 77 return widget->GetNativeView()->layer(); |
78 } | 78 } |
79 | 79 |
80 bool IsDraggingTrayEnabled() { | 80 bool IsDraggingTrayEnabled() { |
81 static bool dragging_tray_allowed = CommandLine::ForCurrentProcess()-> | 81 static bool dragging_tray_allowed = base::CommandLine::ForCurrentProcess()-> |
82 HasSwitch(ash::switches::kAshEnableTrayDragging); | 82 HasSwitch(ash::switches::kAshEnableTrayDragging); |
83 return dragging_tray_allowed; | 83 return dragging_tray_allowed; |
84 } | 84 } |
85 | 85 |
86 } // namespace | 86 } // namespace |
87 | 87 |
88 // static | 88 // static |
89 const int ShelfLayoutManager::kWorkspaceAreaVisibleInset = 2; | 89 const int ShelfLayoutManager::kWorkspaceAreaVisibleInset = 2; |
90 | 90 |
91 // static | 91 // static |
(...skipping 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1147 | 1147 |
1148 void ShelfLayoutManager::SessionStateChanged( | 1148 void ShelfLayoutManager::SessionStateChanged( |
1149 SessionStateDelegate::SessionState state) { | 1149 SessionStateDelegate::SessionState state) { |
1150 TargetBounds target_bounds; | 1150 TargetBounds target_bounds; |
1151 CalculateTargetBounds(state_, &target_bounds); | 1151 CalculateTargetBounds(state_, &target_bounds); |
1152 UpdateBoundsAndOpacity(target_bounds, true, NULL); | 1152 UpdateBoundsAndOpacity(target_bounds, true, NULL); |
1153 UpdateVisibilityState(); | 1153 UpdateVisibilityState(); |
1154 } | 1154 } |
1155 | 1155 |
1156 } // namespace ash | 1156 } // namespace ash |
OLD | NEW |