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

Side by Side Diff: chrome/browser/media/router/media_router_dialog_controller.cc

Issue 1294133002: [Presentation API, MediaRouter] Routing from media sink selection to route creation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@media-router-discovery-2
Patch Set: Report when the user dismisses the dialog. 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 #include "chrome/browser/media/router/media_router_dialog_controller.h" 5 #include "chrome/browser/media/router/media_router_dialog_controller.h"
6 6
7 #include "content/public/browser/browser_thread.h" 7 #include "content/public/browser/browser_thread.h"
8 #include "content/public/browser/web_contents.h" 8 #include "content/public/browser/web_contents.h"
9 #include "content/public/browser/web_contents_delegate.h" 9 #include "content/public/browser/web_contents_delegate.h"
10 10
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 108
109 void MediaRouterDialogController::ActivateInitiatorWebContents() { 109 void MediaRouterDialogController::ActivateInitiatorWebContents() {
110 initiator_->GetDelegate()->ActivateContents(initiator_); 110 initiator_->GetDelegate()->ActivateContents(initiator_);
111 } 111 }
112 112
113 scoped_ptr<CreatePresentationSessionRequest> 113 scoped_ptr<CreatePresentationSessionRequest>
114 MediaRouterDialogController::PassPresentationRequest() { 114 MediaRouterDialogController::PassPresentationRequest() {
115 return presentation_request_.Pass(); 115 return presentation_request_.Pass();
116 } 116 }
117 117
118 std::string MediaRouterDialogController::GetMediaSourceId() const {
119 return presentation_request_->media_source().id();
imcheng 2015/08/18 17:50:34 what if presentation_request_ is null?
whywhat 2015/08/18 19:21:24 This is only called from CreateDialog so it should
120 }
121
118 void MediaRouterDialogController::Reset() { 122 void MediaRouterDialogController::Reset() {
119 initiator_observer_.reset(); 123 initiator_observer_.reset();
120 presentation_request_.reset(); 124 presentation_request_.reset();
121 } 125 }
122 126
123 } // namespace media_router 127 } // namespace media_router
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698