Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(231)

Side by Side Diff: ppapi/thunk/ppb_url_util_thunk.cc

Issue 23444004: Add GetPluginRefererURL to PPB_URLUtil_Dev interface to get the 'Referer' HTTP header value that wa… (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ppb_url_util_shared.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
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 } 46 }
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 PP_Var GetPluginRefererURL(PP_Instance instance,
57 PP_URLComponents_Dev* components) {
58 EnterInstance enter(instance);
59 if (enter.failed())
60 return PP_MakeUndefined();
61 return enter.functions()->GetPluginRefererURL(instance, components);
62 }
63
56 const PPB_URLUtil_Dev g_ppb_url_util = { 64 const PPB_URLUtil_Dev g_ppb_url_util = {
57 &PPB_URLUtil_Shared::Canonicalize, 65 &PPB_URLUtil_Shared::Canonicalize,
58 &PPB_URLUtil_Shared::ResolveRelativeToURL, 66 &PPB_URLUtil_Shared::ResolveRelativeToURL,
59 &ResolveRelativeToDocument, 67 &ResolveRelativeToDocument,
60 &PPB_URLUtil_Shared::IsSameSecurityOrigin, 68 &PPB_URLUtil_Shared::IsSameSecurityOrigin,
61 &DocumentCanRequest, 69 &DocumentCanRequest,
62 &DocumentCanAccessDocument, 70 &DocumentCanAccessDocument,
63 &GetDocumentURL, 71 &GetDocumentURL,
64 &GetPluginInstanceURL 72 &GetPluginInstanceURL,
73 &GetPluginRefererURL
65 }; 74 };
66 75
67 } // namespace 76 } // namespace
68 77
69 const PPB_URLUtil_Dev_0_6* GetPPB_URLUtil_Dev_0_6_Thunk() { 78 const PPB_URLUtil_Dev_0_6* GetPPB_URLUtil_Dev_0_6_Thunk() {
70 return &g_ppb_url_util; 79 return &g_ppb_url_util;
71 } 80 }
72 81
73 } // namespace thunk 82 } // namespace thunk
74 } // namespace ppapi 83 } // namespace ppapi
OLDNEW
« ppapi/api/dev/ppb_url_util_dev.idl ('K') | « ppapi/thunk/ppb_instance_api.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698