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/c/pp_errors.h" | 5 #include "ppapi/c/pp_errors.h" |
6 #include "ppapi/shared_impl/ppb_url_util_shared.h" | 6 #include "ppapi/shared_impl/url_util_impl.h" |
7 #include "ppapi/thunk/enter.h" | 7 #include "ppapi/thunk/enter.h" |
8 #include "ppapi/thunk/ppb_instance_api.h" | 8 #include "ppapi/thunk/ppb_instance_api.h" |
9 #include "ppapi/thunk/thunk.h" | 9 #include "ppapi/thunk/thunk.h" |
10 | 10 |
11 namespace ppapi { | 11 namespace ppapi { |
12 namespace thunk { | 12 namespace thunk { |
13 | 13 |
14 namespace { | 14 namespace { |
15 | 15 |
16 PP_Var ResolveRelativeToDocument(PP_Instance instance, | 16 PP_Var ResolveRelativeToDocument(PP_Instance instance, |
(...skipping 30 matching lines...) Expand all Loading... |
47 | 47 |
48 PP_Var GetPluginInstanceURL(PP_Instance instance, | 48 PP_Var GetPluginInstanceURL(PP_Instance instance, |
49 PP_URLComponents_Dev* components) { | 49 PP_URLComponents_Dev* components) { |
50 EnterInstance enter(instance); | 50 EnterInstance enter(instance); |
51 if (enter.failed()) | 51 if (enter.failed()) |
52 return PP_MakeUndefined(); | 52 return PP_MakeUndefined(); |
53 return enter.functions()->GetPluginInstanceURL(instance, components); | 53 return enter.functions()->GetPluginInstanceURL(instance, components); |
54 } | 54 } |
55 | 55 |
56 const PPB_URLUtil_Dev g_ppb_url_util = { | 56 const PPB_URLUtil_Dev g_ppb_url_util = { |
57 &PPB_URLUtil_Shared::Canonicalize, | 57 &URLUtilImpl::Canonicalize, |
58 &PPB_URLUtil_Shared::ResolveRelativeToURL, | 58 &URLUtilImpl::ResolveRelativeToURL, |
59 &ResolveRelativeToDocument, | 59 &ResolveRelativeToDocument, |
60 &PPB_URLUtil_Shared::IsSameSecurityOrigin, | 60 &URLUtilImpl::IsSameSecurityOrigin, |
61 &DocumentCanRequest, | 61 &DocumentCanRequest, |
62 &DocumentCanAccessDocument, | 62 &DocumentCanAccessDocument, |
63 &GetDocumentURL, | 63 &GetDocumentURL, |
64 &GetPluginInstanceURL | 64 &GetPluginInstanceURL |
65 }; | 65 }; |
66 | 66 |
67 } // namespace | 67 } // namespace |
68 | 68 |
69 const PPB_URLUtil_Dev* GetPPB_URLUtil_Dev_Thunk() { | 69 const PPB_URLUtil_Dev* GetPPB_URLUtil_Dev_Thunk() { |
70 return &g_ppb_url_util; | 70 return &g_ppb_url_util; |
71 } | 71 } |
72 | 72 |
73 } // namespace thunk | 73 } // namespace thunk |
74 } // namespace ppapi | 74 } // namespace ppapi |
OLD | NEW |