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

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

Issue 10409022: Move application lifetime functionality off BrowserList. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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
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 "chrome/browser/ui/views/ash/chrome_shell_delegate.h" 5 #include "chrome/browser/ui/views/ash/chrome_shell_delegate.h"
6 6
7 #include "ash/launcher/launcher_types.h" 7 #include "ash/launcher/launcher_types.h"
8 #include "ash/system/tray/system_tray_delegate.h" 8 #include "ash/system/tray/system_tray_delegate.h"
9 #include "ash/wm/partial_screenshot_view.h" 9 #include "ash/wm/partial_screenshot_view.h"
10 #include "ash/wm/window_util.h" 10 #include "ash/wm/window_util.h"
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "chrome/browser/chromeos/login/screen_locker.h" 12 #include "chrome/browser/chromeos/login/screen_locker.h"
13 #include "chrome/browser/extensions/api/terminal/terminal_extension_helper.h" 13 #include "chrome/browser/extensions/api/terminal/terminal_extension_helper.h"
14 #include "chrome/browser/lifetime/application_lifetime.h"
14 #include "chrome/browser/profiles/profile_manager.h" 15 #include "chrome/browser/profiles/profile_manager.h"
15 #include "chrome/browser/ui/browser.h" 16 #include "chrome/browser/ui/browser.h"
16 #include "chrome/browser/ui/browser_finder.h" 17 #include "chrome/browser/ui/browser_finder.h"
17 #include "chrome/browser/ui/browser_list.h" 18 #include "chrome/browser/ui/browser_list.h"
18 #include "chrome/browser/ui/views/ash/app_list/app_list_view_delegate.h" 19 #include "chrome/browser/ui/views/ash/app_list/app_list_view_delegate.h"
19 #include "chrome/browser/ui/views/ash/launcher/chrome_launcher_controller.h" 20 #include "chrome/browser/ui/views/ash/launcher/chrome_launcher_controller.h"
20 #include "chrome/browser/ui/views/ash/window_positioner.h" 21 #include "chrome/browser/ui/views/ash/window_positioner.h"
21 #include "chrome/browser/ui/views/frame/browser_view.h" 22 #include "chrome/browser/ui/views/frame/browser_view.h"
22 #include "chrome/common/chrome_notification_types.h" 23 #include "chrome/common/chrome_notification_types.h"
23 #include "chrome/common/chrome_switches.h" 24 #include "chrome/common/chrome_switches.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 105
105 void ChromeShellDelegate::Shutdown() { 106 void ChromeShellDelegate::Shutdown() {
106 #if defined(OS_CHROMEOS) 107 #if defined(OS_CHROMEOS)
107 content::RecordAction(content::UserMetricsAction("Shutdown")); 108 content::RecordAction(content::UserMetricsAction("Shutdown"));
108 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()-> 109 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->
109 RequestShutdown(); 110 RequestShutdown();
110 #endif 111 #endif
111 } 112 }
112 113
113 void ChromeShellDelegate::Exit() { 114 void ChromeShellDelegate::Exit() {
114 BrowserList::AttemptUserExit(); 115 browser::AttemptUserExit();
115 } 116 }
116 117
117 void ChromeShellDelegate::NewWindow(bool is_incognito) { 118 void ChromeShellDelegate::NewWindow(bool is_incognito) {
118 Profile* profile = ProfileManager::GetDefaultProfileOrOffTheRecord(); 119 Profile* profile = ProfileManager::GetDefaultProfileOrOffTheRecord();
119 Browser::NewEmptyWindow( 120 Browser::NewEmptyWindow(
120 is_incognito ? profile->GetOffTheRecordProfile() : profile); 121 is_incognito ? profile->GetOffTheRecordProfile() : profile);
121 } 122 }
122 123
123 void ChromeShellDelegate::Search() { 124 void ChromeShellDelegate::Search() {
124 // Exit fullscreen to show omnibox. 125 // Exit fullscreen to show omnibox.
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 ash::Shell::GetInstance()->CreateLauncher(); 261 ash::Shell::GetInstance()->CreateLauncher();
261 break; 262 break;
262 default: 263 default:
263 NOTREACHED() << "Unexpected notification " << type; 264 NOTREACHED() << "Unexpected notification " << type;
264 } 265 }
265 #else 266 #else
266 // MSVC++ warns about switch statements without any cases. 267 // MSVC++ warns about switch statements without any cases.
267 NOTREACHED() << "Unexpected notification " << type; 268 NOTREACHED() << "Unexpected notification " << type;
268 #endif 269 #endif
269 } 270 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/about_chrome_view.cc ('k') | chrome/browser/ui/views/critical_notification_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698