| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_GEOLOCATION_GEOLOCATION_INFOBAR_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_GEOLOCATION_GEOLOCATION_INFOBAR_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_GEOLOCATION_GEOLOCATION_INFOBAR_DELEGATE_H_ | 6 #define CHROME_BROWSER_GEOLOCATION_GEOLOCATION_INFOBAR_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "chrome/browser/content_settings/permission_request_id.h" | 10 #include "chrome/browser/content_settings/permission_request_id.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 PermissionQueueController* controller, | 32 PermissionQueueController* controller, |
| 33 const PermissionRequestID& id, | 33 const PermissionRequestID& id, |
| 34 const GURL& requesting_frame, | 34 const GURL& requesting_frame, |
| 35 int contents_unique_id, | 35 int contents_unique_id, |
| 36 const std::string& display_languages); | 36 const std::string& display_languages); |
| 37 virtual ~GeolocationInfoBarDelegate(); | 37 virtual ~GeolocationInfoBarDelegate(); |
| 38 | 38 |
| 39 // ConfirmInfoBarDelegate: | 39 // ConfirmInfoBarDelegate: |
| 40 virtual bool Accept() OVERRIDE; | 40 virtual bool Accept() OVERRIDE; |
| 41 | 41 |
| 42 // Make infobar visible to the user. |
| 43 virtual void Show(InfoBarService* infobar_service); |
| 44 |
| 42 // Call back to the controller, to inform of the user's decision. | 45 // Call back to the controller, to inform of the user's decision. |
| 43 void SetPermission(bool update_content_setting, bool allowed); | 46 void SetPermission(bool update_content_setting, bool allowed); |
| 44 | 47 |
| 45 private: | 48 private: |
| 46 // ConfirmInfoBarDelegate: | 49 // ConfirmInfoBarDelegate: |
| 47 virtual void InfoBarDismissed() OVERRIDE; | 50 virtual void InfoBarDismissed() OVERRIDE; |
| 48 virtual int GetIconID() const OVERRIDE; | 51 virtual int GetIconID() const OVERRIDE; |
| 49 virtual Type GetInfoBarType() const OVERRIDE; | 52 virtual Type GetInfoBarType() const OVERRIDE; |
| 50 virtual bool ShouldExpireInternal( | 53 virtual bool ShouldExpireInternal( |
| 51 const content::LoadCommittedDetails& details) const OVERRIDE; | 54 const content::LoadCommittedDetails& details) const OVERRIDE; |
| 52 virtual string16 GetMessageText() const OVERRIDE; | 55 virtual string16 GetMessageText() const OVERRIDE; |
| 53 virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; | 56 virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; |
| 54 virtual bool Cancel() OVERRIDE; | 57 virtual bool Cancel() OVERRIDE; |
| 55 virtual string16 GetLinkText() const OVERRIDE; | 58 virtual string16 GetLinkText() const OVERRIDE; |
| 56 virtual bool LinkClicked(WindowOpenDisposition disposition) OVERRIDE; | 59 virtual bool LinkClicked(WindowOpenDisposition disposition) OVERRIDE; |
| 57 | 60 |
| 58 PermissionQueueController* controller_; | 61 PermissionQueueController* controller_; |
| 59 const PermissionRequestID id_; | 62 const PermissionRequestID id_; |
| 60 GURL requesting_frame_; | 63 GURL requesting_frame_; |
| 61 int contents_unique_id_; | 64 int contents_unique_id_; |
| 62 std::string display_languages_; | 65 std::string display_languages_; |
| 63 | 66 |
| 64 DISALLOW_COPY_AND_ASSIGN(GeolocationInfoBarDelegate); | 67 DISALLOW_COPY_AND_ASSIGN(GeolocationInfoBarDelegate); |
| 65 }; | 68 }; |
| 66 | 69 |
| 67 #endif // CHROME_BROWSER_GEOLOCATION_GEOLOCATION_INFOBAR_DELEGATE_H_ | 70 #endif // CHROME_BROWSER_GEOLOCATION_GEOLOCATION_INFOBAR_DELEGATE_H_ |
| OLD | NEW |