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

Side by Side Diff: chrome/browser/media/router/media_sources.h

Issue 949293004: Add media router common classes and unittests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code review feedback. Created 5 years, 9 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SOURCES_H_
6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SOURCES_H_
xhwang 2015/03/10 04:27:07 media_sources.h isn't very informative... maybe me
Kevin M 2015/03/10 17:40:03 Done.
7
8 #include <string>
9
10 #include "chrome/browser/media/router/media_source.h"
11
12 namespace media_router {
13
14 // Helper library for protocol-specific media source object creation.
15
16 // TODO(kmarshall): Should these creation methods be moved to the WebUI, which
17 // (excluding Presentation API) is their only caller? The MR base code can be
18 // Also, consider generating an is_mirroring state boolean at the time of URN
19 // creation so that the mirroring status does not have to be determined from a
20 // string prefix check.
21 // These changes would allow the MR to handle MediaSource objects in the same
22 // type agnostic fashion vs. having to format and parse URNs and track which
23 // MediaSource types are mirroring-enabled.
24
25 // Returns MediaSource URI depending on the type of source.
26 MediaSource ForTabMediaSource(int tab_id);
27 MediaSource ForDesktopMediaSource();
28 MediaSource ForCastAppMediaSource(const std::string& app_id);
29 MediaSource ForPresentationUrl(const std::string& presentation_url);
30
31 // Returns true if |source| outputs its content via mirroring.
32 bool IsMirroringMediaSource(const MediaSource& source);
33
34 // Checks that |source| is a parseable URN and is of a known type.
35 // Does not deeper protocol-level syntax checks.
36 bool IsValidMediaSource(const MediaSource& source);
37
38 } // namespace media_router
39
40 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SOURCES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698