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

Side by Side Diff: Source/bindings/core/v8/WindowProxy.h

Issue 1327263002: Modifies WindowProxy::setSecurityToken so that the frame's SecurityOrigin is taken into account whe… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Update Created 5 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
OLDNEW
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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 // Update document object of the frame. 64 // Update document object of the frame.
65 void updateDocument(); 65 void updateDocument();
66 66
67 void namedItemAdded(HTMLDocument*, const AtomicString&); 67 void namedItemAdded(HTMLDocument*, const AtomicString&);
68 void namedItemRemoved(HTMLDocument*, const AtomicString&); 68 void namedItemRemoved(HTMLDocument*, const AtomicString&);
69 69
70 // Update the security origin of a document 70 // Update the security origin of a document
71 // (e.g., after setting docoument.domain). 71 // (e.g., after setting docoument.domain).
72 void updateSecurityOrigin(SecurityOrigin*); 72 void updateSecurityOrigin(SecurityOrigin*);
73 73
74 void setSecurityToken(SecurityOrigin*);
75
74 bool isContextInitialized() { return m_scriptState && !!m_scriptState->perCo ntextData(); } 76 bool isContextInitialized() { return m_scriptState && !!m_scriptState->perCo ntextData(); }
75 bool isGlobalInitialized() { return !m_global.isEmpty(); } 77 bool isGlobalInitialized() { return !m_global.isEmpty(); }
76 78
77 bool initializeIfNeeded(); 79 bool initializeIfNeeded();
78 void updateDocumentWrapper(v8::Local<v8::Object> wrapper); 80 void updateDocumentWrapper(v8::Local<v8::Object> wrapper);
79 81
80 void clearForNavigation(); 82 void clearForNavigation();
81 void clearForClose(); 83 void clearForClose();
82 84
83 void takeGlobalFrom(WindowProxy*); 85 void takeGlobalFrom(WindowProxy*);
84 86
85 DOMWrapperWorld& world() { return *m_world; } 87 DOMWrapperWorld& world() { return *m_world; }
86 88
87 private: 89 private:
88 WindowProxy(Frame*, PassRefPtr<DOMWrapperWorld>, v8::Isolate*); 90 WindowProxy(Frame*, PassRefPtr<DOMWrapperWorld>, v8::Isolate*);
89 bool initialize(); 91 bool initialize();
90 92
91 enum GlobalDetachmentBehavior { 93 enum GlobalDetachmentBehavior {
92 DoNotDetachGlobal, 94 DoNotDetachGlobal,
93 DetachGlobal 95 DetachGlobal
94 }; 96 };
95 void disposeContext(GlobalDetachmentBehavior); 97 void disposeContext(GlobalDetachmentBehavior);
96 98
97 void setSecurityToken(SecurityOrigin*);
98
99 // The JavaScript wrapper for the document object is cached on the global 99 // The JavaScript wrapper for the document object is cached on the global
100 // object for fast access. UpdateDocumentProperty sets the wrapper 100 // object for fast access. UpdateDocumentProperty sets the wrapper
101 // for the current document on the global object. 101 // for the current document on the global object.
102 void updateDocumentProperty(); 102 void updateDocumentProperty();
103 103
104 // Updates Activity Logger for the current context. 104 // Updates Activity Logger for the current context.
105 void updateActivityLogger(); 105 void updateActivityLogger();
106 106
107 void createContext(); 107 void createContext();
108 bool installDOMWindow(); 108 bool installDOMWindow();
109 109
110 RawPtrWillBeMember<Frame> m_frame; 110 RawPtrWillBeMember<Frame> m_frame;
111 v8::Isolate* m_isolate; 111 v8::Isolate* m_isolate;
112 RefPtr<ScriptState> m_scriptState; 112 RefPtr<ScriptState> m_scriptState;
113 RefPtr<DOMWrapperWorld> m_world; 113 RefPtr<DOMWrapperWorld> m_world;
114 ScopedPersistent<v8::Object> m_global; 114 ScopedPersistent<v8::Object> m_global;
115 ScopedPersistent<v8::Object> m_document; 115 ScopedPersistent<v8::Object> m_document;
116 }; 116 };
117 117
118 } // namespace blink 118 } // namespace blink
119 119
120 #endif // WindowProxy_h 120 #endif // WindowProxy_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698