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/ash_switches.h" | 7 #include "ash/ash_switches.h" |
8 #include "ash/launcher/launcher.h" | 8 #include "ash/launcher/launcher.h" |
9 #include "ash/root_window_controller.h" | 9 #include "ash/root_window_controller.h" |
10 #include "ash/shelf/shelf_layout_manager.h" | 10 #include "ash/shelf/shelf_layout_manager.h" |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 } | 193 } |
194 SetView(view); | 194 SetView(view); |
195 // By setting us as DnD recipient, the app list knows that we can | 195 // By setting us as DnD recipient, the app list knows that we can |
196 // handle items. | 196 // handle items. |
197 if (!CommandLine::ForCurrentProcess()->HasSwitch( | 197 if (!CommandLine::ForCurrentProcess()->HasSwitch( |
198 ash::switches::kAshDisableDragAndDropAppListToLauncher)) { | 198 ash::switches::kAshDisableDragAndDropAppListToLauncher)) { |
199 SetDragAndDropHostOfCurrentAppList( | 199 SetDragAndDropHostOfCurrentAppList( |
200 Launcher::ForWindow(window)->GetDragAndDropHostForAppList()); | 200 Launcher::ForWindow(window)->GetDragAndDropHostForAppList()); |
201 } | 201 } |
202 } | 202 } |
| 203 // Update applist button status when app list visibility is changed. |
| 204 Launcher::ForWindow(window)->GetAppListButtonView()->SchedulePaint(); |
203 } | 205 } |
204 | 206 |
205 bool AppListController::IsVisible() const { | 207 bool AppListController::IsVisible() const { |
206 return view_ && view_->GetWidget()->IsVisible(); | 208 return view_ && view_->GetWidget()->IsVisible(); |
207 } | 209 } |
208 | 210 |
209 aura::Window* AppListController::GetWindow() { | 211 aura::Window* AppListController::GetWindow() { |
210 return is_visible_ && view_ ? view_->GetWidget()->GetNativeWindow() : NULL; | 212 return is_visible_ && view_ ? view_->GetWidget()->GetNativeWindow() : NULL; |
211 } | 213 } |
212 | 214 |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 should_snap_back_ = false; | 423 should_snap_back_ = false; |
422 ui::ScopedLayerAnimationSettings animation(widget_animator); | 424 ui::ScopedLayerAnimationSettings animation(widget_animator); |
423 animation.SetTransitionDuration(base::TimeDelta::FromMilliseconds( | 425 animation.SetTransitionDuration(base::TimeDelta::FromMilliseconds( |
424 app_list::kOverscrollPageTransitionDurationMs)); | 426 app_list::kOverscrollPageTransitionDurationMs)); |
425 widget->SetBounds(view_bounds_); | 427 widget->SetBounds(view_bounds_); |
426 } | 428 } |
427 } | 429 } |
428 | 430 |
429 } // namespace internal | 431 } // namespace internal |
430 } // namespace ash | 432 } // namespace ash |
OLD | NEW |