Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(346)

Side by Side Diff: ash/wm/app_list_controller.cc

Issue 23526030: [ash] Update applist button status when applist is hiding by outside event of applist button (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Makes change applist button status when applist visiblity is changed Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698