| OLD | NEW |
| 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 #include "chrome/browser/ui/webui/media_router/media_router_webui_message_handle
r.h" | 5 #include "chrome/browser/ui/webui/media_router/media_router_webui_message_handle
r.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/metrics/histogram_macros.h" | 10 #include "base/metrics/histogram_macros.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 const char kOnCreateRouteResponseReceived[] = | 66 const char kOnCreateRouteResponseReceived[] = |
| 67 "media_router.ui.onCreateRouteResponseReceived"; | 67 "media_router.ui.onCreateRouteResponseReceived"; |
| 68 const char kSetFirstRunFlowData[] = "media_router.ui.setFirstRunFlowData"; | 68 const char kSetFirstRunFlowData[] = "media_router.ui.setFirstRunFlowData"; |
| 69 const char kSetIssue[] = "media_router.ui.setIssue"; | 69 const char kSetIssue[] = "media_router.ui.setIssue"; |
| 70 const char kSetSinkListAndIdentity[] = "media_router.ui.setSinkListAndIdentity"; | 70 const char kSetSinkListAndIdentity[] = "media_router.ui.setSinkListAndIdentity"; |
| 71 const char kSetRouteList[] = "media_router.ui.setRouteList"; | 71 const char kSetRouteList[] = "media_router.ui.setRouteList"; |
| 72 const char kSetCastModeList[] = "media_router.ui.setCastModeList"; | 72 const char kSetCastModeList[] = "media_router.ui.setCastModeList"; |
| 73 const char kUpdateMaxHeight[] = "media_router.ui.updateMaxHeight"; | 73 const char kUpdateMaxHeight[] = "media_router.ui.updateMaxHeight"; |
| 74 const char kWindowOpen[] = "window.open"; | 74 const char kWindowOpen[] = "window.open"; |
| 75 | 75 |
| 76 scoped_ptr<base::DictionaryValue> SinksAndIdentityToValue( | 76 std::unique_ptr<base::DictionaryValue> SinksAndIdentityToValue( |
| 77 const std::vector<MediaSinkWithCastModes>& sinks, | 77 const std::vector<MediaSinkWithCastModes>& sinks, |
| 78 const AccountInfo& account_info) { | 78 const AccountInfo& account_info) { |
| 79 scoped_ptr<base::DictionaryValue> sink_list_and_identity( | 79 std::unique_ptr<base::DictionaryValue> sink_list_and_identity( |
| 80 new base::DictionaryValue); | 80 new base::DictionaryValue); |
| 81 bool show_email = false; | 81 bool show_email = false; |
| 82 bool show_domain = false; | 82 bool show_domain = false; |
| 83 std::string user_domain; | 83 std::string user_domain; |
| 84 if (account_info.IsValid()) { | 84 if (account_info.IsValid()) { |
| 85 user_domain = account_info.hosted_domain; | 85 user_domain = account_info.hosted_domain; |
| 86 sink_list_and_identity->SetString("userEmail", account_info.email); | 86 sink_list_and_identity->SetString("userEmail", account_info.email); |
| 87 sink_list_and_identity->SetString("userDomain", user_domain); | 87 sink_list_and_identity->SetString("userDomain", user_domain); |
| 88 } | 88 } |
| 89 | 89 |
| 90 scoped_ptr<base::ListValue> sinks_val(new base::ListValue); | 90 std::unique_ptr<base::ListValue> sinks_val(new base::ListValue); |
| 91 | 91 |
| 92 for (const MediaSinkWithCastModes& sink_with_cast_modes : sinks) { | 92 for (const MediaSinkWithCastModes& sink_with_cast_modes : sinks) { |
| 93 scoped_ptr<base::DictionaryValue> sink_val(new base::DictionaryValue); | 93 std::unique_ptr<base::DictionaryValue> sink_val(new base::DictionaryValue); |
| 94 | 94 |
| 95 const MediaSink& sink = sink_with_cast_modes.sink; | 95 const MediaSink& sink = sink_with_cast_modes.sink; |
| 96 sink_val->SetString("id", sink.id()); | 96 sink_val->SetString("id", sink.id()); |
| 97 sink_val->SetString("name", sink.name()); | 97 sink_val->SetString("name", sink.name()); |
| 98 sink_val->SetInteger("iconType", sink.icon_type()); | 98 sink_val->SetInteger("iconType", sink.icon_type()); |
| 99 if (!sink.description().empty()) | 99 if (!sink.description().empty()) |
| 100 sink_val->SetString("description", sink.description()); | 100 sink_val->SetString("description", sink.description()); |
| 101 | 101 |
| 102 if (!user_domain.empty() && !sink.domain().empty()) { | 102 if (!user_domain.empty() && !sink.domain().empty()) { |
| 103 std::string domain = sink.domain(); | 103 std::string domain = sink.domain(); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 124 sink_val->SetInteger("castModes", cast_mode_bits); | 124 sink_val->SetInteger("castModes", cast_mode_bits); |
| 125 sinks_val->Append(sink_val.release()); | 125 sinks_val->Append(sink_val.release()); |
| 126 } | 126 } |
| 127 | 127 |
| 128 sink_list_and_identity->Set("sinks", sinks_val.release()); | 128 sink_list_and_identity->Set("sinks", sinks_val.release()); |
| 129 sink_list_and_identity->SetBoolean("showEmail", show_email); | 129 sink_list_and_identity->SetBoolean("showEmail", show_email); |
| 130 sink_list_and_identity->SetBoolean("showDomain", show_domain); | 130 sink_list_and_identity->SetBoolean("showDomain", show_domain); |
| 131 return sink_list_and_identity; | 131 return sink_list_and_identity; |
| 132 } | 132 } |
| 133 | 133 |
| 134 scoped_ptr<base::DictionaryValue> RouteToValue( | 134 std::unique_ptr<base::DictionaryValue> RouteToValue( |
| 135 const MediaRoute& route, bool canJoin, const std::string& extension_id) { | 135 const MediaRoute& route, |
| 136 scoped_ptr<base::DictionaryValue> dictionary(new base::DictionaryValue); | 136 bool canJoin, |
| 137 const std::string& extension_id) { |
| 138 std::unique_ptr<base::DictionaryValue> dictionary(new base::DictionaryValue); |
| 137 dictionary->SetString("id", route.media_route_id()); | 139 dictionary->SetString("id", route.media_route_id()); |
| 138 dictionary->SetString("sinkId", route.media_sink_id()); | 140 dictionary->SetString("sinkId", route.media_sink_id()); |
| 139 dictionary->SetString("description", route.description()); | 141 dictionary->SetString("description", route.description()); |
| 140 dictionary->SetBoolean("isLocal", route.is_local()); | 142 dictionary->SetBoolean("isLocal", route.is_local()); |
| 141 dictionary->SetBoolean("canJoin", canJoin); | 143 dictionary->SetBoolean("canJoin", canJoin); |
| 142 dictionary->SetBoolean("isOffTheRecord", route.off_the_record()); | 144 dictionary->SetBoolean("isOffTheRecord", route.off_the_record()); |
| 143 | 145 |
| 144 const std::string& custom_path = route.custom_controller_path(); | 146 const std::string& custom_path = route.custom_controller_path(); |
| 145 if (!custom_path.empty()) { | 147 if (!custom_path.empty()) { |
| 146 std::string full_custom_controller_path = base::StringPrintf("%s://%s/%s", | 148 std::string full_custom_controller_path = base::StringPrintf("%s://%s/%s", |
| 147 extensions::kExtensionScheme, extension_id.c_str(), | 149 extensions::kExtensionScheme, extension_id.c_str(), |
| 148 custom_path.c_str()); | 150 custom_path.c_str()); |
| 149 DCHECK(GURL(full_custom_controller_path).is_valid()); | 151 DCHECK(GURL(full_custom_controller_path).is_valid()); |
| 150 dictionary->SetString("customControllerPath", | 152 dictionary->SetString("customControllerPath", |
| 151 full_custom_controller_path); | 153 full_custom_controller_path); |
| 152 } | 154 } |
| 153 | 155 |
| 154 return dictionary; | 156 return dictionary; |
| 155 } | 157 } |
| 156 | 158 |
| 157 scoped_ptr<base::ListValue> RoutesToValue( | 159 std::unique_ptr<base::ListValue> RoutesToValue( |
| 158 const std::vector<MediaRoute>& routes, | 160 const std::vector<MediaRoute>& routes, |
| 159 const std::vector<MediaRoute::Id>& joinable_route_ids, | 161 const std::vector<MediaRoute::Id>& joinable_route_ids, |
| 160 const std::string& extension_id) { | 162 const std::string& extension_id) { |
| 161 scoped_ptr<base::ListValue> value(new base::ListValue); | 163 std::unique_ptr<base::ListValue> value(new base::ListValue); |
| 162 | 164 |
| 163 for (const MediaRoute& route : routes) { | 165 for (const MediaRoute& route : routes) { |
| 164 bool canJoin = ContainsValue(joinable_route_ids, route.media_route_id()); | 166 bool canJoin = ContainsValue(joinable_route_ids, route.media_route_id()); |
| 165 scoped_ptr<base::DictionaryValue> route_val(RouteToValue(route, | 167 std::unique_ptr<base::DictionaryValue> route_val( |
| 166 canJoin, extension_id)); | 168 RouteToValue(route, canJoin, extension_id)); |
| 167 value->Append(route_val.release()); | 169 value->Append(route_val.release()); |
| 168 } | 170 } |
| 169 | 171 |
| 170 return value; | 172 return value; |
| 171 } | 173 } |
| 172 | 174 |
| 173 scoped_ptr<base::ListValue> CastModesToValue(const CastModeSet& cast_modes, | 175 std::unique_ptr<base::ListValue> CastModesToValue( |
| 174 const std::string& source_host) { | 176 const CastModeSet& cast_modes, |
| 175 scoped_ptr<base::ListValue> value(new base::ListValue); | 177 const std::string& source_host) { |
| 178 std::unique_ptr<base::ListValue> value(new base::ListValue); |
| 176 | 179 |
| 177 for (const MediaCastMode& cast_mode : cast_modes) { | 180 for (const MediaCastMode& cast_mode : cast_modes) { |
| 178 scoped_ptr<base::DictionaryValue> cast_mode_val(new base::DictionaryValue); | 181 std::unique_ptr<base::DictionaryValue> cast_mode_val( |
| 182 new base::DictionaryValue); |
| 179 cast_mode_val->SetInteger("type", cast_mode); | 183 cast_mode_val->SetInteger("type", cast_mode); |
| 180 cast_mode_val->SetString( | 184 cast_mode_val->SetString( |
| 181 "description", MediaCastModeToDescription(cast_mode, source_host)); | 185 "description", MediaCastModeToDescription(cast_mode, source_host)); |
| 182 cast_mode_val->SetString("host", source_host); | 186 cast_mode_val->SetString("host", source_host); |
| 183 value->Append(cast_mode_val.release()); | 187 value->Append(cast_mode_val.release()); |
| 184 } | 188 } |
| 185 | 189 |
| 186 return value; | 190 return value; |
| 187 } | 191 } |
| 188 | 192 |
| 189 // Returns an Issue dictionary created from |issue| that can be used in WebUI. | 193 // Returns an Issue dictionary created from |issue| that can be used in WebUI. |
| 190 scoped_ptr<base::DictionaryValue> IssueToValue(const Issue& issue) { | 194 std::unique_ptr<base::DictionaryValue> IssueToValue(const Issue& issue) { |
| 191 scoped_ptr<base::DictionaryValue> dictionary(new base::DictionaryValue); | 195 std::unique_ptr<base::DictionaryValue> dictionary(new base::DictionaryValue); |
| 192 dictionary->SetString("id", issue.id()); | 196 dictionary->SetString("id", issue.id()); |
| 193 dictionary->SetString("title", issue.title()); | 197 dictionary->SetString("title", issue.title()); |
| 194 dictionary->SetString("message", issue.message()); | 198 dictionary->SetString("message", issue.message()); |
| 195 dictionary->SetInteger("defaultActionType", issue.default_action().type()); | 199 dictionary->SetInteger("defaultActionType", issue.default_action().type()); |
| 196 if (!issue.secondary_actions().empty()) { | 200 if (!issue.secondary_actions().empty()) { |
| 197 dictionary->SetInteger("secondaryActionType", | 201 dictionary->SetInteger("secondaryActionType", |
| 198 issue.secondary_actions().begin()->type()); | 202 issue.secondary_actions().begin()->type()); |
| 199 } | 203 } |
| 200 if (!issue.route_id().empty()) | 204 if (!issue.route_id().empty()) |
| 201 dictionary->SetString("routeId", issue.route_id()); | 205 dictionary->SetString("routeId", issue.route_id()); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 media_router_ui_(media_router_ui) { | 240 media_router_ui_(media_router_ui) { |
| 237 DCHECK(media_router_ui_); | 241 DCHECK(media_router_ui_); |
| 238 } | 242 } |
| 239 | 243 |
| 240 MediaRouterWebUIMessageHandler::~MediaRouterWebUIMessageHandler() { | 244 MediaRouterWebUIMessageHandler::~MediaRouterWebUIMessageHandler() { |
| 241 } | 245 } |
| 242 | 246 |
| 243 void MediaRouterWebUIMessageHandler::UpdateSinks( | 247 void MediaRouterWebUIMessageHandler::UpdateSinks( |
| 244 const std::vector<MediaSinkWithCastModes>& sinks) { | 248 const std::vector<MediaSinkWithCastModes>& sinks) { |
| 245 DVLOG(2) << "UpdateSinks"; | 249 DVLOG(2) << "UpdateSinks"; |
| 246 scoped_ptr<base::DictionaryValue> sinks_and_identity_val( | 250 std::unique_ptr<base::DictionaryValue> sinks_and_identity_val( |
| 247 SinksAndIdentityToValue(sinks, GetAccountInfo())); | 251 SinksAndIdentityToValue(sinks, GetAccountInfo())); |
| 248 web_ui()->CallJavascriptFunction(kSetSinkListAndIdentity, | 252 web_ui()->CallJavascriptFunction(kSetSinkListAndIdentity, |
| 249 *sinks_and_identity_val); | 253 *sinks_and_identity_val); |
| 250 } | 254 } |
| 251 | 255 |
| 252 void MediaRouterWebUIMessageHandler::UpdateRoutes( | 256 void MediaRouterWebUIMessageHandler::UpdateRoutes( |
| 253 const std::vector<MediaRoute>& routes, | 257 const std::vector<MediaRoute>& routes, |
| 254 const std::vector<MediaRoute::Id>& joinable_route_ids) { | 258 const std::vector<MediaRoute::Id>& joinable_route_ids) { |
| 255 scoped_ptr<base::ListValue> routes_val(RoutesToValue(routes, | 259 std::unique_ptr<base::ListValue> routes_val( |
| 256 joinable_route_ids, | 260 RoutesToValue(routes, joinable_route_ids, |
| 257 media_router_ui_->GetRouteProviderExtensionId())); | 261 media_router_ui_->GetRouteProviderExtensionId())); |
| 258 web_ui()->CallJavascriptFunction(kSetRouteList, *routes_val); | 262 web_ui()->CallJavascriptFunction(kSetRouteList, *routes_val); |
| 259 } | 263 } |
| 260 | 264 |
| 261 void MediaRouterWebUIMessageHandler::UpdateCastModes( | 265 void MediaRouterWebUIMessageHandler::UpdateCastModes( |
| 262 const CastModeSet& cast_modes, | 266 const CastModeSet& cast_modes, |
| 263 const std::string& source_host) { | 267 const std::string& source_host) { |
| 264 DVLOG(2) << "UpdateCastModes"; | 268 DVLOG(2) << "UpdateCastModes"; |
| 265 scoped_ptr<base::ListValue> cast_modes_val( | 269 std::unique_ptr<base::ListValue> cast_modes_val( |
| 266 CastModesToValue(cast_modes, source_host)); | 270 CastModesToValue(cast_modes, source_host)); |
| 267 web_ui()->CallJavascriptFunction(kSetCastModeList, *cast_modes_val); | 271 web_ui()->CallJavascriptFunction(kSetCastModeList, *cast_modes_val); |
| 268 } | 272 } |
| 269 | 273 |
| 270 void MediaRouterWebUIMessageHandler::OnCreateRouteResponseReceived( | 274 void MediaRouterWebUIMessageHandler::OnCreateRouteResponseReceived( |
| 271 const MediaSink::Id& sink_id, | 275 const MediaSink::Id& sink_id, |
| 272 const MediaRoute* route) { | 276 const MediaRoute* route) { |
| 273 DVLOG(2) << "OnCreateRouteResponseReceived"; | 277 DVLOG(2) << "OnCreateRouteResponseReceived"; |
| 274 if (route) { | 278 if (route) { |
| 275 scoped_ptr<base::DictionaryValue> route_value(RouteToValue(*route, false, | 279 std::unique_ptr<base::DictionaryValue> route_value(RouteToValue( |
| 276 media_router_ui_->GetRouteProviderExtensionId())); | 280 *route, false, media_router_ui_->GetRouteProviderExtensionId())); |
| 277 web_ui()->CallJavascriptFunction( | 281 web_ui()->CallJavascriptFunction( |
| 278 kOnCreateRouteResponseReceived, | 282 kOnCreateRouteResponseReceived, |
| 279 base::StringValue(sink_id), *route_value, | 283 base::StringValue(sink_id), *route_value, |
| 280 base::FundamentalValue(route->for_display())); | 284 base::FundamentalValue(route->for_display())); |
| 281 } else { | 285 } else { |
| 282 web_ui()->CallJavascriptFunction(kOnCreateRouteResponseReceived, | 286 web_ui()->CallJavascriptFunction(kOnCreateRouteResponseReceived, |
| 283 base::StringValue(sink_id), | 287 base::StringValue(sink_id), |
| 284 *base::Value::CreateNullValue(), | 288 *base::Value::CreateNullValue(), |
| 285 base::FundamentalValue(false)); | 289 base::FundamentalValue(false)); |
| 286 } | 290 } |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 void MediaRouterWebUIMessageHandler::OnRequestInitialData( | 389 void MediaRouterWebUIMessageHandler::OnRequestInitialData( |
| 386 const base::ListValue* args) { | 390 const base::ListValue* args) { |
| 387 DVLOG(1) << "OnRequestInitialData"; | 391 DVLOG(1) << "OnRequestInitialData"; |
| 388 media_router_ui_->OnUIInitiallyLoaded(); | 392 media_router_ui_->OnUIInitiallyLoaded(); |
| 389 base::DictionaryValue initial_data; | 393 base::DictionaryValue initial_data; |
| 390 | 394 |
| 391 // "No Cast devices found?" Chromecast help center page. | 395 // "No Cast devices found?" Chromecast help center page. |
| 392 initial_data.SetString("deviceMissingUrl", | 396 initial_data.SetString("deviceMissingUrl", |
| 393 base::StringPrintf(kHelpPageUrlPrefix, 3249268)); | 397 base::StringPrintf(kHelpPageUrlPrefix, 3249268)); |
| 394 | 398 |
| 395 scoped_ptr<base::DictionaryValue> sinks_and_identity( | 399 std::unique_ptr<base::DictionaryValue> sinks_and_identity( |
| 396 SinksAndIdentityToValue(media_router_ui_->sinks(), GetAccountInfo())); | 400 SinksAndIdentityToValue(media_router_ui_->sinks(), GetAccountInfo())); |
| 397 initial_data.Set("sinksAndIdentity", sinks_and_identity.release()); | 401 initial_data.Set("sinksAndIdentity", sinks_and_identity.release()); |
| 398 | 402 |
| 399 scoped_ptr<base::ListValue> routes(RoutesToValue(media_router_ui_->routes(), | 403 std::unique_ptr<base::ListValue> routes(RoutesToValue( |
| 400 media_router_ui_->joinable_route_ids(), | 404 media_router_ui_->routes(), media_router_ui_->joinable_route_ids(), |
| 401 media_router_ui_->GetRouteProviderExtensionId())); | 405 media_router_ui_->GetRouteProviderExtensionId())); |
| 402 initial_data.Set("routes", routes.release()); | 406 initial_data.Set("routes", routes.release()); |
| 403 | 407 |
| 404 const std::set<MediaCastMode> cast_modes = media_router_ui_->cast_modes(); | 408 const std::set<MediaCastMode> cast_modes = media_router_ui_->cast_modes(); |
| 405 scoped_ptr<base::ListValue> cast_modes_list( | 409 std::unique_ptr<base::ListValue> cast_modes_list(CastModesToValue( |
| 406 CastModesToValue(cast_modes, | 410 cast_modes, media_router_ui_->GetPresentationRequestSourceName())); |
| 407 media_router_ui_->GetPresentationRequestSourceName())); | |
| 408 initial_data.Set("castModes", cast_modes_list.release()); | 411 initial_data.Set("castModes", cast_modes_list.release()); |
| 409 | 412 |
| 410 web_ui()->CallJavascriptFunction(kSetInitialData, initial_data); | 413 web_ui()->CallJavascriptFunction(kSetInitialData, initial_data); |
| 411 media_router_ui_->UIInitialized(); | 414 media_router_ui_->UIInitialized(); |
| 412 } | 415 } |
| 413 | 416 |
| 414 void MediaRouterWebUIMessageHandler::OnCreateRoute( | 417 void MediaRouterWebUIMessageHandler::OnCreateRoute( |
| 415 const base::ListValue* args) { | 418 const base::ListValue* args) { |
| 416 DVLOG(1) << "OnCreateRoute"; | 419 DVLOG(1) << "OnCreateRoute"; |
| 417 const base::DictionaryValue* args_dict = nullptr; | 420 const base::DictionaryValue* args_dict = nullptr; |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 736 MaybeUpdateFirstRunFlowData(); | 739 MaybeUpdateFirstRunFlowData(); |
| 737 } | 740 } |
| 738 | 741 |
| 739 bool MediaRouterWebUIMessageHandler::ActOnIssueType( | 742 bool MediaRouterWebUIMessageHandler::ActOnIssueType( |
| 740 const IssueAction::Type& action_type, | 743 const IssueAction::Type& action_type, |
| 741 const base::DictionaryValue* args) { | 744 const base::DictionaryValue* args) { |
| 742 if (action_type == IssueAction::TYPE_LEARN_MORE) { | 745 if (action_type == IssueAction::TYPE_LEARN_MORE) { |
| 743 std::string learn_more_url = GetLearnMoreUrl(args); | 746 std::string learn_more_url = GetLearnMoreUrl(args); |
| 744 if (learn_more_url.empty()) | 747 if (learn_more_url.empty()) |
| 745 return false; | 748 return false; |
| 746 scoped_ptr<base::ListValue> open_args(new base::ListValue); | 749 std::unique_ptr<base::ListValue> open_args(new base::ListValue); |
| 747 open_args->AppendString(learn_more_url); | 750 open_args->AppendString(learn_more_url); |
| 748 web_ui()->CallJavascriptFunction(kWindowOpen, *open_args); | 751 web_ui()->CallJavascriptFunction(kWindowOpen, *open_args); |
| 749 return true; | 752 return true; |
| 750 } else { | 753 } else { |
| 751 // Do nothing; no other issue action types require any other action. | 754 // Do nothing; no other issue action types require any other action. |
| 752 return true; | 755 return true; |
| 753 } | 756 } |
| 754 } | 757 } |
| 755 | 758 |
| 756 void MediaRouterWebUIMessageHandler::MaybeUpdateFirstRunFlowData() { | 759 void MediaRouterWebUIMessageHandler::MaybeUpdateFirstRunFlowData() { |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 814 #endif // defined(GOOGLE_CHROME_BUILD) | 817 #endif // defined(GOOGLE_CHROME_BUILD) |
| 815 | 818 |
| 816 return AccountInfo(); | 819 return AccountInfo(); |
| 817 } | 820 } |
| 818 | 821 |
| 819 void MediaRouterWebUIMessageHandler::SetWebUIForTest(content::WebUI* web_ui) { | 822 void MediaRouterWebUIMessageHandler::SetWebUIForTest(content::WebUI* web_ui) { |
| 820 set_web_ui(web_ui); | 823 set_web_ui(web_ui); |
| 821 } | 824 } |
| 822 | 825 |
| 823 } // namespace media_router | 826 } // namespace media_router |
| OLD | NEW |