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

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

Issue 9764012: Restore to user selected wallpaper after browser crash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Create a dummy class to fix test fail. Created 8 years, 9 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 | « chrome/browser/ui/views/ash/chrome_shell_delegate.h ('k') | no next file » | 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 "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/ui/browser.h" 12 #include "chrome/browser/ui/browser.h"
13 #include "chrome/browser/ui/browser_list.h" 13 #include "chrome/browser/ui/browser_list.h"
14 #include "chrome/browser/ui/views/ash/app_list/app_list_view_delegate.h" 14 #include "chrome/browser/ui/views/ash/app_list/app_list_view_delegate.h"
15 #include "chrome/browser/ui/views/ash/launcher/chrome_launcher_delegate.h" 15 #include "chrome/browser/ui/views/ash/launcher/chrome_launcher_delegate.h"
16 #include "chrome/browser/ui/views/ash/status_area_host_aura.h" 16 #include "chrome/browser/ui/views/ash/status_area_host_aura.h"
17 #include "chrome/browser/ui/views/ash/window_positioner.h" 17 #include "chrome/browser/ui/views/ash/window_positioner.h"
18 #include "chrome/browser/ui/views/frame/browser_view.h" 18 #include "chrome/browser/ui/views/frame/browser_view.h"
19 #include "chrome/common/chrome_notification_types.h" 19 #include "chrome/common/chrome_notification_types.h"
20 #include "chrome/common/chrome_switches.h" 20 #include "chrome/common/chrome_switches.h"
21 #include "content/public/browser/notification_service.h" 21 #include "content/public/browser/notification_service.h"
22 #include "ui/aura/window.h" 22 #include "ui/aura/window.h"
23 23
24 #if defined(OS_CHROMEOS) 24 #if defined(OS_CHROMEOS)
25 #include "base/chromeos/chromeos_version.h" 25 #include "base/chromeos/chromeos_version.h"
26 #include "chrome/browser/chromeos/background/desktop_background_observer.h"
26 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" 27 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h"
27 #include "chrome/browser/chromeos/dbus/power_manager_client.h" 28 #include "chrome/browser/chromeos/dbus/power_manager_client.h"
28 #include "chrome/browser/chromeos/login/user_manager.h" 29 #include "chrome/browser/chromeos/login/user_manager.h"
29 #include "chrome/browser/chromeos/system/ash_system_tray_delegate.h" 30 #include "chrome/browser/chromeos/system/ash_system_tray_delegate.h"
30 #endif 31 #endif
31 namespace { 32 namespace {
32 33
33 // Returns a list of Aura windows from a BrowserList, using either a 34 // Returns a list of Aura windows from a BrowserList, using either a
34 // const_iterator or const_reverse_iterator. 35 // const_iterator or const_reverse_iterator.
35 template<typename IT> 36 template<typename IT>
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 129
129 ash::SystemTrayDelegate* ChromeShellDelegate::CreateSystemTrayDelegate( 130 ash::SystemTrayDelegate* ChromeShellDelegate::CreateSystemTrayDelegate(
130 ash::SystemTray* tray) { 131 ash::SystemTray* tray) {
131 #if defined(OS_CHROMEOS) 132 #if defined(OS_CHROMEOS)
132 return chromeos::CreateSystemTrayDelegate(tray); 133 return chromeos::CreateSystemTrayDelegate(tray);
133 #else 134 #else
134 return NULL; 135 return NULL;
135 #endif 136 #endif
136 } 137 }
137 138
139 ash::UserWallpaperDelegate* ChromeShellDelegate::CreateUserWallpaperDelegate() {
140 #if defined(OS_CHROMEOS)
141 return chromeos::CreateUserWallpaperDelegate();
142 #else
143 return NULL;
144 #endif
145 }
146
138 void ChromeShellDelegate::Observe(int type, 147 void ChromeShellDelegate::Observe(int type,
139 const content::NotificationSource& source, 148 const content::NotificationSource& source,
140 const content::NotificationDetails& details) { 149 const content::NotificationDetails& details) {
141 #if defined(OS_CHROMEOS) 150 #if defined(OS_CHROMEOS)
142 switch (type) { 151 switch (type) {
143 case chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED: 152 case chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED:
144 ash::Shell::GetInstance()->CreateLauncher(); 153 ash::Shell::GetInstance()->CreateLauncher();
145 break; 154 break;
146 default: 155 default:
147 NOTREACHED() << "Unexpected notification " << type; 156 NOTREACHED() << "Unexpected notification " << type;
148 } 157 }
149 #else 158 #else
150 // MSVC++ warns about switch statements without any cases. 159 // MSVC++ warns about switch statements without any cases.
151 NOTREACHED() << "Unexpected notification " << type; 160 NOTREACHED() << "Unexpected notification " << type;
152 #endif 161 #endif
153 } 162 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/ash/chrome_shell_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698