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

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

Issue 1118673002: Implement ReadableStream as a V8 extra (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Cleanups; make controller a member instead of arg Created 5 years, 7 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 | « no previous file | 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 public: 90 public:
91 virtual ~Observer() { } 91 virtual ~Observer() { }
92 virtual void willDisposeScriptState(ScriptState*) = 0; 92 virtual void willDisposeScriptState(ScriptState*) = 0;
93 }; 93 };
94 void addObserver(Observer*); 94 void addObserver(Observer*);
95 void removeObserver(Observer*); 95 void removeObserver(Observer*);
96 96
97 bool evalEnabled() const; 97 bool evalEnabled() const;
98 void setEvalEnabled(bool); 98 void setEvalEnabled(bool);
99 ScriptValue getFromGlobalObject(const char* name); 99 ScriptValue getFromGlobalObject(const char* name);
100 ScriptValue getFromExtrasExports(const char* name);
100 101
101 protected: 102 protected:
102 ScriptState(v8::Local<v8::Context>, PassRefPtr<DOMWrapperWorld>); 103 ScriptState(v8::Local<v8::Context>, PassRefPtr<DOMWrapperWorld>);
103 104
104 private: 105 private:
105 v8::Isolate* m_isolate; 106 v8::Isolate* m_isolate;
106 // This persistent handle is weak. 107 // This persistent handle is weak.
107 ScopedPersistent<v8::Context> m_context; 108 ScopedPersistent<v8::Context> m_context;
108 109
109 // This RefPtr doesn't cause a cycle because all persistent handles that DOM WrapperWorld holds are weak. 110 // 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
142 } 143 }
143 144
144 private: 145 private:
145 RefPtr<ScriptState> m_scriptState; 146 RefPtr<ScriptState> m_scriptState;
146 ScopedPersistent<v8::Context> m_context; 147 ScopedPersistent<v8::Context> m_context;
147 }; 148 };
148 149
149 } 150 }
150 151
151 #endif // ScriptState_h 152 #endif // ScriptState_h
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/core/v8/ScriptState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698