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

Side by Side Diff: ash/system/power/tray_power.cc

Issue 10406010: Rename aura-notify ash-notify and add to about_flags. (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
« no previous file with comments | « ash/ash_switches.cc ('k') | chrome/app/generated_resources.grd » ('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 "ash/system/power/tray_power.h" 5 #include "ash/system/power/tray_power.h"
6 6
7 #include "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/system/date/date_view.h" 9 #include "ash/system/date/date_view.h"
10 #include "ash/system/power/power_supply_status.h" 10 #include "ash/system/power/power_supply_status.h"
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 367
368 void TrayPower::UpdateAfterLoginStatusChange(user::LoginStatus status) { 368 void TrayPower::UpdateAfterLoginStatusChange(user::LoginStatus status) {
369 } 369 }
370 370
371 void TrayPower::OnPowerStatusChanged(const PowerSupplyStatus& status) { 371 void TrayPower::OnPowerStatusChanged(const PowerSupplyStatus& status) {
372 if (power_tray_) 372 if (power_tray_)
373 power_tray_->UpdatePowerStatus(status); 373 power_tray_->UpdatePowerStatus(status);
374 if (notification_view_) 374 if (notification_view_)
375 notification_view_->UpdatePowerStatus(status); 375 notification_view_->UpdatePowerStatus(status);
376 376
377 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAuraNotify)) { 377 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshNotify)) {
378 if (UpdateNotificationState(status)) 378 if (UpdateNotificationState(status))
379 ShowNotificationView(); 379 ShowNotificationView();
380 else if (notification_state_ == NOTIFICATION_NONE) 380 else if (notification_state_ == NOTIFICATION_NONE)
381 HideNotificationView(); 381 HideNotificationView();
382 } 382 }
383 } 383 }
384 384
385 bool TrayPower::UpdateNotificationState(const PowerSupplyStatus& status) { 385 bool TrayPower::UpdateNotificationState(const PowerSupplyStatus& status) {
386 if (!status.battery_is_present || 386 if (!status.battery_is_present ||
387 status.is_calculating_battery_time || 387 status.is_calculating_battery_time ||
(...skipping 26 matching lines...) Expand all
414 return false; 414 return false;
415 case NOTIFICATION_CRITICAL: 415 case NOTIFICATION_CRITICAL:
416 return false; 416 return false;
417 } 417 }
418 NOTREACHED(); 418 NOTREACHED();
419 return false; 419 return false;
420 } 420 }
421 421
422 } // namespace internal 422 } // namespace internal
423 } // namespace ash 423 } // namespace ash
OLDNEW
« no previous file with comments | « ash/ash_switches.cc ('k') | chrome/app/generated_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698