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

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

Issue 2321163002: Allow MediaRouterDialogControllerImpl to re-set its reference to MRAction (Closed)
Patch Set: Created 4 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 | « 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 15 matching lines...) Expand all
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
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_
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