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" |
(...skipping 20 matching lines...) Expand all Loading... |
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) | 37 #if defined(OS_WIN) |
38 #include "chrome/browser/ui/ash/system_tray_delegate_win.h" | 38 #include "chrome/browser/ui/ash/system_tray_delegate_win.h" |
39 #endif | 39 #endif |
40 | 40 |
| 41 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 42 #include "chrome/browser/ui/ash/system_tray_delegate_linux.h" |
| 43 #endif |
| 44 |
41 namespace { | 45 namespace { |
42 | 46 |
43 class NewWindowDelegateImpl : public ChromeNewWindowDelegate { | 47 class NewWindowDelegateImpl : public ChromeNewWindowDelegate { |
44 public: | 48 public: |
45 NewWindowDelegateImpl() {} | 49 NewWindowDelegateImpl() {} |
46 virtual ~NewWindowDelegateImpl() {} | 50 virtual ~NewWindowDelegateImpl() {} |
47 | 51 |
48 // Overridden from ash::NewWindowDelegate: | 52 // Overridden from ash::NewWindowDelegate: |
49 virtual void OpenFileManager() OVERRIDE {} | 53 virtual void OpenFileManager() OVERRIDE {} |
50 virtual void OpenCrosh() OVERRIDE {} | 54 virtual void OpenCrosh() OVERRIDE {} |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 return new MediaDelegateImpl; | 181 return new MediaDelegateImpl; |
178 } | 182 } |
179 | 183 |
180 ash::SessionStateDelegate* ChromeShellDelegate::CreateSessionStateDelegate() { | 184 ash::SessionStateDelegate* ChromeShellDelegate::CreateSessionStateDelegate() { |
181 return new SessionStateDelegate; | 185 return new SessionStateDelegate; |
182 } | 186 } |
183 | 187 |
184 ash::SystemTrayDelegate* ChromeShellDelegate::CreateSystemTrayDelegate() { | 188 ash::SystemTrayDelegate* ChromeShellDelegate::CreateSystemTrayDelegate() { |
185 #if defined(OS_WIN) | 189 #if defined(OS_WIN) |
186 return CreateWindowsSystemTrayDelegate(); | 190 return CreateWindowsSystemTrayDelegate(); |
| 191 #elif defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 192 return CreateLinuxSystemTrayDelegate(); |
187 #else | 193 #else |
188 return new ash::DefaultSystemTrayDelegate; | 194 return new ash::DefaultSystemTrayDelegate; |
189 #endif | 195 #endif |
190 } | 196 } |
191 | 197 |
192 ash::AccessibilityDelegate* ChromeShellDelegate::CreateAccessibilityDelegate() { | 198 ash::AccessibilityDelegate* ChromeShellDelegate::CreateAccessibilityDelegate() { |
193 return new EmptyAccessibilityDelegate; | 199 return new EmptyAccessibilityDelegate; |
194 } | 200 } |
195 | 201 |
196 ash::UserWallpaperDelegate* ChromeShellDelegate::CreateUserWallpaperDelegate() { | 202 ash::UserWallpaperDelegate* ChromeShellDelegate::CreateUserWallpaperDelegate() { |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 chrome::NOTIFICATION_PROFILE_ADDED, | 281 chrome::NOTIFICATION_PROFILE_ADDED, |
276 content::NotificationService::AllSources()); | 282 content::NotificationService::AllSources()); |
277 registrar_.Add(this, | 283 registrar_.Add(this, |
278 chrome::NOTIFICATION_ASH_SESSION_STARTED, | 284 chrome::NOTIFICATION_ASH_SESSION_STARTED, |
279 content::NotificationService::AllSources()); | 285 content::NotificationService::AllSources()); |
280 registrar_.Add(this, | 286 registrar_.Add(this, |
281 chrome::NOTIFICATION_ASH_SESSION_ENDED, | 287 chrome::NOTIFICATION_ASH_SESSION_ENDED, |
282 content::NotificationService::AllSources()); | 288 content::NotificationService::AllSources()); |
283 #endif | 289 #endif |
284 } | 290 } |
OLD | NEW |