Chromium Code Reviews| Index: ash/test/test_shell_delegate.cc |
| diff --git a/ash/test/test_shell_delegate.cc b/ash/test/test_shell_delegate.cc |
| index 52962eeb472b927d803e2370affe18325472efe0..b0c13b0e94640051fd72395bfe8879ee172bc634 100644 |
| --- a/ash/test/test_shell_delegate.cc |
| +++ b/ash/test/test_shell_delegate.cc |
| @@ -27,6 +27,10 @@ |
| #include "ui/app_list/test/app_list_test_view_delegate.h" |
| #include "ui/aura/window.h" |
| +#if defined(OS_CHROMEOS) |
| +#include "ash/system/tray/system_tray_notifier.h" |
| +#endif |
| + |
| namespace ash { |
| namespace test { |
| namespace { |
| @@ -44,9 +48,20 @@ class NewWindowDelegateImpl : public NewWindowDelegate { |
| class MediaDelegateImpl : public MediaDelegate { |
| public: |
| + MediaDelegateImpl() : state_(MEDIA_CAPTURE_NONE) {} |
| + virtual ~MediaDelegateImpl() {} |
| + |
|
Mr4D (OOO till 08-26)
2014/04/30 18:24:36
.. overrides:
oshima
2014/04/30 20:40:31
fixed styles etc.
|
| virtual void HandleMediaNextTrack() OVERRIDE {} |
| virtual void HandleMediaPlayPause() OVERRIDE {} |
| virtual void HandleMediaPrevTrack() OVERRIDE {} |
| + virtual MediaCaptureState GetBackgroundMediaCaptureState( |
| + content::BrowserContext* context) OVERRIDE { |
| + return state_; |
| + } |
| + void set_media_capture_state(MediaCaptureState state) { state_ = state; } |
| + |
| + private: |
| + MediaCaptureState state_; |
| }; |
| } // namespace |
| @@ -161,8 +176,14 @@ base::string16 TestShellDelegate::GetProductName() const { |
| return base::string16(); |
| } |
| -TestSessionStateDelegate* TestShellDelegate::test_session_state_delegate() { |
| - return test_session_state_delegate_; |
| +void TestShellDelegate::SetBackgroundMediaCaptureState( |
| + MediaCaptureState state) { |
| +#if defined(OS_CHROMEOS) |
| + Shell* shell = Shell::GetInstance(); |
| + static_cast<MediaDelegateImpl*>(shell->media_delegate()) |
| + ->set_media_capture_state(state); |
| + shell->system_tray_notifier()->NotifyMediaCaptureChanged(); |
| +#endif |
| } |
| } // namespace test |