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

Unified Diff: chrome/browser/pepper_broker_infobar_delegate.h

Issue 11416013: Move RequestPpapiBrokerPermission from WebContentsObserver to WebContentsDelegate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 8 years, 1 month 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
Index: chrome/browser/pepper_broker_infobar_delegate.h
diff --git a/chrome/browser/pepper_broker_infobar_delegate.h b/chrome/browser/pepper_broker_infobar_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..37dcd217400bbe2710586aa115f9307117ea9627
--- /dev/null
+++ b/chrome/browser/pepper_broker_infobar_delegate.h
@@ -0,0 +1,60 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_PEPPER_BROKER_INFOBAR_DELEGATE_H_
+#define CHROME_BROWSER_PEPPER_BROKER_INFOBAR_DELEGATE_H_
+
+#include "base/callback.h"
+#include "base/file_path.h"
+#include "chrome/browser/api/infobars/confirm_infobar_delegate.h"
+#include "googleurl/src/gurl.h"
+
+class HostContentSettingsMap;
+class InfoBarTabHelper;
+
+namespace content {
+class WebContents;
+}
+
+class PepperBrokerInfoBarDelegate : public ConfirmInfoBarDelegate {
sky 2012/11/16 21:48:30 Add description.
Bernhard Bauer 2012/11/19 08:55:17 Done.
+ public:
+ static void Show(
+ content::WebContents* web_contents,
+ const GURL& url,
+ const FilePath& plugin_path,
+ const base::Callback<void(bool)>& callback);
+
+ virtual ~PepperBrokerInfoBarDelegate();
sky 2012/11/16 21:48:30 constructor/destructor before other methods.
Bernhard Bauer 2012/11/19 08:55:17 Done.
+
+ // ConfirmInfoBarDelegate:
+ virtual string16 GetMessageText() const OVERRIDE;
+ virtual int GetButtons() const OVERRIDE;
+ virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE;
+ virtual bool Accept() OVERRIDE;
+ virtual bool Cancel() OVERRIDE;
+ virtual string16 GetLinkText() const OVERRIDE;
+ virtual bool LinkClicked(WindowOpenDisposition disposition) OVERRIDE;
+ virtual gfx::Image* GetIcon() const OVERRIDE;
+
+ private:
+ PepperBrokerInfoBarDelegate(
+ InfoBarTabHelper* helper,
+ const GURL& url,
+ const FilePath& plugin_path,
+ const std::string& languages,
+ HostContentSettingsMap* content_settings,
+ const base::Callback<void(bool)>& callback);
+
+ void DispatchCallback(bool result);
+
+ const GURL url_;
+ const FilePath plugin_path_;
+ const std::string languages_;
+ HostContentSettingsMap* content_settings_;
+ base::Callback<void(bool)> callback_;
+
+ DISALLOW_COPY_AND_ASSIGN(PepperBrokerInfoBarDelegate);
+};
+
+#endif // CHROME_BROWSER_PEPPER_BROKER_INFOBAR_DELEGATE_H_
« no previous file with comments | « no previous file | chrome/browser/pepper_broker_infobar_delegate.cc » ('j') | chrome/browser/pepper_broker_infobar_delegate.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698