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

Side by Side Diff: ash/app_list/app_list_presenter_delegate.cc

Issue 2225683008: [ash-md] Cancels app-list (launcher) before entering overview (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: [ash-md] - Prevents accelerators from reaching an active window in overview (handle in app-list) 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
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/app_list/app_list_presenter_delegate.h" 5 #include "ash/app_list/app_list_presenter_delegate.h"
6 6
7 #include "ash/common/ash_switches.h" 7 #include "ash/common/ash_switches.h"
8 #include "ash/common/shelf/app_list_button.h" 8 #include "ash/common/shelf/app_list_button.h"
9 #include "ash/common/shelf/shelf_types.h" 9 #include "ash/common/shelf/shelf_types.h"
10 #include "ash/common/shell_window_ids.h" 10 #include "ash/common/shell_window_ids.h"
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 UpdateBounds(); 329 UpdateBounds();
330 } 330 }
331 331
332 //////////////////////////////////////////////////////////////////////////////// 332 ////////////////////////////////////////////////////////////////////////////////
333 // AppListPresenterDelegate, ShellObserver implementation: 333 // AppListPresenterDelegate, ShellObserver implementation:
334 void AppListPresenterDelegate::OnShelfAlignmentChanged(WmWindow* root_window) { 334 void AppListPresenterDelegate::OnShelfAlignmentChanged(WmWindow* root_window) {
335 if (view_) 335 if (view_)
336 view_->SetBubbleArrow(GetBubbleArrow(view_->GetWidget()->GetNativeView())); 336 view_->SetBubbleArrow(GetBubbleArrow(view_->GetWidget()->GetNativeView()));
337 } 337 }
338 338
339 void AppListPresenterDelegate::OnOverviewModeStarting() {
340 if (is_visible_)
341 presenter_->Dismiss();
342 }
343
339 void AppListPresenterDelegate::OnMaximizeModeStarted() { 344 void AppListPresenterDelegate::OnMaximizeModeStarted() {
340 // The "fullscreen" app-list is initialized as in a different type of window, 345 // The "fullscreen" app-list is initialized as in a different type of window,
341 // therefore we can't switch between the fullscreen status and the normal 346 // therefore we can't switch between the fullscreen status and the normal
342 // app-list bubble. App-list should be dismissed for the transition between 347 // app-list bubble. App-list should be dismissed for the transition between
343 // maximize mode (touch-view mode) and non-maximize mode, otherwise the app 348 // maximize mode (touch-view mode) and non-maximize mode, otherwise the app
344 // list tries to behave as a bubble which leads to a crash. crbug.com/510062 349 // list tries to behave as a bubble which leads to a crash. crbug.com/510062
345 if (IsFullscreenAppListEnabled() && is_visible_) 350 if (IsFullscreenAppListEnabled() && is_visible_)
346 presenter_->Dismiss(); 351 presenter_->Dismiss();
347 } 352 }
348 353
349 void AppListPresenterDelegate::OnMaximizeModeEnded() { 354 void AppListPresenterDelegate::OnMaximizeModeEnded() {
350 // See the comments of OnMaximizeModeStarted(). 355 // See the comments of OnMaximizeModeStarted().
351 if (IsFullscreenAppListEnabled() && is_visible_) 356 if (IsFullscreenAppListEnabled() && is_visible_)
352 presenter_->Dismiss(); 357 presenter_->Dismiss();
353 } 358 }
354 359
355 //////////////////////////////////////////////////////////////////////////////// 360 ////////////////////////////////////////////////////////////////////////////////
356 // AppListPresenterDelegate, ShelfIconObserver implementation: 361 // AppListPresenterDelegate, ShelfIconObserver implementation:
357 362
358 void AppListPresenterDelegate::OnShelfIconPositionsChanged() { 363 void AppListPresenterDelegate::OnShelfIconPositionsChanged() {
359 UpdateBounds(); 364 UpdateBounds();
360 } 365 }
361 366
362 } // namespace ash 367 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698