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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 // SecurityOrigin. For example, call this function before allowing | 76 // SecurityOrigin. For example, call this function before allowing |
77 // script from one security origin to read or write objects from | 77 // script from one security origin to read or write objects from |
78 // another SecurityOrigin. | 78 // another SecurityOrigin. |
79 BLINK_EXPORT bool canAccess(const WebSecurityOrigin&) const; | 79 BLINK_EXPORT bool canAccess(const WebSecurityOrigin&) const; |
80 | 80 |
81 // Returns true if this WebSecurityOrigin can read content retrieved from | 81 // Returns true if this WebSecurityOrigin can read content retrieved from |
82 // the given URL. For example, call this function before allowing script | 82 // the given URL. For example, call this function before allowing script |
83 // from a given security origin to receive contents from a given URL. | 83 // from a given security origin to receive contents from a given URL. |
84 BLINK_EXPORT bool canRequest(const WebURL&) const; | 84 BLINK_EXPORT bool canRequest(const WebURL&) const; |
85 | 85 |
| 86 // A "secure origin" as defined by [1] are those that load resources either |
| 87 // from the local machine (necessarily trusted) or over the network from a |
| 88 // cryptographically-authenticated server. |
| 89 // |
| 90 // [1] http://www.chromium.org/Home/chromium-security/security-faq#TOC-Which
-origins-are-secure- |
| 91 bool canAccessFeatureRequiringSecureOrigin(WebString& errorMessage) const; |
| 92 |
86 // Returns a string representation of the WebSecurityOrigin. The empty | 93 // Returns a string representation of the WebSecurityOrigin. The empty |
87 // WebSecurityOrigin is represented by "null". The representation of a | 94 // WebSecurityOrigin is represented by "null". The representation of a |
88 // non-empty WebSecurityOrigin resembles a standard URL. | 95 // non-empty WebSecurityOrigin resembles a standard URL. |
89 BLINK_EXPORT WebString toString() const; | 96 BLINK_EXPORT WebString toString() const; |
90 | 97 |
91 // Returns a string representation of this WebSecurityOrigin that can | 98 // Returns a string representation of this WebSecurityOrigin that can |
92 // be used as a file. Should be used in storage APIs only. | 99 // be used as a file. Should be used in storage APIs only. |
93 BLINK_EXPORT WebString databaseIdentifier() const; | 100 BLINK_EXPORT WebString databaseIdentifier() const; |
94 | 101 |
95 // Returns true if this WebSecurityOrigin can access usernames and | 102 // Returns true if this WebSecurityOrigin can access usernames and |
(...skipping 11 matching lines...) Expand all Loading... |
107 #endif | 114 #endif |
108 | 115 |
109 private: | 116 private: |
110 void assign(WebSecurityOriginPrivate*); | 117 void assign(WebSecurityOriginPrivate*); |
111 WebSecurityOriginPrivate* m_private; | 118 WebSecurityOriginPrivate* m_private; |
112 }; | 119 }; |
113 | 120 |
114 } // namespace blink | 121 } // namespace blink |
115 | 122 |
116 #endif | 123 #endif |
OLD | NEW |