Index: chrome/browser/media/router/media_cast_mode.cc |
diff --git a/chrome/browser/media/router/media_cast_mode.cc b/chrome/browser/media/router/media_cast_mode.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..e5d660531b50ae7d22b8ef09d0b5e432694a2f49 |
--- /dev/null |
+++ b/chrome/browser/media/router/media_cast_mode.cc |
@@ -0,0 +1,28 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "chrome/browser/media/router/media_cast_mode.h" |
+ |
+#include "base/logging.h" |
+ |
+namespace media_router { |
+ |
+// TODO(haibinlu): use localized string. |
+std::string MediaCastModeToTitle(MediaCastMode mode) { |
+ switch (mode) { |
+ case MediaCastMode::APP_CAST: |
+ return "Cast [website here]"; |
+ case MediaCastMode::SCREEN_WINDOW_MIRROR: |
+ return "Cast screen/window"; |
+ case MediaCastMode::SOUND_OPTIMIZED_TAB_MIRROR: |
+ return "Cast this tab (optimize for audio)"; |
+ case MediaCastMode::TAB_MIRROR: |
+ return "Cast this tab"; |
+ default: |
+ NOTREACHED(); |
+ return ""; |
+ } |
+} |
+ |
+} // namespace media_router |