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

Unified Diff: chrome/browser/services/gcm/gcm_infobar_delegate.h

Issue 343743004: Implement a permission check for push. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased and addressed Michael's comments Created 6 years, 6 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
Index: chrome/browser/services/gcm/gcm_infobar_delegate.h
diff --git a/chrome/browser/services/gcm/gcm_infobar_delegate.h b/chrome/browser/services/gcm/gcm_infobar_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..1cf4147d995a43379b132ae8e2cc343e5381e198
--- /dev/null
+++ b/chrome/browser/services/gcm/gcm_infobar_delegate.h
@@ -0,0 +1,44 @@
+// Copyright 2014 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_SERVICES_GCM_GCM_INFOBAR_DELEGATE_H_
+#define CHROME_BROWSER_SERVICES_GCM_GCM_INFOBAR_DELEGATE_H_
+
+#include "chrome/browser/services/gcm/permission_infobar_delegate.h"
+
+class GURL;
+class InfoBarService;
+
+namespace gcm {
+
+// Delegate to allow GCM push messages registration.
+class GCMInfoBarDelegate : public PermissionInfobarDelegate {
+ public:
+ virtual ~GCMInfoBarDelegate();
+
+ // Creates a Push Permission infobar and delegate and adds the infobar to
+ // |infobar_service|. Returns the infobar if it was successfully added.
+ static infobars::InfoBar* Create(InfoBarService* infobar_service,
+ PermissionQueueController* controller,
+ const PermissionRequestID& id,
+ GURL& requesting_frame,
+ const std::string& display_languages);
+
+ private:
+ GCMInfoBarDelegate(PermissionQueueController* controller,
+ const PermissionRequestID& id,
+ GURL& requesting_frame,
+ const std::string& display_languages);
+
+ // ConfirmInfoBarDelegate:
+ virtual base::string16 GetMessageText() const OVERRIDE;
+
+ GURL& requesting_frame_;
+ const std::string& display_languages_;
+
+ DISALLOW_COPY_AND_ASSIGN(GCMInfoBarDelegate);
+};
+
+} // namespace gcm
Peter Kasting 2014/06/19 17:58:20 Nit: Blank line below this
Miguel Garcia 2014/06/19 21:49:22 Done.
Peter Kasting 2014/06/19 22:04:31 Doesn't appear like you did this, in either this f
+#endif // CHROME_BROWSER_SERVICES_GCM_GCM_INFOBAR_DELEGATE_H_

Powered by Google App Engine
This is Rietveld 408576698