| 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/wm/shelf_layout_manager.h" | 5 #include "ash/wm/shelf_layout_manager.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 | 9 |
| 10 #include "ash/ash_switches.h" | 10 #include "ash/ash_switches.h" |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 | 138 |
| 139 // Shelf we're in. NULL if deleted before we're deleted. | 139 // Shelf we're in. NULL if deleted before we're deleted. |
| 140 ShelfLayoutManager* shelf_; | 140 ShelfLayoutManager* shelf_; |
| 141 | 141 |
| 142 DISALLOW_COPY_AND_ASSIGN(UpdateShelfObserver); | 142 DISALLOW_COPY_AND_ASSIGN(UpdateShelfObserver); |
| 143 }; | 143 }; |
| 144 | 144 |
| 145 // ShelfLayoutManager ---------------------------------------------------------- | 145 // ShelfLayoutManager ---------------------------------------------------------- |
| 146 | 146 |
| 147 ShelfLayoutManager::ShelfLayoutManager(StatusAreaWidget* status_area_widget) | 147 ShelfLayoutManager::ShelfLayoutManager(StatusAreaWidget* status_area_widget) |
| 148 : root_window_(status_area_widget->GetNativeView()->GetRootWindow()), | 148 : ActivationChangeShim( |
| 149 status_area_widget->GetNativeView()->GetRootWindow()), |
| 150 root_window_(status_area_widget->GetNativeView()->GetRootWindow()), |
| 149 in_layout_(false), | 151 in_layout_(false), |
| 150 auto_hide_behavior_(SHELF_AUTO_HIDE_BEHAVIOR_NEVER), | 152 auto_hide_behavior_(SHELF_AUTO_HIDE_BEHAVIOR_NEVER), |
| 151 alignment_(SHELF_ALIGNMENT_BOTTOM), | 153 alignment_(SHELF_ALIGNMENT_BOTTOM), |
| 152 launcher_(NULL), | 154 launcher_(NULL), |
| 153 status_area_widget_(status_area_widget), | 155 status_area_widget_(status_area_widget), |
| 154 workspace_controller_(NULL), | 156 workspace_controller_(NULL), |
| 155 window_overlaps_shelf_(false), | 157 window_overlaps_shelf_(false), |
| 156 gesture_drag_status_(GESTURE_DRAG_NONE), | 158 gesture_drag_status_(GESTURE_DRAG_NONE), |
| 157 gesture_drag_amount_(0.f), | 159 gesture_drag_amount_(0.f), |
| 158 gesture_drag_auto_hide_state_(AUTO_HIDE_SHOWN), | 160 gesture_drag_auto_hide_state_(AUTO_HIDE_SHOWN), |
| (...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 886 int ShelfLayoutManager::GetWorkAreaSize(const State& state, int size) const { | 888 int ShelfLayoutManager::GetWorkAreaSize(const State& state, int size) const { |
| 887 if (state.visibility_state == VISIBLE) | 889 if (state.visibility_state == VISIBLE) |
| 888 return size; | 890 return size; |
| 889 if (state.visibility_state == AUTO_HIDE) | 891 if (state.visibility_state == AUTO_HIDE) |
| 890 return kAutoHideSize; | 892 return kAutoHideSize; |
| 891 return 0; | 893 return 0; |
| 892 } | 894 } |
| 893 | 895 |
| 894 } // namespace internal | 896 } // namespace internal |
| 895 } // namespace ash | 897 } // namespace ash |
| OLD | NEW |