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

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

Issue 1895783003: [Media Router] Wire through a new MRPM call to update media sinks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Created 4 years, 8 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 #include "chrome/browser/ui/webui/media_router/media_router_ui.h" 5 #include "chrome/browser/ui/webui/media_router/media_router_ui.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 OnDefaultPresentationChanged(create_session_request_->presentation_request()); 245 OnDefaultPresentationChanged(create_session_request_->presentation_request());
246 } 246 }
247 247
248 void MediaRouterUI::InitCommon(content::WebContents* initiator) { 248 void MediaRouterUI::InitCommon(content::WebContents* initiator) {
249 DCHECK(initiator); 249 DCHECK(initiator);
250 DCHECK(router_); 250 DCHECK(router_);
251 251
252 TRACE_EVENT_NESTABLE_ASYNC_INSTANT1("media_router", "UI", initiator, 252 TRACE_EVENT_NESTABLE_ASYNC_INSTANT1("media_router", "UI", initiator,
253 "MediaRouterUI::InitCommon", this); 253 "MediaRouterUI::InitCommon", this);
254 254
255 #if defined(OS_WIN)
256 router_->OnUserGesture(); 255 router_->OnUserGesture();
257 #endif 256
258 // Create |collator_| before |query_result_manager_| so that |collator_| is 257 // Create |collator_| before |query_result_manager_| so that |collator_| is
259 // already set up when we get a callback from |query_result_manager_|. 258 // already set up when we get a callback from |query_result_manager_|.
260 UErrorCode error = U_ZERO_ERROR; 259 UErrorCode error = U_ZERO_ERROR;
261 const std::string& locale = g_browser_process->GetApplicationLocale(); 260 const std::string& locale = g_browser_process->GetApplicationLocale();
262 collator_.reset( 261 collator_.reset(
263 icu::Collator::createInstance(icu::Locale(locale.c_str()), error)); 262 icu::Collator::createInstance(icu::Locale(locale.c_str()), error));
264 if (U_FAILURE(error)) { 263 if (U_FAILURE(error)) {
265 DLOG(ERROR) << "Failed to create collator for locale " << locale; 264 DLOG(ERROR) << "Failed to create collator for locale " << locale;
266 collator_.reset(); 265 collator_.reset();
267 } 266 }
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 base::Time::Now() - start_time_); 581 base::Time::Now() - start_time_);
583 start_time_ = base::Time(); 582 start_time_ = base::Time();
584 } 583 }
585 } 584 }
586 585
587 void MediaRouterUI::UpdateMaxDialogHeight(int height) { 586 void MediaRouterUI::UpdateMaxDialogHeight(int height) {
588 handler_->UpdateMaxDialogHeight(height); 587 handler_->UpdateMaxDialogHeight(height);
589 } 588 }
590 589
591 } // namespace media_router 590 } // namespace media_router
OLDNEW
« no previous file with comments | « chrome/browser/media/router/mojo/media_router_mojo_test.h ('k') | extensions/renderer/resources/media_router_bindings.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698