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/shelf/shelf_layout_manager.h" | 9 #include "ash/shelf/shelf_layout_manager.h" |
10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 } | 154 } |
155 | 155 |
156 void AppListController::Toggle(aura::Window* window) { | 156 void AppListController::Toggle(aura::Window* window) { |
157 SetVisible(!IsVisible(), window); | 157 SetVisible(!IsVisible(), window); |
158 } | 158 } |
159 | 159 |
160 aura::Window* AppListController::GetWindow() { | 160 aura::Window* AppListController::GetWindow() { |
161 return is_visible_ && view_ ? view_->GetWidget()->GetNativeWindow() : NULL; | 161 return is_visible_ && view_ ? view_->GetWidget()->GetNativeWindow() : NULL; |
162 } | 162 } |
163 | 163 |
| 164 void AppListController::SetDragAndDropHostOfCurrentAppList( |
| 165 app_list::ApplicationDragAndDropHost* drag_and_drop_host) { |
| 166 if (view_ && is_visible_) |
| 167 view_->SetDragAndDropHostOfCurrentAppList(drag_and_drop_host); |
| 168 } |
| 169 |
164 void AppListController::AddObserver(AppListControllerObserver* observer) { | 170 void AppListController::AddObserver(AppListControllerObserver* observer) { |
165 observers_.AddObserver(observer); | 171 observers_.AddObserver(observer); |
166 } | 172 } |
167 | 173 |
168 void AppListController::RemoveObserver(AppListControllerObserver* observer) { | 174 void AppListController::RemoveObserver(AppListControllerObserver* observer) { |
169 observers_.RemoveObserver(observer); | 175 observers_.RemoveObserver(observer); |
170 } | 176 } |
171 | 177 |
172 //////////////////////////////////////////////////////////////////////////////// | 178 //////////////////////////////////////////////////////////////////////////////// |
173 // AppListController, private: | 179 // AppListController, private: |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 should_snap_back_ = false; | 377 should_snap_back_ = false; |
372 ui::ScopedLayerAnimationSettings animation(widget_animator); | 378 ui::ScopedLayerAnimationSettings animation(widget_animator); |
373 animation.SetTransitionDuration(base::TimeDelta::FromMilliseconds( | 379 animation.SetTransitionDuration(base::TimeDelta::FromMilliseconds( |
374 app_list::kOverscrollPageTransitionDurationMs)); | 380 app_list::kOverscrollPageTransitionDurationMs)); |
375 widget->SetBounds(view_bounds_); | 381 widget->SetBounds(view_bounds_); |
376 } | 382 } |
377 } | 383 } |
378 | 384 |
379 } // namespace internal | 385 } // namespace internal |
380 } // namespace ash | 386 } // namespace ash |
OLD | NEW |