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

Unified Diff: chrome/browser/ui/media_stream_infobar_delegate.h

Issue 11644059: Change infobar creation to use a public static Create() method on the infobar delegate classes. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 11 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/hung_plugin_tab_helper.cc ('k') | chrome/browser/ui/media_stream_infobar_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/media_stream_infobar_delegate.h
===================================================================
--- chrome/browser/ui/media_stream_infobar_delegate.h (revision 175396)
+++ chrome/browser/ui/media_stream_infobar_delegate.h (working copy)
@@ -19,13 +19,17 @@
// to them.
class MediaStreamInfoBarDelegate : public ConfirmInfoBarDelegate {
public:
- // MediaStreamInfoBarDelegate takes the ownership of the |controller|.
- MediaStreamInfoBarDelegate(
- InfoBarService* infobar_service,
- MediaStreamDevicesController* controller);
-
virtual ~MediaStreamInfoBarDelegate();
+ // Handles a permission request (in |request|) for |web_contents|. If this
+ // involves prompting the user, creates a media stream delegate, then checks
+ // for an existing infobar for |web_contents| and replaces it if found, or
+ // just adds the new infobar otherwise. Returns whether an infobar was
+ // created.
+ static bool Create(content::WebContents* web_contents,
+ const content::MediaStreamRequest& request,
+ const content::MediaResponseCallback& callback);
+
// ConfirmInfoBarDelegate:
virtual void InfoBarDismissed() OVERRIDE;
virtual gfx::Image* GetIcon() const OVERRIDE;
@@ -39,6 +43,11 @@
virtual bool LinkClicked(WindowOpenDisposition disposition) OVERRIDE;
private:
+ // MediaStreamInfoBarDelegate takes the ownership of the |controller|.
+ MediaStreamInfoBarDelegate(
+ InfoBarService* infobar_service,
+ MediaStreamDevicesController* controller);
+
scoped_ptr<MediaStreamDevicesController> controller_;
DISALLOW_COPY_AND_ASSIGN(MediaStreamInfoBarDelegate);
« no previous file with comments | « chrome/browser/ui/hung_plugin_tab_helper.cc ('k') | chrome/browser/ui/media_stream_infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698