OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 16 matching lines...) Expand all Loading... |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #ifndef WebSecurityOrigin_h | 31 #ifndef WebSecurityOrigin_h |
32 #define WebSecurityOrigin_h | 32 #define WebSecurityOrigin_h |
33 | 33 |
34 #include "../platform/WebCommon.h" | 34 #include "../platform/WebCommon.h" |
35 | 35 |
36 #if BLINK_IMPLEMENTATION | 36 #if BLINK_IMPLEMENTATION |
37 namespace blink { class SecurityOrigin; } | |
38 namespace WTF { template <typename T> class PassRefPtr; } | 37 namespace WTF { template <typename T> class PassRefPtr; } |
39 #endif | 38 #endif |
40 | 39 |
41 namespace blink { | 40 namespace blink { |
42 | 41 |
| 42 class SecurityOrigin; |
43 class WebSecurityOriginPrivate; | 43 class WebSecurityOriginPrivate; |
44 class WebString; | 44 class WebString; |
45 class WebURL; | 45 class WebURL; |
46 | 46 |
47 class WebSecurityOrigin { | 47 class WebSecurityOrigin { |
48 public: | 48 public: |
49 ~WebSecurityOrigin() { reset(); } | 49 ~WebSecurityOrigin() { reset(); } |
50 | 50 |
51 WebSecurityOrigin() : m_private(0) { } | 51 WebSecurityOrigin() : m_private(0) { } |
52 WebSecurityOrigin(const WebSecurityOrigin& s) : m_private(0) { assign(s); } | 52 WebSecurityOrigin(const WebSecurityOrigin& s) : m_private(0) { assign(s); } |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 BLINK_EXPORT WebString databaseIdentifier() const; | 100 BLINK_EXPORT WebString databaseIdentifier() const; |
101 | 101 |
102 // Returns true if this WebSecurityOrigin can access usernames and | 102 // Returns true if this WebSecurityOrigin can access usernames and |
103 // passwords stored in password manager. | 103 // passwords stored in password manager. |
104 BLINK_EXPORT bool canAccessPasswordManager() const; | 104 BLINK_EXPORT bool canAccessPasswordManager() const; |
105 | 105 |
106 // Allows this WebSecurityOrigin access to local resources. | 106 // Allows this WebSecurityOrigin access to local resources. |
107 BLINK_EXPORT void grantLoadLocalResources() const; | 107 BLINK_EXPORT void grantLoadLocalResources() const; |
108 | 108 |
109 #if BLINK_IMPLEMENTATION | 109 #if BLINK_IMPLEMENTATION |
110 WebSecurityOrigin(const WTF::PassRefPtr<blink::SecurityOrigin>&); | 110 WebSecurityOrigin(const WTF::PassRefPtr<SecurityOrigin>&); |
111 WebSecurityOrigin& operator=(const WTF::PassRefPtr<blink::SecurityOrigin>&); | 111 WebSecurityOrigin& operator=(const WTF::PassRefPtr<SecurityOrigin>&); |
112 operator WTF::PassRefPtr<blink::SecurityOrigin>() const; | 112 operator WTF::PassRefPtr<SecurityOrigin>() const; |
113 blink::SecurityOrigin* get() const; | 113 SecurityOrigin* get() const; |
114 #endif | 114 #endif |
115 | 115 |
116 private: | 116 private: |
117 void assign(WebSecurityOriginPrivate*); | 117 void assign(WebSecurityOriginPrivate*); |
118 WebSecurityOriginPrivate* m_private; | 118 WebSecurityOriginPrivate* m_private; |
119 }; | 119 }; |
120 | 120 |
121 } // namespace blink | 121 } // namespace blink |
122 | 122 |
123 #endif | 123 #endif |
OLD | NEW |