| OLD | NEW |
| 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 Loading... |
| 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_ |
| OLD | NEW |