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_CONFIRM_INFOBAR_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_GEOLOCATION_GEOLOCATION_CONFIRM_INFOBAR_DELEGATE_H_ |
6 #define CHROME_BROWSER_GEOLOCATION_GEOLOCATION_CONFIRM_INFOBAR_DELEGATE_H_ | 6 #define CHROME_BROWSER_GEOLOCATION_GEOLOCATION_CONFIRM_INFOBAR_DELEGATE_H_ |
7 | 7 |
8 #include "chrome/browser/api/infobars/confirm_infobar_delegate.h" | 8 #include "chrome/browser/api/infobars/confirm_infobar_delegate.h" |
9 #include "chrome/browser/geolocation/geolocation_permission_request_id.h" | 9 #include "chrome/browser/geolocation/geolocation_permission_request_id.h" |
10 #include "googleurl/src/gurl.h" | 10 #include "googleurl/src/gurl.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 const GeolocationPermissionRequestID& id, | 25 const GeolocationPermissionRequestID& id, |
26 const GURL& requesting_frame, | 26 const GURL& requesting_frame, |
27 const std::string& display_languages); | 27 const std::string& display_languages); |
28 | 28 |
29 const GeolocationPermissionRequestID& id() const { return id_; } | 29 const GeolocationPermissionRequestID& id() const { return id_; } |
30 | 30 |
31 protected: | 31 protected: |
32 // ConfirmInfoBarDelegate: | 32 // ConfirmInfoBarDelegate: |
33 virtual gfx::Image* GetIcon() const OVERRIDE; | 33 virtual gfx::Image* GetIcon() const OVERRIDE; |
34 virtual Type GetInfoBarType() const OVERRIDE; | 34 virtual Type GetInfoBarType() const OVERRIDE; |
| 35 virtual bool ShouldExpireInternal( |
| 36 const content::LoadCommittedDetails& details) const OVERRIDE; |
35 virtual string16 GetMessageText() const OVERRIDE; | 37 virtual string16 GetMessageText() const OVERRIDE; |
36 virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; | 38 virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; |
37 virtual bool Accept() OVERRIDE; | 39 virtual bool Accept() OVERRIDE; |
38 virtual bool Cancel() OVERRIDE; | 40 virtual bool Cancel() OVERRIDE; |
39 virtual string16 GetLinkText() const OVERRIDE; | 41 virtual string16 GetLinkText() const OVERRIDE; |
40 virtual bool LinkClicked(WindowOpenDisposition disposition) OVERRIDE; | 42 virtual bool LinkClicked(WindowOpenDisposition disposition) OVERRIDE; |
41 | 43 |
42 // Call back to the controller, to inform of the user's decision. | 44 // Call back to the controller, to inform of the user's decision. |
43 void SetPermission(bool update_content_setting, bool allowed); | 45 void SetPermission(bool update_content_setting, bool allowed); |
44 | 46 |
45 private: | 47 private: |
46 GeolocationInfoBarQueueController* controller_; | 48 GeolocationInfoBarQueueController* controller_; |
47 const GeolocationPermissionRequestID id_; | 49 const GeolocationPermissionRequestID id_; |
48 GURL requesting_frame_; | 50 GURL requesting_frame_; |
| 51 int contents_unique_id_; |
49 std::string display_languages_; | 52 std::string display_languages_; |
50 | 53 |
51 DISALLOW_IMPLICIT_CONSTRUCTORS(GeolocationConfirmInfoBarDelegate); | 54 DISALLOW_IMPLICIT_CONSTRUCTORS(GeolocationConfirmInfoBarDelegate); |
52 }; | 55 }; |
53 | 56 |
54 #endif // CHROME_BROWSER_GEOLOCATION_GEOLOCATION_CONFIRM_INFOBAR_DELEGATE_H_ | 57 #endif // CHROME_BROWSER_GEOLOCATION_GEOLOCATION_CONFIRM_INFOBAR_DELEGATE_H_ |
OLD | NEW |