| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 | 48 |
| 49 WebSecurityOrigin() : m_private(0) { } | 49 WebSecurityOrigin() : m_private(0) { } |
| 50 WebSecurityOrigin(const WebSecurityOrigin& s) : m_private(0) { assign(s); } | 50 WebSecurityOrigin(const WebSecurityOrigin& s) : m_private(0) { assign(s); } |
| 51 WebSecurityOrigin& operator=(const WebSecurityOrigin& s) { assign(s); return *this; } | 51 WebSecurityOrigin& operator=(const WebSecurityOrigin& s) { assign(s); return *this; } |
| 52 | 52 |
| 53 WEBKIT_API void reset(); | 53 WEBKIT_API void reset(); |
| 54 WEBKIT_API void assign(const WebSecurityOrigin&); | 54 WEBKIT_API void assign(const WebSecurityOrigin&); |
| 55 | 55 |
| 56 bool isNull() const { return m_private == 0; } | 56 bool isNull() const { return m_private == 0; } |
| 57 | 57 |
| 58 // Returns a string representation of this SecurityOrigin that can be used as a file. | 58 WEBKIT_API WebString protocol() const; |
| 59 // Should be used in storage APIs only. | 59 WEBKIT_API WebString host() const; |
| 60 WEBKIT_API unsigned short port() const; |
| 61 |
| 62 // The empty WebSecurityOrigin is the least privileged WebSecurityOrigin. |
| 63 WEBKIT_API bool isEmpty() const; |
| 64 |
| 65 // Returns a string representation of the WebSecurityOrigin. The empty |
| 66 // WebSecurityOrigin is represented by "null". The representation of a |
| 67 // non-empty WebSecurityOrigin resembles a standard URL. |
| 68 WEBKIT_API WebString toString() const; |
| 69 |
| 70 // Returns a string representation of this WebSecurityOrigin that can |
| 71 // be used as a file. Should be used in storage APIs only. |
| 60 WEBKIT_API WebString databaseIdentifier(); | 72 WEBKIT_API WebString databaseIdentifier(); |
| 61 | 73 |
| 62 WEBKIT_API WebString toString() const; | |
| 63 | |
| 64 #if WEBKIT_IMPLEMENTATION | 74 #if WEBKIT_IMPLEMENTATION |
| 65 WebSecurityOrigin(const WTF::PassRefPtr<WebCore::SecurityOrigin>&); | 75 WebSecurityOrigin(const WTF::PassRefPtr<WebCore::SecurityOrigin>&); |
| 66 WebSecurityOrigin& operator=(const WTF::PassRefPtr<WebCore::SecurityOrigin>&); | 76 WebSecurityOrigin& operator=(const WTF::PassRefPtr<WebCore::SecurityOrigin>&); |
| 67 operator WTF::PassRefPtr<WebCore::SecurityOrigin>() const; | 77 operator WTF::PassRefPtr<WebCore::SecurityOrigin>() const; |
| 68 #endif | 78 #endif |
| 69 | 79 |
| 70 private: | 80 private: |
| 71 void assign(WebSecurityOriginPrivate*); | 81 void assign(WebSecurityOriginPrivate*); |
| 72 WebSecurityOriginPrivate* m_private; | 82 WebSecurityOriginPrivate* m_private; |
| 73 }; | 83 }; |
| 74 | 84 |
| 75 } // namespace WebKit | 85 } // namespace WebKit |
| 76 | 86 |
| 77 #endif | 87 #endif |
| OLD | NEW |