OLD | NEW |
---|---|
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/chrome_shell_delegate.h" | 5 #include "chrome/browser/ui/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/window_util.h" | 9 #include "ash/wm/window_util.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
437 ExtensionMediaPlayerEventRouter::GetInstance()->NotifyTogglePlayState(); | 437 ExtensionMediaPlayerEventRouter::GetInstance()->NotifyTogglePlayState(); |
438 #endif | 438 #endif |
439 } | 439 } |
440 | 440 |
441 void ChromeShellDelegate::HandleMediaPrevTrack() { | 441 void ChromeShellDelegate::HandleMediaPrevTrack() { |
442 #if defined(OS_CHROMEOS) | 442 #if defined(OS_CHROMEOS) |
443 ExtensionMediaPlayerEventRouter::GetInstance()->NotifyPrevTrack(); | 443 ExtensionMediaPlayerEventRouter::GetInstance()->NotifyPrevTrack(); |
444 #endif | 444 #endif |
445 } | 445 } |
446 | 446 |
447 string16 ChromeShellDelegate::GetTimeRemainingString(base::TimeDelta delta) { | |
448 return TimeFormat::TimeRemaining(delta); | |
sadrul
2012/10/24 03:49:06
Seeing how complicated the code in TimeFormat is,
jennyz
2012/10/24 18:42:40
I am discussing the TimeFormat::TimeRemainingLong
| |
449 } | |
450 | |
451 void ChromeShellDelegate::SaveScreenMagnifierScale(double scale) { | 447 void ChromeShellDelegate::SaveScreenMagnifierScale(double scale) { |
452 #if defined(OS_CHROMEOS) | 448 #if defined(OS_CHROMEOS) |
453 Profile* profile = ProfileManager::GetDefaultProfileOrOffTheRecord(); | 449 Profile* profile = ProfileManager::GetDefaultProfileOrOffTheRecord(); |
454 profile->GetPrefs()->SetDouble(prefs::kScreenMagnifierScale, scale); | 450 profile->GetPrefs()->SetDouble(prefs::kScreenMagnifierScale, scale); |
455 #endif | 451 #endif |
456 } | 452 } |
457 | 453 |
458 double ChromeShellDelegate::GetSavedScreenMagnifierScale() { | 454 double ChromeShellDelegate::GetSavedScreenMagnifierScale() { |
459 #if defined(OS_CHROMEOS) | 455 #if defined(OS_CHROMEOS) |
460 Profile* profile = ProfileManager::GetDefaultProfileOrOffTheRecord(); | 456 Profile* profile = ProfileManager::GetDefaultProfileOrOffTheRecord(); |
(...skipping 20 matching lines...) Expand all Loading... | |
481 ash::Shell::GetInstance()->ShowLauncher(); | 477 ash::Shell::GetInstance()->ShowLauncher(); |
482 break; | 478 break; |
483 default: | 479 default: |
484 NOTREACHED() << "Unexpected notification " << type; | 480 NOTREACHED() << "Unexpected notification " << type; |
485 } | 481 } |
486 #else | 482 #else |
487 // MSVC++ warns about switch statements without any cases. | 483 // MSVC++ warns about switch statements without any cases. |
488 NOTREACHED() << "Unexpected notification " << type; | 484 NOTREACHED() << "Unexpected notification " << type; |
489 #endif | 485 #endif |
490 } | 486 } |
OLD | NEW |