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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/V8PerContextData.h

Issue 2640823004: Allow origin trials to be enabled by script (Closed)
Patch Set: Rebase Created 3 years, 10 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 return !boilerplate.IsEmpty() ? boilerplate->Clone() 78 return !boilerplate.IsEmpty() ? boilerplate->Clone()
79 : createWrapperFromCacheSlowCase(type); 79 : createWrapperFromCacheSlowCase(type);
80 } 80 }
81 81
82 v8::Local<v8::Function> constructorForType(const WrapperTypeInfo* type) { 82 v8::Local<v8::Function> constructorForType(const WrapperTypeInfo* type) {
83 v8::Local<v8::Function> interfaceObject = m_constructorMap.Get(type); 83 v8::Local<v8::Function> interfaceObject = m_constructorMap.Get(type);
84 return (!interfaceObject.IsEmpty()) ? interfaceObject 84 return (!interfaceObject.IsEmpty()) ? interfaceObject
85 : constructorForTypeSlowCase(type); 85 : constructorForTypeSlowCase(type);
86 } 86 }
87 87
88 // Retrieve the constructor for a type, but only if it already exists (avoids
89 // triggering initialization, as in constructorForType). If the constructor is
90 // not found, the return value is non-null, but empty (IsEmpty()).
91 v8::Local<v8::Function> constructorForTypeFromCache(
92 const WrapperTypeInfo* type) {
93 return m_constructorMap.Get(type);
94 }
95
88 v8::Local<v8::Object> prototypeForType(const WrapperTypeInfo*); 96 v8::Local<v8::Object> prototypeForType(const WrapperTypeInfo*);
89 97
90 void addCustomElementBinding(std::unique_ptr<V0CustomElementBinding>); 98 void addCustomElementBinding(std::unique_ptr<V0CustomElementBinding>);
91 99
92 V8DOMActivityLogger* activityLogger() const { return m_activityLogger; } 100 V8DOMActivityLogger* activityLogger() const { return m_activityLogger; }
93 void setActivityLogger(V8DOMActivityLogger* activityLogger) { 101 void setActivityLogger(V8DOMActivityLogger* activityLogger) {
94 m_activityLogger = activityLogger; 102 m_activityLogger = activityLogger;
95 } 103 }
96 104
97 Modulator* modulator() const { return m_modulator.get(); } 105 Modulator* modulator() const { return m_modulator.get(); }
(...skipping 29 matching lines...) Expand all
127 135
128 // This is owned by a static hash map in V8DOMActivityLogger. 136 // This is owned by a static hash map in V8DOMActivityLogger.
129 V8DOMActivityLogger* m_activityLogger; 137 V8DOMActivityLogger* m_activityLogger;
130 138
131 Persistent<Modulator> m_modulator; 139 Persistent<Modulator> m_modulator;
132 }; 140 };
133 141
134 } // namespace blink 142 } // namespace blink
135 143
136 #endif // V8PerContextData_h 144 #endif // V8PerContextData_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698