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

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

Issue 1476053002: [Media Router] Only keep track of toolbar MediaRouterAction in MediaRouterDialogControllerImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « no previous file | chrome/browser/ui/webui/media_router/media_router_dialog_controller_impl.cc » ('j') | 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 #ifndef CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_ROUTER_DIALOG_CONTROLLER_IMPL _H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_ROUTER_DIALOG_CONTROLLER_IMPL _H_
6 #define CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_ROUTER_DIALOG_CONTROLLER_IMPL _H_ 6 #define CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_ROUTER_DIALOG_CONTROLLER_IMPL _H_
7 7
8 #include "base/gtest_prod_util.h" 8 #include "base/gtest_prod_util.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 void OnDialogNavigated(const content::LoadCommittedDetails& details); 57 void OnDialogNavigated(const content::LoadCommittedDetails& details);
58 58
59 void PopulateDialog(content::WebContents* media_router_dialog); 59 void PopulateDialog(content::WebContents* media_router_dialog);
60 60
61 scoped_ptr<DialogWebContentsObserver> dialog_observer_; 61 scoped_ptr<DialogWebContentsObserver> dialog_observer_;
62 62
63 // True if the controller is waiting for a new media router dialog to be 63 // True if the controller is waiting for a new media router dialog to be
64 // created. 64 // created.
65 bool media_router_dialog_pending_; 65 bool media_router_dialog_pending_;
66 66
67 // |action_| refers to the MediaRouterAction on the toolbar, rather than
68 // overflow menu. A MediaRouterAction is always created for the toolbar
69 // first. Any subsequent creations for the overflow menu will not be set as
70 // |action_|.
71 // The lifetime of |action_| is dependent on the creation and destruction of
72 // a browser window. The overflow menu's MediaRouterAction is only created
73 // when the overflow menu is opened and destroyed when the menu is closed.
67 base::WeakPtr<MediaRouterAction> action_; 74 base::WeakPtr<MediaRouterAction> action_;
68 75
69 DISALLOW_COPY_AND_ASSIGN(MediaRouterDialogControllerImpl); 76 DISALLOW_COPY_AND_ASSIGN(MediaRouterDialogControllerImpl);
70 }; 77 };
71 78
72 } // namespace media_router 79 } // namespace media_router
73 80
74 #endif // CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_ROUTER_DIALOG_CONTROLLER_I MPL_H_ 81 #endif // CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_ROUTER_DIALOG_CONTROLLER_I MPL_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/webui/media_router/media_router_dialog_controller_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698