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

Unified Diff: chrome/browser/ui/webui/media_router/media_router_dialog_controller_impl.cc

Issue 1417893005: Fix MRDialogDelegate and tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/toolbar/media_router_action_unittest.cc ('k') | chrome/chrome_tests_unit.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/media_router/media_router_dialog_controller_impl.cc
diff --git a/chrome/browser/ui/webui/media_router/media_router_dialog_controller_impl.cc b/chrome/browser/ui/webui/media_router/media_router_dialog_controller_impl.cc
index 862cbd470a66e6c7ec638901260c0193a98d7aa6..5849f75af7605749cb6517dfc740cb34ba83455b 100644
--- a/chrome/browser/ui/webui/media_router/media_router_dialog_controller_impl.cc
+++ b/chrome/browser/ui/webui/media_router/media_router_dialog_controller_impl.cc
@@ -49,7 +49,8 @@ namespace {
// will look like.
class MediaRouterDialogDelegate : public WebDialogDelegate {
public:
- explicit MediaRouterDialogDelegate(base::WeakPtr<MediaRouterAction> action) {}
+ explicit MediaRouterDialogDelegate(base::WeakPtr<MediaRouterAction> action)
+ : action_(action) {}
~MediaRouterDialogDelegate() override {}
// WebDialogDelegate implementation.
@@ -93,10 +94,6 @@ class MediaRouterDialogDelegate : public WebDialogDelegate {
return false;
}
- void SetAction(const base::WeakPtr<MediaRouterAction>& action) {
- action_ = action;
- }
-
private:
base::WeakPtr<MediaRouterAction> action_;
@@ -191,11 +188,6 @@ void MediaRouterDialogControllerImpl::CloseMediaRouterDialog() {
if (media_router_ui)
media_router_ui->Close();
}
-
- // If there was no dialog to be closed, the action icon should not have been
- // pressed and this would be a no-op.
- if (action_)
- action_->OnPopupHidden();
}
void MediaRouterDialogControllerImpl::CreateMediaRouterDialog() {
@@ -243,9 +235,6 @@ void MediaRouterDialogControllerImpl::CreateMediaRouterDialog() {
void MediaRouterDialogControllerImpl::Reset() {
MediaRouterDialogController::Reset();
dialog_observer_.reset();
-
- if (action_)
- action_->OnPopupHidden();
}
void MediaRouterDialogControllerImpl::OnDialogNavigated(
« no previous file with comments | « chrome/browser/ui/toolbar/media_router_action_unittest.cc ('k') | chrome/chrome_tests_unit.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698