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

Side by Side Diff: chrome/browser/ui/webui/media_router/media_router_ui.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_ROUTER_UI_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_ROUTER_UI_H_
6 #define CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_ROUTER_UI_H_ 6 #define CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_ROUTER_UI_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 const std::vector<MediaRoute>& routes() const { return routes_; } 145 const std::vector<MediaRoute>& routes() const { return routes_; }
146 const std::vector<MediaRoute::Id>& joinable_route_ids() const { 146 const std::vector<MediaRoute::Id>& joinable_route_ids() const {
147 return joinable_route_ids_; 147 return joinable_route_ids_;
148 } 148 }
149 virtual const std::set<MediaCastMode>& cast_modes() const; 149 virtual const std::set<MediaCastMode>& cast_modes() const;
150 const std::unordered_map<MediaRoute::Id, MediaCastMode>& 150 const std::unordered_map<MediaRoute::Id, MediaCastMode>&
151 routes_and_cast_modes() const { 151 routes_and_cast_modes() const {
152 return routes_and_cast_modes_; 152 return routes_and_cast_modes_;
153 } 153 }
154 const content::WebContents* initiator() const { return initiator_; } 154 const content::WebContents* initiator() const { return initiator_; }
155 const base::Optional<MediaCastMode>& forced_cast_mode() const {
156 return forced_cast_mode_;
157 }
155 158
156 virtual const std::string& GetRouteProviderExtensionId() const; 159 virtual const std::string& GetRouteProviderExtensionId() const;
157 160
158 // Called to track UI metrics. 161 // Called to track UI metrics.
159 void SetUIInitializationTimer(const base::Time& start_time); 162 void SetUIInitializationTimer(const base::Time& start_time);
160 void OnUIInitiallyLoaded(); 163 void OnUIInitiallyLoaded();
161 void OnUIInitialDataReceived(); 164 void OnUIInitialDataReceived();
162 165
163 void UpdateMaxDialogHeight(int height); 166 void UpdateMaxDialogHeight(int height);
164 167
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 MediaRouter* router_; 389 MediaRouter* router_;
387 390
388 // The start time for UI initialization metrics timer. When a dialog has been 391 // The start time for UI initialization metrics timer. When a dialog has been
389 // been painted and initialized with initial data, this should be cleared. 392 // been painted and initialized with initial data, this should be cleared.
390 base::Time start_time_; 393 base::Time start_time_;
391 394
392 // The observer for the route controller. Notifies |handler_| of media status 395 // The observer for the route controller. Notifies |handler_| of media status
393 // updates. 396 // updates.
394 std::unique_ptr<UIMediaRouteControllerObserver> route_controller_observer_; 397 std::unique_ptr<UIMediaRouteControllerObserver> route_controller_observer_;
395 398
399 // If set, a cast mode that is required to be shown first.
400 base::Optional<MediaCastMode> forced_cast_mode_;
401
396 // NOTE: Weak pointers must be invalidated before all other member variables. 402 // NOTE: Weak pointers must be invalidated before all other member variables.
397 // Therefore |weak_factory_| must be placed at the end. 403 // Therefore |weak_factory_| must be placed at the end.
398 base::WeakPtrFactory<MediaRouterUI> weak_factory_; 404 base::WeakPtrFactory<MediaRouterUI> weak_factory_;
399 405
400 DISALLOW_COPY_AND_ASSIGN(MediaRouterUI); 406 DISALLOW_COPY_AND_ASSIGN(MediaRouterUI);
401 }; 407 };
402 408
403 } // namespace media_router 409 } // namespace media_router
404 410
405 #endif // CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_ROUTER_UI_H_ 411 #endif // CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_ROUTER_UI_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/media_router/media_cast_mode.h ('k') | chrome/browser/ui/webui/media_router/media_router_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698