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

Side by Side Diff: chrome/browser/services/gcm/push_messaging_infobar_delegate.h

Issue 371933002: Add UMA for the new generic permisison class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_SERVICES_GCM_PUSH_MESSAGING_INFOBAR_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_INFOBAR_DELEGATE_H_
6 #define CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_INFOBAR_DELEGATE_H_ 6 #define CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_INFOBAR_DELEGATE_H_
7 7
8 #include "chrome/browser/content_settings/permission_infobar_delegate.h" 8 #include "chrome/browser/content_settings/permission_infobar_delegate.h"
9 #include "chrome/common/content_settings_types.h"
9 10
10 class GURL; 11 class GURL;
11 class InfoBarService; 12 class InfoBarService;
12 13
13 namespace gcm { 14 namespace gcm {
14 15
15 // Delegate to allow GCM push messages registration. 16 // Delegate to allow GCM push messages registration.
16 class PushMessagingInfoBarDelegate : public PermissionInfobarDelegate { 17 class PushMessagingInfoBarDelegate : public PermissionInfobarDelegate {
17 public: 18 public:
18 19
19 // Creates a Push Permission infobar and delegate and adds the infobar to 20 // Creates a Push Permission infobar and delegate and adds the infobar to
20 // |infobar_service|. Returns the infobar if it was successfully added. 21 // |infobar_service|. Returns the infobar if it was successfully added.
21 static infobars::InfoBar* Create(InfoBarService* infobar_service, 22 static infobars::InfoBar* Create(InfoBarService* infobar_service,
22 PermissionQueueController* controller, 23 PermissionQueueController* controller,
23 const PermissionRequestID& id, 24 const PermissionRequestID& id,
24 const GURL& requesting_frame, 25 const GURL& requesting_frame,
25 const std::string& display_languages); 26 const std::string& display_languages,
27 ContentSettingsType type);
26 28
27 private: 29 private:
28 PushMessagingInfoBarDelegate(PermissionQueueController* controller, 30 PushMessagingInfoBarDelegate(PermissionQueueController* controller,
29 const PermissionRequestID& id, 31 const PermissionRequestID& id,
30 const GURL& requesting_frame, 32 const GURL& requesting_frame,
31 const std::string& display_languages); 33 const std::string& display_languages,
34 ContentSettingsType type);
32 virtual ~PushMessagingInfoBarDelegate(); 35 virtual ~PushMessagingInfoBarDelegate();
33 36
34 // ConfirmInfoBarDelegate: 37 // ConfirmInfoBarDelegate:
35 virtual base::string16 GetMessageText() const OVERRIDE; 38 virtual base::string16 GetMessageText() const OVERRIDE;
36 virtual int GetIconID() const OVERRIDE; 39 virtual int GetIconID() const OVERRIDE;
37 40
38 const GURL requesting_origin_; 41 const GURL requesting_origin_;
39 const std::string display_languages_; 42 const std::string display_languages_;
40 43
41 DISALLOW_COPY_AND_ASSIGN(PushMessagingInfoBarDelegate); 44 DISALLOW_COPY_AND_ASSIGN(PushMessagingInfoBarDelegate);
42 }; 45 };
43 46
44 } // namespace gcm 47 } // namespace gcm
45 #endif // CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_INFOBAR_DELEGATE_H_ 48 #endif // CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_INFOBAR_DELEGATE_H_
46 49
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698