| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 PPAPI_CPP_DEV_URL_UTIL_DEV_H_ | 5 #ifndef PPAPI_CPP_DEV_URL_UTIL_DEV_H_ |
| 6 #define PPAPI_CPP_DEV_URL_UTIL_DEV_H_ | 6 #define PPAPI_CPP_DEV_URL_UTIL_DEV_H_ |
| 7 | 7 |
| 8 #include "ppapi/c/dev/ppb_url_util_dev.h" | 8 #include "ppapi/c/dev/ppb_url_util_dev.h" |
| 9 #include "ppapi/cpp/var.h" | 9 #include "ppapi/cpp/var.h" |
| 10 | 10 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 // support the URLUtil inteface. Since this is a singleton, don't delete the | 22 // support the URLUtil inteface. Since this is a singleton, don't delete the |
| 23 // pointer. | 23 // pointer. |
| 24 static const URLUtil_Dev* Get(); | 24 static const URLUtil_Dev* Get(); |
| 25 | 25 |
| 26 Var Canonicalize(const Var& url, | 26 Var Canonicalize(const Var& url, |
| 27 PP_URLComponents_Dev* components = NULL) const; | 27 PP_URLComponents_Dev* components = NULL) const; |
| 28 | 28 |
| 29 Var ResolveRelativeToURL(const Var& base_url, | 29 Var ResolveRelativeToURL(const Var& base_url, |
| 30 const Var& relative_string, | 30 const Var& relative_string, |
| 31 PP_URLComponents_Dev* components = NULL) const; | 31 PP_URLComponents_Dev* components = NULL) const; |
| 32 Var ResoveRelativeToDocument(const Instance& instance, | 32 Var ResolveRelativeToDocument(const Instance& instance, |
| 33 const Var& relative_string, | 33 const Var& relative_string, |
| 34 PP_URLComponents_Dev* components = NULL) const; | 34 PP_URLComponents_Dev* components = NULL) const; |
| 35 | 35 |
| 36 bool IsSameSecurityOrigin(const Var& url_a, const Var& url_b) const; | 36 bool IsSameSecurityOrigin(const Var& url_a, const Var& url_b) const; |
| 37 bool DocumentCanRequest(const Instance& instance, const Var& url) const; | 37 bool DocumentCanRequest(const Instance& instance, const Var& url) const; |
| 38 bool DocumentCanAccessDocument(const Instance& active, | 38 bool DocumentCanAccessDocument(const Instance& active, |
| 39 const Instance& target) const; | 39 const Instance& target) const; |
| 40 Var GetDocumentURL(const Instance& instance, | 40 Var GetDocumentURL(const Instance& instance, |
| 41 PP_URLComponents_Dev* components = NULL) const; | 41 PP_URLComponents_Dev* components = NULL) const; |
| 42 | 42 |
| 43 private: | 43 private: |
| 44 URLUtil_Dev() : interface_(NULL) {} | 44 URLUtil_Dev() : interface_(NULL) {} |
| 45 | 45 |
| 46 // Copy and assignment are disallowed. | 46 // Copy and assignment are disallowed. |
| 47 URLUtil_Dev(const URLUtil_Dev& other); | 47 URLUtil_Dev(const URLUtil_Dev& other); |
| 48 URLUtil_Dev& operator=(const URLUtil_Dev& other); | 48 URLUtil_Dev& operator=(const URLUtil_Dev& other); |
| 49 | 49 |
| 50 const PPB_URLUtil_Dev* interface_; | 50 const PPB_URLUtil_Dev* interface_; |
| 51 }; | 51 }; |
| 52 | 52 |
| 53 } // namespace pp | 53 } // namespace pp |
| 54 | 54 |
| 55 #endif // PPAPI_CPP_DEV_URL_UTIL_DEV_H_ | 55 #endif // PPAPI_CPP_DEV_URL_UTIL_DEV_H_ |
| 56 | 56 |
| OLD | NEW |