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

Unified Diff: chrome/browser/media/router/dial_media_sink.h

Issue 2675033002: [Media Router] Add MediaSink subtypes (Closed)
Patch Set: add url.mojom to media_router.mojoms JsResources Created 3 years, 10 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
Index: chrome/browser/media/router/dial_media_sink.h
diff --git a/chrome/browser/media/router/dial_media_sink.h b/chrome/browser/media/router/dial_media_sink.h
new file mode 100644
index 0000000000000000000000000000000000000000..3d27747a1b730b1a8c3b71192db86bbe93e99b8e
--- /dev/null
+++ b/chrome/browser/media/router/dial_media_sink.h
@@ -0,0 +1,43 @@
+// Copyright 2017 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.
+
+#ifndef CHROME_BROWSER_MEDIA_ROUTER_DIAL_MEDIA_SINK_H_
+#define CHROME_BROWSER_MEDIA_ROUTER_DIAL_MEDIA_SINK_H_
+
+#include "chrome/browser/media/router/media_sink.h"
+#include "url/gurl.h"
+
+namespace media_router {
+
+// Represents a dial sink to which media can be routed.
+class DialMediaSink : public MediaSink {
+ public:
+ DialMediaSink(const MediaSink::Id& sink_id,
+ const std::string& name,
+ const IconType icon_type);
+ DialMediaSink(const DialMediaSink& other);
+ ~DialMediaSink();
+
+ const std::string& ip_address() const { return ip_address_; }
+ void set_ip_address(const std::string& ip_address) {
+ ip_address_ = ip_address;
+ }
+ const GURL& app_url() const { return app_url_; }
+ void set_app_url(const GURL& app_url) { app_url_ = app_url; }
+
+ // Used by mojo.
+ static const DialMediaSink* Cast(const MediaSink* sink);
+ static DialMediaSink* Cast(MediaSink* sink);
+
+ private:
+ // Used for feedback
imcheng 2017/02/08 01:28:08 Not needed.
zhaobin 2017/02/09 00:13:52 Done.
+ std::string ip_address_;
+
+ // Used for DIAL launch
imcheng 2017/02/08 01:28:08 I would probably write this as: // The base URL u
zhaobin 2017/02/09 00:13:52 Done.
+ GURL app_url_;
+};
+
+} // namespace media_router
+
+#endif // CHROME_BROWSER_MEDIA_ROUTER_DIAL_MEDIA_SINK_H_

Powered by Google App Engine
This is Rietveld 408576698