| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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::RequestAppListWidget( | 60 void ChromeShellDelegate::RequestAppListWidget( |
| 61 const gfx::Rect& bounds, |
| 61 const SetWidgetCallback& callback) { | 62 const SetWidgetCallback& callback) { |
| 62 new AppListWindow(callback); // AppListWindow deletes itself when closed. | 63 // AppListWindow deletes itself when closed. |
| 64 new AppListWindow(bounds, callback); |
| 63 } | 65 } |
| 64 | 66 |
| 65 void ChromeShellDelegate::LauncherItemClicked( | 67 void ChromeShellDelegate::LauncherItemClicked( |
| 66 const aura_shell::LauncherItem& item) { | 68 const aura_shell::LauncherItem& item) { |
| 67 item.window->Activate(); | 69 item.window->Activate(); |
| 68 } | 70 } |
| 69 | 71 |
| 70 bool ChromeShellDelegate::ConfigureLauncherItem( | 72 bool ChromeShellDelegate::ConfigureLauncherItem( |
| 71 aura_shell::LauncherItem* item) { | 73 aura_shell::LauncherItem* item) { |
| 72 BrowserView* view = BrowserView::GetBrowserViewForNativeWindow(item->window); | 74 BrowserView* view = BrowserView::GetBrowserViewForNativeWindow(item->window); |
| 73 return view && | 75 return view && |
| 74 ShouldCreateLauncherItemForBrowser(view->browser(), &(item->type)); | 76 ShouldCreateLauncherItemForBrowser(view->browser(), &(item->type)); |
| 75 } | 77 } |
| OLD | NEW |