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

Side by Side Diff: chrome/browser/ui/views/aura/chrome_shell_delegate.cc

Issue 8558031: [Aura] Refactor and update app list window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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
OLDNEW
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 29 matching lines...) Expand all
40 browser->window()->Show(); 40 browser->window()->Show();
41 } 41 }
42 42
43 views::Widget* ChromeShellDelegate::CreateStatusArea() { 43 views::Widget* ChromeShellDelegate::CreateStatusArea() {
44 status_area_host_.reset(new StatusAreaHostAura()); 44 status_area_host_.reset(new StatusAreaHostAura());
45 views::Widget* status_area_widget = 45 views::Widget* status_area_widget =
46 status_area_host_.get()->CreateStatusArea(); 46 status_area_host_.get()->CreateStatusArea();
47 return status_area_widget; 47 return status_area_widget;
48 } 48 }
49 49
50 void ChromeShellDelegate::ShowApps() { 50 void ChromeShellDelegate::RequestAppListWidget(
51 AppListWindow::SetVisible(!AppListWindow::IsVisible()); 51 const aura_shell::SetWidgetCallback& callback) {
52 new AppListWindow(callback); // AppListWindow deletes itself when closed.
52 } 53 }
53 54
54 void ChromeShellDelegate::LauncherItemClicked( 55 void ChromeShellDelegate::LauncherItemClicked(
55 const aura_shell::LauncherItem& item) { 56 const aura_shell::LauncherItem& item) {
56 item.window->Activate(); 57 item.window->Activate();
57 } 58 }
58 59
59 bool ChromeShellDelegate::ConfigureLauncherItem( 60 bool ChromeShellDelegate::ConfigureLauncherItem(
60 aura_shell::LauncherItem* item) { 61 aura_shell::LauncherItem* item) {
61 BrowserView* view = BrowserView::GetBrowserViewForNativeWindow(item->window); 62 BrowserView* view = BrowserView::GetBrowserViewForNativeWindow(item->window);
62 return view && 63 return view &&
63 ShouldCreateLauncherItemForBrowser(view->browser(), &(item->type)); 64 ShouldCreateLauncherItemForBrowser(view->browser(), &(item->type));
64 } 65 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698