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

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

Issue 1273423004: Shows a launch spinner next to a sink once it is selected to create a route. The launch spinner sur… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Kevin's comments Created 5 years, 4 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 <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 // Returns the hostname of the default source's parent frame URL. 119 // Returns the hostname of the default source's parent frame URL.
120 std::string GetFrameURLHost() const; 120 std::string GetFrameURLHost() const;
121 bool has_pending_route_request() const { return has_pending_route_request_; } 121 bool has_pending_route_request() const { return has_pending_route_request_; }
122 const GURL& frame_url() const { return frame_url_; } 122 const GURL& frame_url() const { return frame_url_; }
123 const std::vector<MediaSinkWithCastModes>& sinks() const { return sinks_; } 123 const std::vector<MediaSinkWithCastModes>& sinks() const { return sinks_; }
124 const std::vector<MediaRoute>& routes() const { return routes_; } 124 const std::vector<MediaRoute>& routes() const { return routes_; }
125 const std::set<MediaCastMode>& cast_modes() const { return cast_modes_; } 125 const std::set<MediaCastMode>& cast_modes() const { return cast_modes_; }
126 const content::WebContents* initiator() const { return initiator_; } 126 const content::WebContents* initiator() const { return initiator_; }
127 127
128 const std::string& GetRouteProviderExtensionId() const; 128 const std::string& GetRouteProviderExtensionId() const;
129 const std::set<MediaSink::Id>& GetSinkIdsInLaunch() const;
129 130
130 private: 131 private:
131 class UIIssuesObserver; 132 class UIIssuesObserver;
132 class UIMediaRoutesObserver; 133 class UIMediaRoutesObserver;
133 134
134 // QueryResultManager::Observer 135 // QueryResultManager::Observer
135 void OnResultsUpdated( 136 void OnResultsUpdated(
136 const std::vector<MediaSinkWithCastModes>& sinks) override; 137 const std::vector<MediaSinkWithCastModes>& sinks) override;
137 138
138 // Called by |issues_observer_| when the top issue has changed. 139 // Called by |issues_observer_| when the top issue has changed.
139 // If the UI is already initialized, notifies |handler_| to update the UI. 140 // If the UI is already initialized, notifies |handler_| to update the UI.
140 // Ignored if the UI is not yet initialized. 141 // Ignored if the UI is not yet initialized.
141 void SetIssue(const Issue* issue); 142 void SetIssue(const Issue* issue);
142 143
143 // Called by |routes_observer_| when the set of active routes has changed. 144 // Called by |routes_observer_| when the set of active routes has changed.
144 void OnRoutesUpdated(const std::vector<MediaRoute>& routes); 145 void OnRoutesUpdated(const std::vector<MediaRoute>& routes);
145 146
146 // Callback passed to MediaRouter to receive response to route creation 147 // Callback passed to MediaRouter to receive response to route creation
147 // requests. 148 // requests.
148 void OnRouteResponseReceived(const MediaRoute* route, 149 void OnRouteResponseReceived(const MediaSink::Id& sink_id,
150 const MediaRoute* route,
149 const std::string& error); 151 const std::string& error);
150 152
151 bool DoCreateRoute(const MediaSink::Id& sink_id, MediaCastMode cast_mode); 153 bool DoCreateRoute(const MediaSink::Id& sink_id, MediaCastMode cast_mode);
152 154
153 // Sets the source host name to be displayed in the UI. 155 // Sets the source host name to be displayed in the UI.
154 // Gets cast modes from |query_result_manager_| and forwards it to UI. 156 // Gets cast modes from |query_result_manager_| and forwards it to UI.
155 // One of the Init* functions must have been called before. 157 // One of the Init* functions must have been called before.
156 void UpdateSourceHostAndCastModes(const GURL& frame_url); 158 void UpdateSourceHostAndCastModes(const GURL& frame_url);
157 159
158 // Initializes the dialog with mirroring sources derived from |initiator|, 160 // Initializes the dialog with mirroring sources derived from |initiator|,
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 // NOTE: Weak pointers must be invalidated before all other member variables. 212 // NOTE: Weak pointers must be invalidated before all other member variables.
211 // Therefore |weak_factory_| must be placed at the end. 213 // Therefore |weak_factory_| must be placed at the end.
212 base::WeakPtrFactory<MediaRouterUI> weak_factory_; 214 base::WeakPtrFactory<MediaRouterUI> weak_factory_;
213 215
214 DISALLOW_COPY_AND_ASSIGN(MediaRouterUI); 216 DISALLOW_COPY_AND_ASSIGN(MediaRouterUI);
215 }; 217 };
216 218
217 } // namespace media_router 219 } // namespace media_router
218 220
219 #endif // CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_ROUTER_UI_H_ 221 #endif // CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_ROUTER_UI_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698