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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 | 61 |
62 static DOMWrapperWorld* isolatedWorld(v8::Handle<v8::Context> context) | 62 static DOMWrapperWorld* isolatedWorld(v8::Handle<v8::Context> context) |
63 { | 63 { |
64 ASSERT(contextHasCorrectPrototype(context)); | 64 ASSERT(contextHasCorrectPrototype(context)); |
65 return static_cast<DOMWrapperWorld*>(context->GetAlignedPointerFromEmbed
derData(v8ContextIsolatedWorld)); | 65 return static_cast<DOMWrapperWorld*>(context->GetAlignedPointerFromEmbed
derData(v8ContextIsolatedWorld)); |
66 } | 66 } |
67 | 67 |
68 // Will return null if there is no DOMWrapperWorld for the current v8::Conte
xt | 68 // Will return null if there is no DOMWrapperWorld for the current v8::Conte
xt |
69 static DOMWrapperWorld* current(); | 69 static DOMWrapperWorld* current(); |
70 | 70 |
| 71 static void setIsolatedWorldHumanReadableName(int worldID, const String&); |
| 72 String isolatedWorldHumanReadableName(); |
| 73 |
71 // Associates an isolated world (see above for description) with a security | 74 // Associates an isolated world (see above for description) with a security |
72 // origin. XMLHttpRequest instances used in that world will be considered | 75 // origin. XMLHttpRequest instances used in that world will be considered |
73 // to come from that origin, not the frame's. | 76 // to come from that origin, not the frame's. |
74 static void setIsolatedWorldSecurityOrigin(int worldID, PassRefPtr<SecurityO
rigin>); | 77 static void setIsolatedWorldSecurityOrigin(int worldID, PassRefPtr<SecurityO
rigin>); |
75 static void clearIsolatedWorldSecurityOrigin(int worldID); | 78 static void clearIsolatedWorldSecurityOrigin(int worldID); |
76 SecurityOrigin* isolatedWorldSecurityOrigin(); | 79 SecurityOrigin* isolatedWorldSecurityOrigin(); |
77 | 80 |
78 // Associated an isolated world with a Content Security Policy. Resources | 81 // Associated an isolated world with a Content Security Policy. Resources |
79 // embedded into the main world's DOM from script executed in an isolated | 82 // embedded into the main world's DOM from script executed in an isolated |
80 // world should be restricted based on the isolated world's DOM, not the | 83 // world should be restricted based on the isolated world's DOM, not the |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 | 125 |
123 DOMWrapperWorld* mainThreadNormalWorld(); | 126 DOMWrapperWorld* mainThreadNormalWorld(); |
124 | 127 |
125 // FIXME: this is a workaround for a problem in ScriptController | 128 // FIXME: this is a workaround for a problem in ScriptController |
126 // Do not use this anywhere else!! | 129 // Do not use this anywhere else!! |
127 DOMWrapperWorld* existingWindowShellWorkaroundWorld(); | 130 DOMWrapperWorld* existingWindowShellWorkaroundWorld(); |
128 | 131 |
129 } // namespace WebCore | 132 } // namespace WebCore |
130 | 133 |
131 #endif // DOMWrapperWorld_h | 134 #endif // DOMWrapperWorld_h |
OLD | NEW |