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

Side by Side Diff: chrome/browser/ui/webui/media_router/media_router_webui_message_handler.cc

Issue 1606303005: [Media Router] Add cloud services learn more link to first run flow. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 11 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
« no previous file with comments | « chrome/browser/resources/media_router/media_router_ui_interface.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #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 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 base::Bind(&MediaRouterWebUIMessageHandler::OnInitialDataReceived, 324 base::Bind(&MediaRouterWebUIMessageHandler::OnInitialDataReceived,
325 base::Unretained(this))); 325 base::Unretained(this)));
326 } 326 }
327 327
328 void MediaRouterWebUIMessageHandler::OnRequestInitialData( 328 void MediaRouterWebUIMessageHandler::OnRequestInitialData(
329 const base::ListValue* args) { 329 const base::ListValue* args) {
330 DVLOG(1) << "OnRequestInitialData"; 330 DVLOG(1) << "OnRequestInitialData";
331 media_router_ui_->OnUIInitiallyLoaded(); 331 media_router_ui_->OnUIInitiallyLoaded();
332 base::DictionaryValue initial_data; 332 base::DictionaryValue initial_data;
333 333
334 #if defined(GOOGLE_CHROME_BUILD)
335 // "Casting to a Hangout from Chrome" Chromecast help center page.
336 initial_data.SetString("firstRunFlowCloudPrefLearnMoreUrl",
337 base::StringPrintf(kHelpPageUrlPrefix, 6320939));
338 #endif // defined(GOOGLE_CHROME_BUILD)
334 // "No Cast devices found?" Chromecast help center page. 339 // "No Cast devices found?" Chromecast help center page.
335 initial_data.SetString("deviceMissingUrl", 340 initial_data.SetString("deviceMissingUrl",
336 base::StringPrintf(kHelpPageUrlPrefix, 3249268)); 341 base::StringPrintf(kHelpPageUrlPrefix, 3249268));
337 342
338 scoped_ptr<base::ListValue> sinks(SinksToValue(media_router_ui_->sinks())); 343 scoped_ptr<base::ListValue> sinks(SinksToValue(media_router_ui_->sinks()));
339 initial_data.Set("sinks", sinks.release()); 344 initial_data.Set("sinks", sinks.release());
340 345
341 scoped_ptr<base::ListValue> routes(RoutesToValue(media_router_ui_->routes(), 346 scoped_ptr<base::ListValue> routes(RoutesToValue(media_router_ui_->routes(),
342 media_router_ui_->joinable_route_ids(), 347 media_router_ui_->joinable_route_ids(),
343 media_router_ui_->GetRouteProviderExtensionId())); 348 media_router_ui_->GetRouteProviderExtensionId()));
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 open_args->AppendString(learn_more_url); 636 open_args->AppendString(learn_more_url);
632 web_ui()->CallJavascriptFunction(kWindowOpen, *open_args); 637 web_ui()->CallJavascriptFunction(kWindowOpen, *open_args);
633 return true; 638 return true;
634 } else { 639 } else {
635 // Do nothing; no other issue action types require any other action. 640 // Do nothing; no other issue action types require any other action.
636 return true; 641 return true;
637 } 642 }
638 } 643 }
639 644
640 } // namespace media_router 645 } // namespace media_router
OLDNEW
« no previous file with comments | « chrome/browser/resources/media_router/media_router_ui_interface.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698