OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/ui/views/aura/chrome_shell_delegate.h" | 5 #include "chrome/browser/ui/views/aura/chrome_shell_delegate.h" |
6 | 6 |
7 #include "chrome/browser/profiles/profile_manager.h" | 7 #include "chrome/browser/profiles/profile_manager.h" |
8 #include "chrome/browser/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
9 #include "chrome/browser/ui/views/aura/app_list_window.h" | 9 #include "chrome/browser/ui/views/aura/app_list_window.h" |
10 #include "chrome/browser/ui/views/aura/status_area_host_aura.h" | 10 #include "chrome/browser/ui/views/aura/status_area_host_aura.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 browser->window()->Show(); | 50 browser->window()->Show(); |
51 } | 51 } |
52 | 52 |
53 views::Widget* ChromeShellDelegate::CreateStatusArea() { | 53 views::Widget* ChromeShellDelegate::CreateStatusArea() { |
54 status_area_host_.reset(new StatusAreaHostAura()); | 54 status_area_host_.reset(new StatusAreaHostAura()); |
55 views::Widget* status_area_widget = | 55 views::Widget* status_area_widget = |
56 status_area_host_.get()->CreateStatusArea(); | 56 status_area_host_.get()->CreateStatusArea(); |
57 return status_area_widget; | 57 return status_area_widget; |
58 } | 58 } |
59 | 59 |
60 void ChromeShellDelegate::ShowApps() { | 60 void ChromeShellDelegate::RequestAppListWidget( |
61 AppListWindow::SetVisible(!AppListWindow::IsVisible()); | 61 const SetWidgetCallback& callback) { |
| 62 new AppListWindow(callback); // AppListWindow deletes itself when closed. |
62 } | 63 } |
63 | 64 |
64 void ChromeShellDelegate::LauncherItemClicked( | 65 void ChromeShellDelegate::LauncherItemClicked( |
65 const aura_shell::LauncherItem& item) { | 66 const aura_shell::LauncherItem& item) { |
66 item.window->Activate(); | 67 item.window->Activate(); |
67 } | 68 } |
68 | 69 |
69 bool ChromeShellDelegate::ConfigureLauncherItem( | 70 bool ChromeShellDelegate::ConfigureLauncherItem( |
70 aura_shell::LauncherItem* item) { | 71 aura_shell::LauncherItem* item) { |
71 BrowserView* view = BrowserView::GetBrowserViewForNativeWindow(item->window); | 72 BrowserView* view = BrowserView::GetBrowserViewForNativeWindow(item->window); |
72 return view && | 73 return view && |
73 ShouldCreateLauncherItemForBrowser(view->browser(), &(item->type)); | 74 ShouldCreateLauncherItemForBrowser(view->browser(), &(item->type)); |
74 } | 75 } |
OLD | NEW |