| 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/launcher/launcher.h" | 7 #include "ash/launcher/launcher.h" |
| 8 #include "ash/root_window_controller.h" | 8 #include "ash/root_window_controller.h" |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "ash/shell_delegate.h" | 10 #include "ash/shell_delegate.h" |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 } else if (is_visible_) { | 116 } else if (is_visible_) { |
| 117 // AppListModel and AppListViewDelegate are owned by AppListView. They | 117 // AppListModel and AppListViewDelegate are owned by AppListView. They |
| 118 // will be released with AppListView on close. | 118 // will be released with AppListView on close. |
| 119 app_list::AppListView* view = new app_list::AppListView( | 119 app_list::AppListView* view = new app_list::AppListView( |
| 120 Shell::GetInstance()->delegate()->CreateAppListViewDelegate()); | 120 Shell::GetInstance()->delegate()->CreateAppListViewDelegate()); |
| 121 view->InitAsBubble( | 121 view->InitAsBubble( |
| 122 Shell::GetPrimaryRootWindowController()->GetContainer( | 122 Shell::GetPrimaryRootWindowController()->GetContainer( |
| 123 kShellWindowId_AppListContainer), | 123 kShellWindowId_AppListContainer), |
| 124 pagination_model_.get(), | 124 pagination_model_.get(), |
| 125 Shell::GetInstance()->launcher()->GetAppListButtonView(), | 125 Shell::GetInstance()->launcher()->GetAppListButtonView(), |
| 126 gfx::Point(), |
| 126 GetBubbleArrowLocation()); | 127 GetBubbleArrowLocation()); |
| 127 SetView(view); | 128 SetView(view); |
| 128 } | 129 } |
| 129 } | 130 } |
| 130 | 131 |
| 131 bool AppListController::IsVisible() const { | 132 bool AppListController::IsVisible() const { |
| 132 return view_ && view_->GetWidget()->IsVisible(); | 133 return view_ && view_->GetWidget()->IsVisible(); |
| 133 } | 134 } |
| 134 | 135 |
| 135 aura::Window* AppListController::GetWindow() { | 136 aura::Window* AppListController::GetWindow() { |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 | 308 |
| 308 //////////////////////////////////////////////////////////////////////////////// | 309 //////////////////////////////////////////////////////////////////////////////// |
| 309 // AppListController, LauncherIconObserver implementation: | 310 // AppListController, LauncherIconObserver implementation: |
| 310 | 311 |
| 311 void AppListController::OnLauncherIconPositionsChanged() { | 312 void AppListController::OnLauncherIconPositionsChanged() { |
| 312 UpdateBounds(); | 313 UpdateBounds(); |
| 313 } | 314 } |
| 314 | 315 |
| 315 } // namespace internal | 316 } // namespace internal |
| 316 } // namespace ash | 317 } // namespace ash |
| OLD | NEW |