| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_RENDERER_HOST_DATABASE_PERMISSION_REQUEST_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_DATABASE_PERMISSION_REQUEST_H_ |
| 6 #define CHROME_BROWSER_RENDERER_HOST_DATABASE_PERMISSION_REQUEST_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_DATABASE_PERMISSION_REQUEST_H_ |
| 7 | 7 |
| 8 #include "base/ref_counted.h" | 8 #include "base/ref_counted.h" |
| 9 #include "base/scoped_ptr.h" | 9 #include "base/scoped_ptr.h" |
| 10 #include "base/string16.h" | 10 #include "base/string16.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 HostContentSettingsMap* settings_map); | 27 HostContentSettingsMap* settings_map); |
| 28 ~DatabasePermissionRequest(); | 28 ~DatabasePermissionRequest(); |
| 29 | 29 |
| 30 const GURL& url() const { return url_; } | 30 const GURL& url() const { return url_; } |
| 31 const string16& database_name() const { return database_name_; } | 31 const string16& database_name() const { return database_name_; } |
| 32 | 32 |
| 33 // Start the permission request process. | 33 // Start the permission request process. |
| 34 void RequestPermission(); | 34 void RequestPermission(); |
| 35 | 35 |
| 36 // CookiesPromptViewDelegate methods: | 36 // CookiesPromptViewDelegate methods: |
| 37 virtual void AllowSiteData(bool remember, bool session_expire); | 37 virtual void AllowSiteData(bool session_expire); |
| 38 virtual void BlockSiteData(bool remember); | 38 virtual void BlockSiteData(); |
| 39 | 39 |
| 40 private: | 40 private: |
| 41 void SendResponse(ContentSetting content_setting, bool remember); | 41 void SendResponse(ContentSetting content_setting); |
| 42 | 42 |
| 43 // The URL to get permission for. | 43 // The URL to get permission for. |
| 44 const GURL url_; | 44 const GURL url_; |
| 45 const string16 database_name_; | 45 const string16 database_name_; |
| 46 | 46 |
| 47 // Set on IO, possibly release()ed on UI, destroyed on IO or UI. | 47 // Set on IO, possibly release()ed on UI, destroyed on IO or UI. |
| 48 scoped_ptr<Task> on_allow_; | 48 scoped_ptr<Task> on_allow_; |
| 49 scoped_ptr<Task> on_block_; | 49 scoped_ptr<Task> on_block_; |
| 50 | 50 |
| 51 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; | 51 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; |
| 52 | 52 |
| 53 // Released once we have our answer. | 53 // Released once we have our answer. |
| 54 scoped_refptr<DatabasePermissionRequest> self_ref_; | 54 scoped_refptr<DatabasePermissionRequest> self_ref_; |
| 55 | 55 |
| 56 DISALLOW_IMPLICIT_CONSTRUCTORS(DatabasePermissionRequest); | 56 DISALLOW_IMPLICIT_CONSTRUCTORS(DatabasePermissionRequest); |
| 57 }; | 57 }; |
| 58 | 58 |
| 59 #endif // CHROME_BROWSER_RENDERER_HOST_DATABASE_PERMISSION_REQUEST_H_ | 59 #endif // CHROME_BROWSER_RENDERER_HOST_DATABASE_PERMISSION_REQUEST_H_ |
| OLD | NEW |