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

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

Issue 10546024: Add RootWindowController (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « ash/tooltips/tooltip_controller.cc ('k') | ash/wm/property_util.h » ('j') | 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/root_window_controller.h"
8 #include "ash/shell.h" 9 #include "ash/shell.h"
9 #include "ash/shell_delegate.h" 10 #include "ash/shell_delegate.h"
10 #include "ash/shell_window_ids.h" 11 #include "ash/shell_window_ids.h"
11 #include "ash/wm/shelf_layout_manager.h" 12 #include "ash/wm/shelf_layout_manager.h"
12 #include "ui/app_list/app_list_view.h" 13 #include "ui/app_list/app_list_view.h"
13 #include "ui/app_list/icon_cache.h" 14 #include "ui/app_list/icon_cache.h"
14 #include "ui/aura/event.h" 15 #include "ui/aura/event.h"
15 #include "ui/aura/focus_manager.h" 16 #include "ui/aura/focus_manager.h"
16 #include "ui/aura/root_window.h" 17 #include "ui/aura/root_window.h"
17 #include "ui/aura/window.h" 18 #include "ui/aura/window.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 Shell::GetInstance()->shelf()->UpdateAutoHideState(); 79 Shell::GetInstance()->shelf()->UpdateAutoHideState();
79 80
80 if (view_) { 81 if (view_) {
81 ScheduleAnimation(); 82 ScheduleAnimation();
82 } else if (is_visible_) { 83 } else if (is_visible_) {
83 // AppListModel and AppListViewDelegate are owned by AppListView. They 84 // AppListModel and AppListViewDelegate are owned by AppListView. They
84 // will be released with AppListView on close. 85 // will be released with AppListView on close.
85 app_list::AppListView* view = new app_list::AppListView( 86 app_list::AppListView* view = new app_list::AppListView(
86 Shell::GetInstance()->delegate()->CreateAppListViewDelegate()); 87 Shell::GetInstance()->delegate()->CreateAppListViewDelegate());
87 view->InitAsBubble( 88 view->InitAsBubble(
88 Shell::GetContainer( 89 Shell::GetPrimaryRootWindowController()->GetContainer(
89 Shell::GetPrimaryRootWindow(),
90 kShellWindowId_AppListContainer), 90 kShellWindowId_AppListContainer),
91 Shell::GetInstance()->launcher()->GetAppListButtonView(), 91 Shell::GetInstance()->launcher()->GetAppListButtonView(),
92 GetBubbleArrowLocation()); 92 GetBubbleArrowLocation());
93 SetView(view); 93 SetView(view);
94 } 94 }
95 } 95 }
96 96
97 bool AppListController::IsVisible() const { 97 bool AppListController::IsVisible() const {
98 return view_ && view_->GetWidget()->IsVisible(); 98 return view_ && view_->GetWidget()->IsVisible();
99 } 99 }
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 244
245 //////////////////////////////////////////////////////////////////////////////// 245 ////////////////////////////////////////////////////////////////////////////////
246 // AppListController, ShellObserver implementation: 246 // AppListController, ShellObserver implementation:
247 void AppListController::OnShelfAlignmentChanged() { 247 void AppListController::OnShelfAlignmentChanged() {
248 if (view_) 248 if (view_)
249 view_->SetBubbleArrowLocation(GetBubbleArrowLocation()); 249 view_->SetBubbleArrowLocation(GetBubbleArrowLocation());
250 } 250 }
251 251
252 } // namespace internal 252 } // namespace internal
253 } // namespace ash 253 } // namespace ash
OLDNEW
« no previous file with comments | « ash/tooltips/tooltip_controller.cc ('k') | ash/wm/property_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698