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

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

Issue 2321163002: Allow MediaRouterDialogControllerImpl to re-set its reference to MRAction (Closed)
Patch Set: Created 4 years, 3 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/ui/webui/media_router/media_router_dialog_controller_impl.h ('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_dialog_controller_im pl.h" 5 #include "chrome/browser/ui/webui/media_router/media_router_dialog_controller_im pl.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 MediaRouterDialogControllerImpl::~MediaRouterDialogControllerImpl() { 166 MediaRouterDialogControllerImpl::~MediaRouterDialogControllerImpl() {
167 } 167 }
168 168
169 WebContents* MediaRouterDialogControllerImpl::GetMediaRouterDialog() const { 169 WebContents* MediaRouterDialogControllerImpl::GetMediaRouterDialog() const {
170 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 170 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
171 return dialog_observer_.get() ? dialog_observer_->web_contents() : nullptr; 171 return dialog_observer_.get() ? dialog_observer_->web_contents() : nullptr;
172 } 172 }
173 173
174 void MediaRouterDialogControllerImpl::SetMediaRouterAction( 174 void MediaRouterDialogControllerImpl::SetMediaRouterAction(
175 const base::WeakPtr<MediaRouterAction>& action) { 175 const base::WeakPtr<MediaRouterAction>& action) {
176 if (!action_) 176 action_ = action;
177 action_ = action;
178 } 177 }
179 178
180 bool MediaRouterDialogControllerImpl::IsShowingMediaRouterDialog() const { 179 bool MediaRouterDialogControllerImpl::IsShowingMediaRouterDialog() const {
181 return GetMediaRouterDialog() != nullptr; 180 return GetMediaRouterDialog() != nullptr;
182 } 181 }
183 182
184 void MediaRouterDialogControllerImpl::UpdateMaxDialogSize() { 183 void MediaRouterDialogControllerImpl::UpdateMaxDialogSize() {
185 WebContents* media_router_dialog = GetMediaRouterDialog(); 184 WebContents* media_router_dialog = GetMediaRouterDialog();
186 if (!media_router_dialog) 185 if (!media_router_dialog)
187 return; 186 return;
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 ->GetWeakPtr(); 318 ->GetWeakPtr();
320 if (!create_connection_request.get()) { 319 if (!create_connection_request.get()) {
321 media_router_ui->InitWithDefaultMediaSource(delegate); 320 media_router_ui->InitWithDefaultMediaSource(delegate);
322 } else { 321 } else {
323 media_router_ui->InitWithPresentationSessionRequest( 322 media_router_ui->InitWithPresentationSessionRequest(
324 initiator(), delegate, std::move(create_connection_request)); 323 initiator(), delegate, std::move(create_connection_request));
325 } 324 }
326 } 325 }
327 326
328 } // namespace media_router 327 } // namespace media_router
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/media_router/media_router_dialog_controller_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698