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

Unified Diff: chrome/common/media_router/discovery/media_sink_service.h

Issue 2701633002: [Media Router] Add DialMediaSinkService and DeviceDescriptionService (Closed)
Patch Set: fix chromeos compile error Created 3 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
Index: chrome/common/media_router/discovery/media_sink_service.h
diff --git a/chrome/browser/media/router/media_sink_service.h b/chrome/common/media_router/discovery/media_sink_service.h
similarity index 57%
rename from chrome/browser/media/router/media_sink_service.h
rename to chrome/common/media_router/discovery/media_sink_service.h
index 9b910c64439e4ebb90d60fd53f12fb8bae31b02c..5e2f0bcd48f44b591949db9d916e0167af88fc89 100644
--- a/chrome/browser/media/router/media_sink_service.h
+++ b/chrome/common/media_router/discovery/media_sink_service.h
@@ -2,19 +2,18 @@
// 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_MEDIA_SINK_SERVICE_H_
-#define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SINK_SERVICE_H_
+#ifndef CHROME_COMMON_MEDIA_ROUTER_DISCOVERY_MEDIA_SINK_SERVICE_H_
+#define CHROME_COMMON_MEDIA_ROUTER_DISCOVERY_MEDIA_SINK_SERVICE_H_
#include <memory>
#include <vector>
#include "base/callback.h"
+#include "chrome/common/media_router/discovery/media_sink_internal.h"
#include "chrome/common/media_router/media_sink.h"
namespace media_router {
-class MediaSinksObserver;
-
// A service which can be used to start background discovery and resolution of
// MediaSinks. Often these are remote devices, like Chromecast. In addition, the
// service is capable of answering MediaSink queries using the sinks that it
@@ -25,10 +24,10 @@ class MediaSinkService {
// Callback to be invoked when this class finishes sink discovering.
// Arg 0: Sinks discovered and resolved by the service.
using OnSinksDiscoveredCallback =
- base::Callback<void(const std::vector<MediaSink>&)>;
+ base::Callback<void(const std::vector<MediaSinkInternal>&)>;
explicit MediaSinkService(
- const OnSinksDiscoveredCallback& sinks_discovered_callback);
+ const OnSinksDiscoveredCallback& sink_discovery_callback);
virtual ~MediaSinkService();
@@ -37,22 +36,12 @@ class MediaSinkService {
// |callback|.
virtual void Start() = 0;
- // Adds a sink query to observe for MediaSink updates.
- // Multiple observers can be added for a given MediaSource.
- // Start() must be called first. This class does not take
- // ownership of |observer|.
- virtual void AddSinkQuery(MediaSinksObserver* observer) = 0;
-
- // Removes a sink query and stops observing MediaSink updates. No-op if
- // |observer| is not registered with this class.
- virtual void RemoveSinkQuery(MediaSinksObserver* observer) = 0;
-
protected:
- OnSinksDiscoveredCallback sinks_discovered_callback_;
+ OnSinksDiscoveredCallback sink_discovery_callback_;
DISALLOW_COPY_AND_ASSIGN(MediaSinkService);
};
} // namespace media_router
-#endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SINK_SERVICE_H_
+#endif // CHROME_COMMON_MEDIA_ROUTER_DISCOVERY_MEDIA_SINK_SERVICE_H_

Powered by Google App Engine
This is Rietveld 408576698