15f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)// Copyright 2014 The Chromium Authors. All rights reserved.
25f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be
35f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)// found in the LICENSE file.
45f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)
55f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)#ifndef CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_INFOBAR_DELEGATE_H_
65f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)#define CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_INFOBAR_DELEGATE_H_
75f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)
85f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)#include <string>
95f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)
105f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)#include "chrome/browser/content_settings/permission_infobar_delegate.h"
115f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)
125f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)class DesktopNotificationInfoBarDelegate : public PermissionInfobarDelegate {
135f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles) public:
145f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)  // Creates a Notification permission infobar and delegate and adds the
155f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)  // infobar to |infobar_service|.
165f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)  // Returns the infobar if it was successfully added.
175f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)  static infobars::InfoBar* Create(InfoBarService* infobar_service,
185f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)                                   PermissionQueueController* controller,
195f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)                                   const PermissionRequestID& id,
205f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)                                   const GURL& requesting_frame,
215f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)                                   const std::string& display_languages);
225f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles) private:
235f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)  DesktopNotificationInfoBarDelegate(PermissionQueueController* controller,
245f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)                                     const PermissionRequestID& id,
255f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)                                     const GURL& requesting_frame,
265f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)                                     int contents_unique_id,
275f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)                                     const std::string& display_languages);
285f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)  virtual ~DesktopNotificationInfoBarDelegate();
295f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)
305f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)  // PermissionInfoBarDelegate:
315f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)  virtual base::string16 GetMessageText() const OVERRIDE;
325f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)  virtual int GetIconID() const OVERRIDE;
335f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)
345f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)  GURL requesting_frame_;
355f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)  std::string display_languages_;
365f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)
375f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)  DISALLOW_COPY_AND_ASSIGN(DesktopNotificationInfoBarDelegate);
385f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)};
395f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)
405f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)#endif  // CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_INFOBAR_DELEGATE_H_
41