| OLD | NEW |
| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 v8::Local<v8::Object> prototypeForType(const WrapperTypeInfo*); | 88 v8::Local<v8::Object> prototypeForType(const WrapperTypeInfo*); |
| 89 | 89 |
| 90 // Gets the constructor and prototype for a type, if they have already been |
| 91 // created. Returns true if they exist, and sets the existing values in |
| 92 // |prototypeObject| and |interfaceObject|. Otherwise, returns false, and the |
| 93 // values are set to empty objects (non-null). |
| 94 bool getExistingConstructorAndPrototypeForType( |
| 95 const WrapperTypeInfo*, |
| 96 v8::Local<v8::Object>* prototypeObject, |
| 97 v8::Local<v8::Function>* interfaceObject); |
| 98 |
| 90 void addCustomElementBinding(std::unique_ptr<V0CustomElementBinding>); | 99 void addCustomElementBinding(std::unique_ptr<V0CustomElementBinding>); |
| 91 | 100 |
| 92 V8DOMActivityLogger* activityLogger() const { return m_activityLogger; } | 101 V8DOMActivityLogger* activityLogger() const { return m_activityLogger; } |
| 93 void setActivityLogger(V8DOMActivityLogger* activityLogger) { | 102 void setActivityLogger(V8DOMActivityLogger* activityLogger) { |
| 94 m_activityLogger = activityLogger; | 103 m_activityLogger = activityLogger; |
| 95 } | 104 } |
| 96 | 105 |
| 97 Modulator* modulator() const { return m_modulator.get(); } | 106 Modulator* modulator() const { return m_modulator.get(); } |
| 98 void setModulator(Modulator*); | 107 void setModulator(Modulator*); |
| 99 void clearModulator(); | 108 void clearModulator(); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 127 | 136 |
| 128 // This is owned by a static hash map in V8DOMActivityLogger. | 137 // This is owned by a static hash map in V8DOMActivityLogger. |
| 129 V8DOMActivityLogger* m_activityLogger; | 138 V8DOMActivityLogger* m_activityLogger; |
| 130 | 139 |
| 131 Persistent<Modulator> m_modulator; | 140 Persistent<Modulator> m_modulator; |
| 132 }; | 141 }; |
| 133 | 142 |
| 134 } // namespace blink | 143 } // namespace blink |
| 135 | 144 |
| 136 #endif // V8PerContextData_h | 145 #endif // V8PerContextData_h |
| OLD | NEW |