Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/ash/chrome_shell_delegate.h" | 5 #include "chrome/browser/ui/ash/chrome_shell_delegate.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "ash/accessibility_delegate.h" | 9 #include "ash/accessibility_delegate.h" |
| 10 #include "ash/magnifier/magnifier_constants.h" | 10 #include "ash/magnifier/magnifier_constants.h" |
| 11 #include "ash/media_delegate.h" | 11 #include "ash/media_delegate.h" |
| 12 #include "ash/system/tray/default_system_tray_delegate.h" | |
| 13 #include "ash/wm/window_util.h" | 12 #include "ash/wm/window_util.h" |
| 14 #include "base/command_line.h" | 13 #include "base/command_line.h" |
| 15 #include "chrome/browser/accessibility/accessibility_events.h" | 14 #include "chrome/browser/accessibility/accessibility_events.h" |
| 16 #include "chrome/browser/browser_process.h" | 15 #include "chrome/browser/browser_process.h" |
| 17 #include "chrome/browser/chrome_notification_types.h" | 16 #include "chrome/browser/chrome_notification_types.h" |
| 18 #include "chrome/browser/prefs/session_startup_pref.h" | 17 #include "chrome/browser/prefs/session_startup_pref.h" |
| 19 #include "chrome/browser/profiles/profile.h" | 18 #include "chrome/browser/profiles/profile.h" |
| 20 #include "chrome/browser/profiles/profile_manager.h" | 19 #include "chrome/browser/profiles/profile_manager.h" |
| 21 #include "chrome/browser/signin/signin_error_notifier_factory_ash.h" | 20 #include "chrome/browser/signin/signin_error_notifier_factory_ash.h" |
| 22 #include "chrome/browser/sync/sync_error_notifier_factory_ash.h" | 21 #include "chrome/browser/sync/sync_error_notifier_factory_ash.h" |
| 23 #include "chrome/browser/ui/ash/chrome_new_window_delegate.h" | 22 #include "chrome/browser/ui/ash/chrome_new_window_delegate.h" |
| 24 #include "chrome/browser/ui/ash/session_state_delegate_views.h" | 23 #include "chrome/browser/ui/ash/session_state_delegate_views.h" |
| 25 #include "chrome/browser/ui/ash/solid_color_user_wallpaper_delegate.h" | 24 #include "chrome/browser/ui/ash/solid_color_user_wallpaper_delegate.h" |
| 25 #include "chrome/browser/ui/ash/system_tray_delegate_common.h" | |
| 26 #include "chrome/browser/ui/browser.h" | 26 #include "chrome/browser/ui/browser.h" |
| 27 #include "chrome/browser/ui/browser_finder.h" | 27 #include "chrome/browser/ui/browser_finder.h" |
| 28 #include "chrome/browser/ui/browser_list.h" | 28 #include "chrome/browser/ui/browser_list.h" |
| 29 #include "chrome/browser/ui/browser_tabstrip.h" | 29 #include "chrome/browser/ui/browser_tabstrip.h" |
| 30 #include "chrome/browser/ui/browser_window.h" | 30 #include "chrome/browser/ui/browser_window.h" |
| 31 #include "chrome/browser/ui/host_desktop.h" | 31 #include "chrome/browser/ui/host_desktop.h" |
| 32 #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h" | 32 #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h" |
| 33 #include "chrome/browser/ui/startup/startup_browser_creator_impl.h" | 33 #include "chrome/browser/ui/startup/startup_browser_creator_impl.h" |
| 34 #include "chrome/common/chrome_switches.h" | 34 #include "chrome/common/chrome_switches.h" |
| 35 #include "content/public/browser/notification_service.h" | 35 #include "content/public/browser/notification_service.h" |
| 36 | 36 |
| 37 #if defined(OS_WIN) | |
| 38 #include "chrome/browser/ui/ash/system_tray_delegate_win.h" | |
| 39 #endif | |
| 40 | |
| 41 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | |
| 42 #include "chrome/browser/ui/ash/system_tray_delegate_linux.h" | |
| 43 #endif | |
| 44 | |
| 45 namespace { | 37 namespace { |
| 46 | 38 |
| 47 class NewWindowDelegateImpl : public ChromeNewWindowDelegate { | 39 class NewWindowDelegateImpl : public ChromeNewWindowDelegate { |
| 48 public: | 40 public: |
| 49 NewWindowDelegateImpl() {} | 41 NewWindowDelegateImpl() {} |
| 50 virtual ~NewWindowDelegateImpl() {} | 42 virtual ~NewWindowDelegateImpl() {} |
| 51 | 43 |
| 52 // Overridden from ash::NewWindowDelegate: | 44 // Overridden from ash::NewWindowDelegate: |
| 53 virtual void OpenFileManager() override {} | 45 virtual void OpenFileManager() override {} |
| 54 virtual void OpenCrosh() override {} | 46 virtual void OpenCrosh() override {} |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 182 | 174 |
| 183 ash::MediaDelegate* ChromeShellDelegate::CreateMediaDelegate() { | 175 ash::MediaDelegate* ChromeShellDelegate::CreateMediaDelegate() { |
| 184 return new MediaDelegateImpl; | 176 return new MediaDelegateImpl; |
| 185 } | 177 } |
| 186 | 178 |
| 187 ash::SessionStateDelegate* ChromeShellDelegate::CreateSessionStateDelegate() { | 179 ash::SessionStateDelegate* ChromeShellDelegate::CreateSessionStateDelegate() { |
| 188 return new SessionStateDelegate; | 180 return new SessionStateDelegate; |
| 189 } | 181 } |
| 190 | 182 |
| 191 ash::SystemTrayDelegate* ChromeShellDelegate::CreateSystemTrayDelegate() { | 183 ash::SystemTrayDelegate* ChromeShellDelegate::CreateSystemTrayDelegate() { |
| 192 #if defined(OS_WIN) | 184 return ::CreateSystemTrayDelegate(); |
|
sky
2014/10/10 17:40:31
Sorry, one more. There is no point in the function
ygorshenin1
2014/10/13 12:06:17
Done.
| |
| 193 return CreateWindowsSystemTrayDelegate(); | |
| 194 #elif defined(OS_LINUX) && !defined(OS_CHROMEOS) | |
| 195 return CreateLinuxSystemTrayDelegate(); | |
| 196 #else | |
| 197 return new ash::DefaultSystemTrayDelegate; | |
| 198 #endif | |
| 199 } | 185 } |
| 200 | 186 |
| 201 ash::AccessibilityDelegate* ChromeShellDelegate::CreateAccessibilityDelegate() { | 187 ash::AccessibilityDelegate* ChromeShellDelegate::CreateAccessibilityDelegate() { |
| 202 return new EmptyAccessibilityDelegate; | 188 return new EmptyAccessibilityDelegate; |
| 203 } | 189 } |
| 204 | 190 |
| 205 ash::UserWallpaperDelegate* ChromeShellDelegate::CreateUserWallpaperDelegate() { | 191 ash::UserWallpaperDelegate* ChromeShellDelegate::CreateUserWallpaperDelegate() { |
| 206 return CreateSolidColorUserWallpaperDelegate(); | 192 return CreateSolidColorUserWallpaperDelegate(); |
| 207 } | 193 } |
| 208 | 194 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 284 chrome::NOTIFICATION_PROFILE_ADDED, | 270 chrome::NOTIFICATION_PROFILE_ADDED, |
| 285 content::NotificationService::AllSources()); | 271 content::NotificationService::AllSources()); |
| 286 registrar_.Add(this, | 272 registrar_.Add(this, |
| 287 chrome::NOTIFICATION_ASH_SESSION_STARTED, | 273 chrome::NOTIFICATION_ASH_SESSION_STARTED, |
| 288 content::NotificationService::AllSources()); | 274 content::NotificationService::AllSources()); |
| 289 registrar_.Add(this, | 275 registrar_.Add(this, |
| 290 chrome::NOTIFICATION_ASH_SESSION_ENDED, | 276 chrome::NOTIFICATION_ASH_SESSION_ENDED, |
| 291 content::NotificationService::AllSources()); | 277 content::NotificationService::AllSources()); |
| 292 #endif | 278 #endif |
| 293 } | 279 } |
| OLD | NEW |