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

Side by Side Diff: ui/app_list/presenter/app_list_presenter_impl.cc

Issue 2249583002: Revert "Enable ash window cycle UI by default." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 | « chrome/browser/about_flags.cc ('k') | 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "ui/app_list/presenter/app_list_presenter_impl.h" 5 #include "ui/app_list/presenter/app_list_presenter_impl.h"
6 6
7 #include "ui/app_list/app_list_constants.h" 7 #include "ui/app_list/app_list_constants.h"
8 #include "ui/app_list/app_list_switches.h" 8 #include "ui/app_list/app_list_switches.h"
9 #include "ui/app_list/pagination_model.h" 9 #include "ui/app_list/pagination_model.h"
10 #include "ui/app_list/presenter/app_list_presenter_delegate_factory.h" 10 #include "ui/app_list/presenter/app_list_presenter_delegate_factory.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 void AppListPresenterImpl::Dismiss() { 74 void AppListPresenterImpl::Dismiss() {
75 if (!is_visible_) 75 if (!is_visible_)
76 return; 76 return;
77 77
78 // If the app list is currently visible, there should be an existing view. 78 // If the app list is currently visible, there should be an existing view.
79 DCHECK(view_); 79 DCHECK(view_);
80 80
81 is_visible_ = false; 81 is_visible_ = false;
82 82
83 // The dismissal may have occurred in response to the app list losing 83 // Our widget is currently active. When the animation completes we'll hide
84 // activation. Otherwise, our widget is currently active. When the animation 84 // the widget, changing activation. If a menu is shown before the animation
85 // completes we'll hide the widget, changing activation. If a menu is shown 85 // completes then the activation change triggers the menu to close. By
86 // before the animation completes then the activation change triggers the menu 86 // deactivating now we ensure there is no activation change when the
87 // to close. By deactivating now we ensure there is no activation change when 87 // animation completes and any menus stay open.
88 // the animation completes and any menus stay open. 88 view_->GetWidget()->Deactivate();
89 if (view_->GetWidget()->IsActive())
90 view_->GetWidget()->Deactivate();
91 89
92 presenter_delegate_->OnDismissed(); 90 presenter_delegate_->OnDismissed();
93 ScheduleAnimation(); 91 ScheduleAnimation();
94 } 92 }
95 93
96 void AppListPresenterImpl::ToggleAppList(int64_t display_id) { 94 void AppListPresenterImpl::ToggleAppList(int64_t display_id) {
97 if (IsVisible()) { 95 if (IsVisible()) {
98 Dismiss(); 96 Dismiss();
99 return; 97 return;
100 } 98 }
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 } else if (should_snap_back_) { 262 } else if (should_snap_back_) {
265 should_snap_back_ = false; 263 should_snap_back_ = false;
266 ui::ScopedLayerAnimationSettings animation(widget_animator); 264 ui::ScopedLayerAnimationSettings animation(widget_animator);
267 animation.SetTransitionDuration( 265 animation.SetTransitionDuration(
268 base::TimeDelta::FromMilliseconds(kOverscrollPageTransitionDurationMs)); 266 base::TimeDelta::FromMilliseconds(kOverscrollPageTransitionDurationMs));
269 widget->SetBounds(view_bounds_); 267 widget->SetBounds(view_bounds_);
270 } 268 }
271 } 269 }
272 270
273 } // namespace app_list 271 } // namespace app_list
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698