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

Unified Diff: ash/common/cast_config_delegate.h

Issue 2466043002: Cleanup TrayCast with media-router only support in mind. (Closed)
Patch Set: Add TODO Created 4 years, 1 month 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 | « no previous file | ash/common/system/chromeos/cast/tray_cast.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/cast_config_delegate.h
diff --git a/ash/common/cast_config_delegate.h b/ash/common/cast_config_delegate.h
index 2f3fec209ecdae2cf06318887cb222894ec38b08..63a580b5720bf18c452067f0644f8cc5cb0446d0 100644
--- a/ash/common/cast_config_delegate.h
+++ b/ash/common/cast_config_delegate.h
@@ -26,22 +26,11 @@ class CastConfigDelegate {
std::string id;
base::string16 name;
+ base::string16 domain;
};
struct ASH_EXPORT Route {
- // The tab identifier that we are casting. These are the special tab values
- // taken from the chromecast extension itself. If an actual tab is being
- // casted, then the TabId will be >= 0.
- enum TabId {
- EXTENSION = -1,
- DESKTOP = -2,
- DISCOVERED_ACTIVITY = -3,
- EXTERNAL_EXTENSION_CLIENT = -4,
-
- // Not in the extension. Used when the extension does not give us a tabId
- // (ie, the cast is running from another device).
- UNKNOWN = -5
- };
+ enum class ContentSource { UNKNOWN, TAB, DESKTOP };
Route();
~Route();
@@ -49,16 +38,12 @@ class CastConfigDelegate {
std::string id;
base::string16 title;
- // Is the route source this computer? ie, are we mirroring the display?
+ // Is the activity originating from this computer?
bool is_local_source = false;
- // The id for the tab we are casting. Could be one of the TabId values,
- // or a value >= 0 that represents that tab index of the tab we are
- // casting. We default to casting the desktop, as a tab may not
- // necessarily exist.
- // TODO(jdufault): Remove tab_id once the CastConfigDelegateChromeos is
- // gone. See crbug.com/551132.
- int tab_id = TabId::DESKTOP;
+ // What is source of the content? For example, we could be DIAL casting a
+ // tab or mirroring the entire desktop.
+ ContentSource content_source = ContentSource::UNKNOWN;
};
struct ASH_EXPORT SinkAndRoute {
@@ -89,12 +74,11 @@ class CastConfigDelegate {
// registered observers will get called.
virtual void RequestDeviceRefresh() = 0;
- // Cast to a sink specified by |sink_id|.
- virtual void CastToSink(const std::string& sink_id) = 0;
+ // Initiate a casting session to |sink|.
+ virtual void CastToSink(const Sink& sink) = 0;
- // Stop an ongoing cast (this should be a user initiated stop). |route_id|
- // is the identifier of the sink/route that should be stopped.
- virtual void StopCasting(const std::string& route_id) = 0;
+ // A user-initiated request to stop the given cast session.
+ virtual void StopCasting(const Route& route) = 0;
// Add or remove an observer.
virtual void AddObserver(Observer* observer) = 0;
« no previous file with comments | « no previous file | ash/common/system/chromeos/cast/tray_cast.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698