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

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

Issue 1308853008: Release Media Router Action icon when dialog closed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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/toolbar/media_router_action_unittest.cc ('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 <vector> 8 #include <vector>
9 9
10 #include "chrome/browser/media/router/presentation_service_delegate_impl.h" 10 #include "chrome/browser/media/router/presentation_service_delegate_impl.h"
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 dialog_observer_.reset(new DialogWebContentsObserver( 236 dialog_observer_.reset(new DialogWebContentsObserver(
237 media_router_dialog, this)); 237 media_router_dialog, this));
238 238
239 if (action_) 239 if (action_)
240 action_->OnPopupShown(); 240 action_->OnPopupShown();
241 } 241 }
242 242
243 void MediaRouterDialogControllerImpl::Reset() { 243 void MediaRouterDialogControllerImpl::Reset() {
244 MediaRouterDialogController::Reset(); 244 MediaRouterDialogController::Reset();
245 dialog_observer_.reset(); 245 dialog_observer_.reset();
246
247 if (action_)
248 action_->OnPopupHidden();
246 } 249 }
247 250
248 void MediaRouterDialogControllerImpl::OnDialogNavigated( 251 void MediaRouterDialogControllerImpl::OnDialogNavigated(
249 const content::LoadCommittedDetails& details) { 252 const content::LoadCommittedDetails& details) {
250 DCHECK(thread_checker_.CalledOnValidThread()); 253 DCHECK(thread_checker_.CalledOnValidThread());
251 WebContents* media_router_dialog = GetMediaRouterDialog(); 254 WebContents* media_router_dialog = GetMediaRouterDialog();
252 CHECK(media_router_dialog); 255 CHECK(media_router_dialog);
253 ui::PageTransition transition_type = details.entry->GetTransitionType(); 256 ui::PageTransition transition_type = details.entry->GetTransitionType();
254 content::NavigationType nav_type = details.type; 257 content::NavigationType nav_type = details.type;
255 258
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 ->GetWeakPtr(); 294 ->GetWeakPtr();
292 if (!presentation_request.get()) { 295 if (!presentation_request.get()) {
293 media_router_ui->InitWithDefaultMediaSource(delegate); 296 media_router_ui->InitWithDefaultMediaSource(delegate);
294 } else { 297 } else {
295 media_router_ui->InitWithPresentationSessionRequest( 298 media_router_ui->InitWithPresentationSessionRequest(
296 initiator(), delegate, presentation_request.Pass()); 299 initiator(), delegate, presentation_request.Pass());
297 } 300 }
298 } 301 }
299 302
300 } // namespace media_router 303 } // namespace media_router
OLDNEW
« no previous file with comments | « chrome/browser/ui/toolbar/media_router_action_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698