| 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 #include "ppapi/cpp/dev/url_util_dev.h" | 5 #include "ppapi/cpp/dev/url_util_dev.h" |
| 6 | 6 |
| 7 #include "ppapi/cpp/common.h" | 7 #include "ppapi/cpp/common.h" |
| 8 #include "ppapi/cpp/instance.h" | 8 #include "ppapi/cpp/instance.h" |
| 9 #include "ppapi/cpp/module.h" | 9 #include "ppapi/cpp/module.h" |
| 10 | 10 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 const Var& relative_string, | 46 const Var& relative_string, |
| 47 PP_URLComponents_Dev* components) const { | 47 PP_URLComponents_Dev* components) const { |
| 48 return Var(Var::PassRef(), | 48 return Var(Var::PassRef(), |
| 49 interface_->ResolveRelativeToDocument(instance.pp_instance(), | 49 interface_->ResolveRelativeToDocument(instance.pp_instance(), |
| 50 relative_string.pp_var(), | 50 relative_string.pp_var(), |
| 51 components)); | 51 components)); |
| 52 } | 52 } |
| 53 | 53 |
| 54 bool URLUtil_Dev::IsSameSecurityOrigin(const Var& url_a, | 54 bool URLUtil_Dev::IsSameSecurityOrigin(const Var& url_a, |
| 55 const Var& url_b) const { | 55 const Var& url_b) const { |
| 56 return PPBoolToBool(interface_->IsSameSecurityOrigin(url_a.pp_var(), | 56 return PP_ToBool(interface_->IsSameSecurityOrigin(url_a.pp_var(), |
| 57 url_b.pp_var())); | 57 url_b.pp_var())); |
| 58 } | 58 } |
| 59 | 59 |
| 60 bool URLUtil_Dev::DocumentCanRequest(const Instance& instance, | 60 bool URLUtil_Dev::DocumentCanRequest(const Instance& instance, |
| 61 const Var& url) const { | 61 const Var& url) const { |
| 62 return PPBoolToBool(interface_->DocumentCanRequest(instance.pp_instance(), | 62 return PP_ToBool(interface_->DocumentCanRequest(instance.pp_instance(), |
| 63 url.pp_var())); | 63 url.pp_var())); |
| 64 } | 64 } |
| 65 | 65 |
| 66 bool URLUtil_Dev::DocumentCanAccessDocument(const Instance& active, | 66 bool URLUtil_Dev::DocumentCanAccessDocument(const Instance& active, |
| 67 const Instance& target) const { | 67 const Instance& target) const { |
| 68 return PPBoolToBool( | 68 return PP_ToBool( |
| 69 interface_->DocumentCanAccessDocument(active.pp_instance(), | 69 interface_->DocumentCanAccessDocument(active.pp_instance(), |
| 70 target.pp_instance())); | 70 target.pp_instance())); |
| 71 } | 71 } |
| 72 | 72 |
| 73 Var URLUtil_Dev::GetDocumentURL(const Instance& instance, | 73 Var URLUtil_Dev::GetDocumentURL(const Instance& instance, |
| 74 PP_URLComponents_Dev* components) const { | 74 PP_URLComponents_Dev* components) const { |
| 75 return Var(Var::PassRef(), | 75 return Var(Var::PassRef(), |
| 76 interface_->GetDocumentURL(instance.pp_instance(), components)); | 76 interface_->GetDocumentURL(instance.pp_instance(), components)); |
| 77 } | 77 } |
| 78 | 78 |
| 79 Var URLUtil_Dev::GetPluginInstanceURL(const Instance& instance, | 79 Var URLUtil_Dev::GetPluginInstanceURL(const Instance& instance, |
| 80 PP_URLComponents_Dev* components) const { | 80 PP_URLComponents_Dev* components) const { |
| 81 return Var(Var::PassRef(), | 81 return Var(Var::PassRef(), |
| 82 interface_->GetPluginInstanceURL(instance.pp_instance(), | 82 interface_->GetPluginInstanceURL(instance.pp_instance(), |
| 83 components)); | 83 components)); |
| 84 } | 84 } |
| 85 | 85 |
| 86 } // namespace pp | 86 } // namespace pp |
| OLD | NEW |