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

Side by Side Diff: chrome/browser/ui/ash/system_tray_delegate_win.cc

Issue 292123014: Ash system tray delegate for Linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove parts of another patch that accidently got committed. Created 6 years, 6 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/ash/system_tray_delegate_linux.cc ('k') | chrome/chrome_browser_ui.gypi » ('j') | 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/ash/system_tray_delegate_win.h" 5 #include "chrome/browser/ui/ash/system_tray_delegate_win.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/shell_delegate.h" 10 #include "ash/shell_delegate.h"
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 // content::NotificationObserver implementation. 312 // content::NotificationObserver implementation.
313 virtual void Observe(int type, 313 virtual void Observe(int type,
314 const content::NotificationSource& source, 314 const content::NotificationSource& source,
315 const content::NotificationDetails& details) OVERRIDE { 315 const content::NotificationDetails& details) OVERRIDE {
316 if (type == chrome::NOTIFICATION_UPGRADE_RECOMMENDED) { 316 if (type == chrome::NOTIFICATION_UPGRADE_RECOMMENDED) {
317 UpgradeDetector* detector = 317 UpgradeDetector* detector =
318 content::Source<UpgradeDetector>(source).ptr(); 318 content::Source<UpgradeDetector>(source).ptr();
319 ash::UpdateObserver::UpdateSeverity severity = 319 ash::UpdateObserver::UpdateSeverity severity =
320 ash::UpdateObserver::UPDATE_NORMAL; 320 ash::UpdateObserver::UPDATE_NORMAL;
321 switch (detector->upgrade_notification_stage()) { 321 switch (detector->upgrade_notification_stage()) {
322 case UpgradeDetector::UPGRADE_ANNOYANCE_CRITICAL:
322 case UpgradeDetector::UPGRADE_ANNOYANCE_SEVERE: 323 case UpgradeDetector::UPGRADE_ANNOYANCE_SEVERE:
323 severity = ash::UpdateObserver::UPDATE_SEVERE_RED; 324 severity = ash::UpdateObserver::UPDATE_SEVERE_RED;
324 break; 325 break;
325 case UpgradeDetector::UPGRADE_ANNOYANCE_HIGH: 326 case UpgradeDetector::UPGRADE_ANNOYANCE_HIGH:
326 severity = ash::UpdateObserver::UPDATE_HIGH_ORANGE; 327 severity = ash::UpdateObserver::UPDATE_HIGH_ORANGE;
327 break; 328 break;
328 case UpgradeDetector::UPGRADE_ANNOYANCE_ELEVATED: 329 case UpgradeDetector::UPGRADE_ANNOYANCE_ELEVATED:
329 severity = ash::UpdateObserver::UPDATE_LOW_GREEN; 330 severity = ash::UpdateObserver::UPDATE_LOW_GREEN;
330 break; 331 break;
331 case UpgradeDetector::UPGRADE_ANNOYANCE_LOW: 332 case UpgradeDetector::UPGRADE_ANNOYANCE_LOW:
333 case UpgradeDetector::UPGRADE_ANNOYANCE_NONE:
332 severity = ash::UpdateObserver::UPDATE_NORMAL; 334 severity = ash::UpdateObserver::UPDATE_NORMAL;
333 break; 335 break;
334 } 336 }
335 GetSystemTrayNotifier()->NotifyUpdateRecommended(severity); 337 GetSystemTrayNotifier()->NotifyUpdateRecommended(severity);
336 } else { 338 } else {
337 NOTREACHED(); 339 NOTREACHED();
338 } 340 }
339 } 341 }
340 342
341 scoped_ptr<content::NotificationRegistrar> registrar_; 343 scoped_ptr<content::NotificationRegistrar> registrar_;
342 base::HourClockType clock_type_; 344 base::HourClockType clock_type_;
343 345
344 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegateWin); 346 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegateWin);
345 }; 347 };
346 348
347 } // namespace 349 } // namespace
348 350
349 351
350 ash::SystemTrayDelegate* CreateWindowsSystemTrayDelegate() { 352 ash::SystemTrayDelegate* CreateWindowsSystemTrayDelegate() {
351 return new SystemTrayDelegateWin(); 353 return new SystemTrayDelegateWin();
352 } 354 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/system_tray_delegate_linux.cc ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698