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_IN_PROCESS_WEBKIT_DOM_STORAGE_PERMISSION_REQUEST_H_ | 5 #ifndef CHROME_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_PERMISSION_REQUEST_H_ |
6 #define CHROME_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_PERMISSION_REQUEST_H_ | 6 #define CHROME_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_PERMISSION_REQUEST_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/ref_counted.h" | 10 #include "base/ref_counted.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 ContentSetting WaitOnResponse(); | 28 ContentSetting WaitOnResponse(); |
29 | 29 |
30 const GURL& url() const { return url_; } | 30 const GURL& url() const { return url_; } |
31 const string16& key() const { return key_; } | 31 const string16& key() const { return key_; } |
32 const string16& value() const { return value_; } | 32 const string16& value() const { return value_; } |
33 | 33 |
34 // Called on the UI thread. | 34 // Called on the UI thread. |
35 static void PromptUser(DOMStoragePermissionRequest* request); | 35 static void PromptUser(DOMStoragePermissionRequest* request); |
36 | 36 |
37 // CookiesPromptViewDelegate methods: | 37 // CookiesPromptViewDelegate methods: |
38 virtual void AllowSiteData(bool remember, bool session_expire); | 38 virtual void AllowSiteData(bool session_expire); |
39 virtual void BlockSiteData(bool remember); | 39 virtual void BlockSiteData(); |
40 | 40 |
41 private: | 41 private: |
42 void SendResponse(ContentSetting content_setting, bool remember); | 42 void SendResponse(ContentSetting content_setting); |
43 | 43 |
44 // The URL we need to get permission for. | 44 // The URL we need to get permission for. |
45 const GURL url_; | 45 const GURL url_; |
46 | 46 |
47 // The key we're trying to set. | 47 // The key we're trying to set. |
48 const string16 key_; | 48 const string16 key_; |
49 | 49 |
50 // The value we're trying to set. | 50 // The value we're trying to set. |
51 const string16 value_; | 51 const string16 value_; |
52 | 52 |
53 // The response to the permission request. | 53 // The response to the permission request. |
54 ContentSetting response_content_setting_; | 54 ContentSetting response_content_setting_; |
55 | 55 |
56 // One time use. Never reset. | 56 // One time use. Never reset. |
57 base::WaitableEvent event_; | 57 base::WaitableEvent event_; |
58 | 58 |
59 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; | 59 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; |
60 | 60 |
61 DISALLOW_IMPLICIT_CONSTRUCTORS(DOMStoragePermissionRequest); | 61 DISALLOW_IMPLICIT_CONSTRUCTORS(DOMStoragePermissionRequest); |
62 }; | 62 }; |
63 | 63 |
64 #endif // CHROME_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_PERMISSION_REQUEST_H_ | 64 #endif // CHROME_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_PERMISSION_REQUEST_H_ |
OLD | NEW |