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

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

Issue 1167343002: Add methods for creating V8 extras-based ReadableStreams from C++ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: That todo is not necessary according to yhirano@ Created 5 years, 5 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
« no previous file with comments | « LayoutTests/streams/streams-gc.html ('k') | Source/bindings/core/v8/ScriptState.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef ScriptState_h 5 #ifndef ScriptState_h
6 #define ScriptState_h 6 #define ScriptState_h
7 7
8 #include "bindings/core/v8/ScopedPersistent.h" 8 #include "bindings/core/v8/ScopedPersistent.h"
9 #include "bindings/core/v8/V8PerContextData.h" 9 #include "bindings/core/v8/V8PerContextData.h"
10 #include "core/CoreExport.h" 10 #include "core/CoreExport.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 public: 105 public:
106 virtual ~Observer() { } 106 virtual ~Observer() { }
107 virtual void willDisposeScriptState(ScriptState*) = 0; 107 virtual void willDisposeScriptState(ScriptState*) = 0;
108 }; 108 };
109 void addObserver(Observer*); 109 void addObserver(Observer*);
110 void removeObserver(Observer*); 110 void removeObserver(Observer*);
111 111
112 bool evalEnabled() const; 112 bool evalEnabled() const;
113 void setEvalEnabled(bool); 113 void setEvalEnabled(bool);
114 ScriptValue getFromGlobalObject(const char* name); 114 ScriptValue getFromGlobalObject(const char* name);
115 ScriptValue getFromExtrasExports(const char* name);
115 116
116 protected: 117 protected:
117 ScriptState(v8::Local<v8::Context>, PassRefPtr<DOMWrapperWorld>); 118 ScriptState(v8::Local<v8::Context>, PassRefPtr<DOMWrapperWorld>);
118 119
119 private: 120 private:
120 v8::Isolate* m_isolate; 121 v8::Isolate* m_isolate;
121 // This persistent handle is weak. 122 // This persistent handle is weak.
122 ScopedPersistent<v8::Context> m_context; 123 ScopedPersistent<v8::Context> m_context;
123 124
124 // This RefPtr doesn't cause a cycle because all persistent handles that DOM WrapperWorld holds are weak. 125 // This RefPtr doesn't cause a cycle because all persistent handles that DOM WrapperWorld holds are weak.
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 } 158 }
158 159
159 private: 160 private:
160 RefPtr<ScriptState> m_scriptState; 161 RefPtr<ScriptState> m_scriptState;
161 ScopedPersistent<v8::Context> m_context; 162 ScopedPersistent<v8::Context> m_context;
162 }; 163 };
163 164
164 } 165 }
165 166
166 #endif // ScriptState_h 167 #endif // ScriptState_h
OLDNEW
« no previous file with comments | « LayoutTests/streams/streams-gc.html ('k') | Source/bindings/core/v8/ScriptState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698