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

Unified Diff: ash/test/test_shell_delegate.cc

Issue 253183003: Media indicator for background recording task (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win build Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/test/test_shell_delegate.h ('k') | chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..2a6597d13022caae5cb3fba51f059f95dc0d3ddc 100644
--- a/ash/test/test_shell_delegate.cc
+++ b/ash/test/test_shell_delegate.cc
@@ -27,11 +27,21 @@
#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 {
class NewWindowDelegateImpl : public NewWindowDelegate {
+ public:
+ NewWindowDelegateImpl() {}
+ virtual ~NewWindowDelegateImpl() {}
+
+ private:
+ // NewWindowDelegate:
virtual void NewTab() OVERRIDE {}
virtual void NewWindow(bool incognito) OVERRIDE {}
virtual void OpenFileManager() OVERRIDE {}
@@ -40,13 +50,30 @@ class NewWindowDelegateImpl : public NewWindowDelegate {
virtual void ShowKeyboardOverlay() OVERRIDE {}
virtual void ShowTaskManager() OVERRIDE {}
virtual void OpenFeedbackPage() OVERRIDE {}
+
+ DISALLOW_COPY_AND_ASSIGN(NewWindowDelegateImpl);
};
class MediaDelegateImpl : public MediaDelegate {
public:
+ MediaDelegateImpl() : state_(MEDIA_CAPTURE_NONE) {}
+ virtual ~MediaDelegateImpl() {}
+
+ void set_media_capture_state(MediaCaptureState state) { state_ = state; }
+
+ private:
+ // MediaDelegate:
virtual void HandleMediaNextTrack() OVERRIDE {}
virtual void HandleMediaPlayPause() OVERRIDE {}
virtual void HandleMediaPrevTrack() OVERRIDE {}
+ virtual MediaCaptureState GetMediaCaptureState(
+ content::BrowserContext* context) OVERRIDE {
+ return state_;
+ }
+
+ MediaCaptureState state_;
+
+ DISALLOW_COPY_AND_ASSIGN(MediaDelegateImpl);
};
} // namespace
@@ -161,8 +188,13 @@ base::string16 TestShellDelegate::GetProductName() const {
return base::string16();
}
-TestSessionStateDelegate* TestShellDelegate::test_session_state_delegate() {
- return test_session_state_delegate_;
+void TestShellDelegate::SetMediaCaptureState(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
« no previous file with comments | « ash/test/test_shell_delegate.h ('k') | chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698