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/app_list_controller.h" | 5 #include "ash/wm/app_list_controller.h" |
6 | 6 |
7 #include "ash/launcher/launcher.h" | 7 #include "ash/launcher/launcher.h" |
8 #include "ash/root_window_controller.h" | 8 #include "ash/root_window_controller.h" |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "ash/shell_delegate.h" | 10 #include "ash/shell_delegate.h" |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 | 83 |
84 return offseted; | 84 return offseted; |
85 } | 85 } |
86 | 86 |
87 } // namespace | 87 } // namespace |
88 | 88 |
89 //////////////////////////////////////////////////////////////////////////////// | 89 //////////////////////////////////////////////////////////////////////////////// |
90 // AppListController, public: | 90 // AppListController, public: |
91 | 91 |
92 AppListController::AppListController() | 92 AppListController::AppListController() |
93 : pagination_model_(new app_list::PaginationModel), | 93 : FocusChangeShim(Shell::GetInstance()), |
| 94 pagination_model_(new app_list::PaginationModel), |
94 is_visible_(false), | 95 is_visible_(false), |
95 view_(NULL), | 96 view_(NULL), |
96 should_snap_back_(false) { | 97 should_snap_back_(false) { |
97 Shell::GetInstance()->AddShellObserver(this); | 98 Shell::GetInstance()->AddShellObserver(this); |
98 pagination_model_->AddObserver(this); | 99 pagination_model_->AddObserver(this); |
99 } | 100 } |
100 | 101 |
101 AppListController::~AppListController() { | 102 AppListController::~AppListController() { |
102 // Ensures app list view goes before the controller since pagination model | 103 // Ensures app list view goes before the controller since pagination model |
103 // lives in the controller and app list view would access it on destruction. | 104 // lives in the controller and app list view would access it on destruction. |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 should_snap_back_ = false; | 356 should_snap_back_ = false; |
356 ui::ScopedLayerAnimationSettings animation(widget_animator); | 357 ui::ScopedLayerAnimationSettings animation(widget_animator); |
357 animation.SetTransitionDuration(base::TimeDelta::FromMilliseconds( | 358 animation.SetTransitionDuration(base::TimeDelta::FromMilliseconds( |
358 app_list::kOverscrollPageTransitionDurationMs)); | 359 app_list::kOverscrollPageTransitionDurationMs)); |
359 widget->SetBounds(view_bounds_); | 360 widget->SetBounds(view_bounds_); |
360 } | 361 } |
361 } | 362 } |
362 | 363 |
363 } // namespace internal | 364 } // namespace internal |
364 } // namespace ash | 365 } // namespace ash |
OLD | NEW |