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

Side by Side Diff: chrome/browser/ui/webui/media_router/media_cast_mode.h

Issue 2862393002: [Media Router] Force DEFAULT cast mode when starting presentations from content. (Closed)
Patch Set: Fix bug found by closure compiler Created 3 years, 7 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_CAST_MODE_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_CAST_MODE_H_
6 #define CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_CAST_MODE_H_ 6 #define CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_CAST_MODE_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
11 namespace media_router { 11 namespace media_router {
12 12
13 // A cast mode represents one way that the current WebContents (i.e., tab) may 13 // A cast mode represents one way that the current WebContents (i.e., tab) may
14 // be presented to a media sink. These must be declared in the priority order 14 // be presented to a media sink. These must be declared in the priority order
15 // returned by GetPreferredCastMode. 15 // returned by GetPreferredCastMode.
16 enum MediaCastMode { 16 enum MediaCastMode {
17 // The default presentation for the WebContents. Only available when the 17 // A presentation URL provided by the WebContents via the Presentation API.
18 // document has provided a default presentation URL. 18 // This can be set by the default presentation URL (for top level browsing
19 // contexts) or presentation URLs passed with a PresentationRequest (for top
20 // level and nested browsing contexts).
21 // TODO(mfoltz): More accurately named PRESENTATION
19 DEFAULT = 0x1, 22 DEFAULT = 0x1,
20 // Capture the rendered WebContents and stream it to a media sink. Always 23 // Capture the rendered WebContents and stream it to a media sink. Always
21 // available. 24 // available.
22 TAB_MIRROR = 0x2, 25 TAB_MIRROR = 0x2,
23 // Capture the entire desktop and stream it to a media sink. Always 26 // Capture the entire desktop and stream it to a media sink. Always
24 // available. 27 // available.
25 DESKTOP_MIRROR = 0x4, 28 DESKTOP_MIRROR = 0x4,
26 }; 29 };
27 30
28 using CastModeSet = std::set<MediaCastMode>; 31 using CastModeSet = std::set<MediaCastMode>;
29 32
30 // Returns a localized description string for |mode| and |host| 33 // Returns a localized description string for |mode| and |host|
31 // (e.g. google.com). 34 // (e.g. google.com).
32 std::string MediaCastModeToDescription(MediaCastMode mode, 35 std::string MediaCastModeToDescription(MediaCastMode mode,
33 const std::string& host); 36 const std::string& host);
34 37
35 // Returns true if |cast_mode_num| is a valid MediaCastMode, false otherwise. 38 // Returns true if |cast_mode_num| is a valid MediaCastMode, false otherwise.
36 bool IsValidCastModeNum(int cast_mode_num); 39 bool IsValidCastModeNum(int cast_mode_num);
37 40
38 } // namespace media_router 41 } // namespace media_router
39 42
40 #endif // CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_CAST_MODE_H_ 43 #endif // CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_CAST_MODE_H_
OLDNEW
« no previous file with comments | « chrome/browser/resources/media_router/media_router_data.js ('k') | chrome/browser/ui/webui/media_router/media_router_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698