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 <memory> | 7 #include <memory> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
495 | 495 |
496 // If the cast mode last chosen for the current origin is tab mirroring, | 496 // If the cast mode last chosen for the current origin is tab mirroring, |
497 // that should be the cast mode initially selected in the dialog. Otherwise | 497 // that should be the cast mode initially selected in the dialog. Otherwise |
498 // the initial cast mode should be chosen automatically by the dialog. | 498 // the initial cast mode should be chosen automatically by the dialog. |
499 bool use_tab_mirroring = | 499 bool use_tab_mirroring = |
500 base::ContainsKey(cast_modes, MediaCastMode::TAB_MIRROR) && | 500 base::ContainsKey(cast_modes, MediaCastMode::TAB_MIRROR) && |
501 media_router_ui_->UserSelectedTabMirroringForCurrentOrigin(); | 501 media_router_ui_->UserSelectedTabMirroringForCurrentOrigin(); |
502 initial_data.SetBoolean("useTabMirroring", use_tab_mirroring); | 502 initial_data.SetBoolean("useTabMirroring", use_tab_mirroring); |
503 | 503 |
504 initial_data.SetBoolean( | 504 initial_data.SetBoolean( |
505 "useNewRouteControls", | 505 "useWebUiRouteControls", |
506 base::FeatureList::IsEnabled(features::kMediaRouterUIRouteController)); | 506 base::FeatureList::IsEnabled(features::kMediaRouterUIRouteController)); |
507 | 507 |
508 web_ui()->CallJavascriptFunctionUnsafe(kSetInitialData, initial_data); | 508 web_ui()->CallJavascriptFunctionUnsafe(kSetInitialData, initial_data); |
509 media_router_ui_->UIInitialized(); | 509 media_router_ui_->UIInitialized(); |
510 } | 510 } |
511 | 511 |
512 void MediaRouterWebUIMessageHandler::OnCreateRoute( | 512 void MediaRouterWebUIMessageHandler::OnCreateRoute( |
513 const base::ListValue* args) { | 513 const base::ListValue* args) { |
514 DVLOG(1) << "OnCreateRoute"; | 514 DVLOG(1) << "OnCreateRoute"; |
515 const base::DictionaryValue* args_dict = nullptr; | 515 const base::DictionaryValue* args_dict = nullptr; |
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1048 } | 1048 } |
1049 | 1049 |
1050 return value; | 1050 return value; |
1051 } | 1051 } |
1052 | 1052 |
1053 void MediaRouterWebUIMessageHandler::SetWebUIForTest(content::WebUI* web_ui) { | 1053 void MediaRouterWebUIMessageHandler::SetWebUIForTest(content::WebUI* web_ui) { |
1054 set_web_ui(web_ui); | 1054 set_web_ui(web_ui); |
1055 } | 1055 } |
1056 | 1056 |
1057 } // namespace media_router | 1057 } // namespace media_router |
OLD | NEW |