| 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 15 matching lines...) Expand all Loading... |
| 26 public: | 26 public: |
| 27 ~MediaRouterDialogControllerImpl() override; | 27 ~MediaRouterDialogControllerImpl() override; |
| 28 | 28 |
| 29 static MediaRouterDialogControllerImpl* GetOrCreateForWebContents( | 29 static MediaRouterDialogControllerImpl* GetOrCreateForWebContents( |
| 30 content::WebContents* web_contents); | 30 content::WebContents* web_contents); |
| 31 | 31 |
| 32 // Returns the media router dialog WebContents. | 32 // Returns the media router dialog WebContents. |
| 33 // Returns nullptr if there is no dialog. | 33 // Returns nullptr if there is no dialog. |
| 34 content::WebContents* GetMediaRouterDialog() const; | 34 content::WebContents* GetMediaRouterDialog() const; |
| 35 | 35 |
| 36 // |action| must always be non-null. | 36 // Sets the action to notify when a dialog gets shown or hidden. |
| 37 void SetMediaRouterAction(const base::WeakPtr<MediaRouterAction>& action); | 37 void SetMediaRouterAction(const base::WeakPtr<MediaRouterAction>& action); |
| 38 | 38 |
| 39 // MediaRouterDialogController: | 39 // MediaRouterDialogController: |
| 40 bool IsShowingMediaRouterDialog() const override; | 40 bool IsShowingMediaRouterDialog() const override; |
| 41 | 41 |
| 42 void UpdateMaxDialogSize(); | 42 void UpdateMaxDialogSize(); |
| 43 | 43 |
| 44 private: | 44 private: |
| 45 class DialogWebContentsObserver; | 45 class DialogWebContentsObserver; |
| 46 friend class content::WebContentsUserData<MediaRouterDialogControllerImpl>; | 46 friend class content::WebContentsUserData<MediaRouterDialogControllerImpl>; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 76 base::WeakPtr<MediaRouterAction> action_; | 76 base::WeakPtr<MediaRouterAction> action_; |
| 77 | 77 |
| 78 base::WeakPtrFactory<MediaRouterDialogControllerImpl> weak_ptr_factory_; | 78 base::WeakPtrFactory<MediaRouterDialogControllerImpl> weak_ptr_factory_; |
| 79 | 79 |
| 80 DISALLOW_COPY_AND_ASSIGN(MediaRouterDialogControllerImpl); | 80 DISALLOW_COPY_AND_ASSIGN(MediaRouterDialogControllerImpl); |
| 81 }; | 81 }; |
| 82 | 82 |
| 83 } // namespace media_router | 83 } // namespace media_router |
| 84 | 84 |
| 85 #endif // CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_ROUTER_DIALOG_CONTROLLER_I
MPL_H_ | 85 #endif // CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_ROUTER_DIALOG_CONTROLLER_I
MPL_H_ |
| OLD | NEW |