| 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/app_list/app_list_presenter_delegate.h" | 5 #include "ash/app_list/app_list_presenter_delegate.h" |
| 6 | 6 |
| 7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
| 8 #include "ash/common/shelf/shelf_types.h" | 8 #include "ash/common/shelf/shelf_types.h" |
| 9 #include "ash/common/shell_window_ids.h" | 9 #include "ash/common/shell_window_ids.h" |
| 10 #include "ash/display/window_tree_host_manager.h" | 10 #include "ash/display/window_tree_host_manager.h" |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 // AppListPresenterDelegate, keyboard::KeyboardControllerObserver | 306 // AppListPresenterDelegate, keyboard::KeyboardControllerObserver |
| 307 // implementation: | 307 // implementation: |
| 308 | 308 |
| 309 void AppListPresenterDelegate::OnKeyboardBoundsChanging( | 309 void AppListPresenterDelegate::OnKeyboardBoundsChanging( |
| 310 const gfx::Rect& new_bounds) { | 310 const gfx::Rect& new_bounds) { |
| 311 UpdateBounds(); | 311 UpdateBounds(); |
| 312 } | 312 } |
| 313 | 313 |
| 314 //////////////////////////////////////////////////////////////////////////////// | 314 //////////////////////////////////////////////////////////////////////////////// |
| 315 // AppListPresenterDelegate, ShellObserver implementation: | 315 // AppListPresenterDelegate, ShellObserver implementation: |
| 316 void AppListPresenterDelegate::OnShelfAlignmentChanged( | 316 void AppListPresenterDelegate::OnShelfAlignmentChanged(WmWindow* root_window) { |
| 317 aura::Window* root_window) { | |
| 318 if (view_) | 317 if (view_) |
| 319 view_->SetBubbleArrow(GetBubbleArrow(view_->GetWidget()->GetNativeView())); | 318 view_->SetBubbleArrow(GetBubbleArrow(view_->GetWidget()->GetNativeView())); |
| 320 } | 319 } |
| 321 | 320 |
| 322 void AppListPresenterDelegate::OnMaximizeModeStarted() { | 321 void AppListPresenterDelegate::OnMaximizeModeStarted() { |
| 323 // The "fullscreen" app-list is initialized as in a different type of window, | 322 // The "fullscreen" app-list is initialized as in a different type of window, |
| 324 // therefore we can't switch between the fullscreen status and the normal | 323 // therefore we can't switch between the fullscreen status and the normal |
| 325 // app-list bubble. App-list should be dismissed for the transition between | 324 // app-list bubble. App-list should be dismissed for the transition between |
| 326 // maximize mode (touch-view mode) and non-maximize mode, otherwise the app | 325 // maximize mode (touch-view mode) and non-maximize mode, otherwise the app |
| 327 // list tries to behave as a bubble which leads to a crash. crbug.com/510062 | 326 // list tries to behave as a bubble which leads to a crash. crbug.com/510062 |
| 328 if (IsFullscreenAppListEnabled() && is_visible_) | 327 if (IsFullscreenAppListEnabled() && is_visible_) |
| 329 presenter_->Dismiss(); | 328 presenter_->Dismiss(); |
| 330 } | 329 } |
| 331 | 330 |
| 332 void AppListPresenterDelegate::OnMaximizeModeEnded() { | 331 void AppListPresenterDelegate::OnMaximizeModeEnded() { |
| 333 // See the comments of OnMaximizeModeStarted(). | 332 // See the comments of OnMaximizeModeStarted(). |
| 334 if (IsFullscreenAppListEnabled() && is_visible_) | 333 if (IsFullscreenAppListEnabled() && is_visible_) |
| 335 presenter_->Dismiss(); | 334 presenter_->Dismiss(); |
| 336 } | 335 } |
| 337 | 336 |
| 338 //////////////////////////////////////////////////////////////////////////////// | 337 //////////////////////////////////////////////////////////////////////////////// |
| 339 // AppListPresenterDelegate, ShelfIconObserver implementation: | 338 // AppListPresenterDelegate, ShelfIconObserver implementation: |
| 340 | 339 |
| 341 void AppListPresenterDelegate::OnShelfIconPositionsChanged() { | 340 void AppListPresenterDelegate::OnShelfIconPositionsChanged() { |
| 342 UpdateBounds(); | 341 UpdateBounds(); |
| 343 } | 342 } |
| 344 | 343 |
| 345 } // namespace ash | 344 } // namespace ash |
| OLD | NEW |