Chromium Code Reviews| 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..fc944d875d2c8cde1438b6efc86dd8c288656612 |
| --- /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 { |
|
jianli
2014/06/20 17:19:29
The info bar seems to be targeted only for web pus
Miguel Garcia
2014/06/20 20:50:12
Ok, since two people already asked for the same I'
|
| + 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, |
|
fgorski
2014/06/20 14:14:15
pass GURL as const &.
Miguel Garcia
2014/06/20 20:50:11
Done.
|
| + const std::string& display_languages); |
| + |
| + private: |
| + GCMInfoBarDelegate(PermissionQueueController* controller, |
| + const PermissionRequestID& id, |
| + GURL& requesting_frame, |
|
fgorski
2014/06/20 14:14:15
same here
Miguel Garcia
2014/06/20 20:50:12
Done.
|
| + const std::string& display_languages); |
| + |
| + // ConfirmInfoBarDelegate: |
| + virtual base::string16 GetMessageText() const OVERRIDE; |
| + |
| + const GURL requesting_origin_; |
| + const std::string& display_languages_; |
|
Peter Kasting
2014/06/19 22:04:31
Having this as a const ref makes me nervous, since
fgorski
2014/06/20 14:14:15
+1
Miguel Garcia
2014/06/20 20:50:11
Done.
Miguel Garcia
2014/06/20 20:50:12
Done.
|
| + |
| + DISALLOW_COPY_AND_ASSIGN(GCMInfoBarDelegate); |
| +}; |
| + |
| +} // namespace gcm |
|
fgorski
2014/06/20 14:14:15
nit: Please add empty line below and make it consi
Miguel Garcia
2014/06/20 20:50:11
Done.
|
| +#endif // CHROME_BROWSER_SERVICES_GCM_GCM_INFOBAR_DELEGATE_H_ |