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

Side by Side Diff: Source/bindings/v8/custom/V8HTMLImageElementConstructor.cpp

Issue 40433002: Make wrapperTypeInfo static member const in bindings classes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 7 years, 2 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, 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2009, 2010 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 25 matching lines...) Expand all
36 #include "V8HTMLImageElement.h" 36 #include "V8HTMLImageElement.h"
37 #include "bindings/v8/BindingSecurity.h" 37 #include "bindings/v8/BindingSecurity.h"
38 #include "bindings/v8/V8Binding.h" 38 #include "bindings/v8/V8Binding.h"
39 #include "bindings/v8/V8ObjectConstructor.h" 39 #include "bindings/v8/V8ObjectConstructor.h"
40 #include "core/dom/Document.h" 40 #include "core/dom/Document.h"
41 #include "core/html/HTMLImageElement.h" 41 #include "core/html/HTMLImageElement.h"
42 #include "wtf/RefPtr.h" 42 #include "wtf/RefPtr.h"
43 43
44 namespace WebCore { 44 namespace WebCore {
45 45
46 WrapperTypeInfo V8HTMLImageElementConstructor::wrapperTypeInfo = { V8HTMLImageEl ementConstructor::GetTemplate, V8HTMLImageElement::derefObject, 0, V8HTMLImageEl ement::toEventTarget, 0, V8HTMLImageElement::installPerContextEnabledPrototypePr operties, 0, WrapperTypeObjectPrototype }; 46 const WrapperTypeInfo V8HTMLImageElementConstructor::wrapperTypeInfo = { V8HTMLI mageElementConstructor::GetTemplate, V8HTMLImageElement::derefObject, 0, V8HTMLI mageElement::toEventTarget, 0, V8HTMLImageElement::installPerContextEnabledProto typeProperties, 0, WrapperTypeObjectPrototype };
47 47
48 static void v8HTMLImageElementConstructorMethodCustom(const v8::FunctionCallback Info<v8::Value>& args) 48 static void v8HTMLImageElementConstructorMethodCustom(const v8::FunctionCallback Info<v8::Value>& args)
49 { 49 {
50 if (!args.IsConstructCall()) { 50 if (!args.IsConstructCall()) {
51 throwTypeError("DOM object constructor cannot be called as a function.", args.GetIsolate()); 51 throwTypeError("DOM object constructor cannot be called as a function.", args.GetIsolate());
52 return; 52 return;
53 } 53 }
54 54
55 if (ConstructorMode::current() == ConstructorMode::WrapExistingObject) { 55 if (ConstructorMode::current() == ConstructorMode::WrapExistingObject) {
56 v8SetReturnValue(args, args.Holder()); 56 v8SetReturnValue(args, args.Holder());
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 v8::Local<v8::ObjectTemplate> instance = result->InstanceTemplate(); 101 v8::Local<v8::ObjectTemplate> instance = result->InstanceTemplate();
102 instance->SetInternalFieldCount(V8HTMLImageElement::internalFieldCount); 102 instance->SetInternalFieldCount(V8HTMLImageElement::internalFieldCount);
103 result->SetClassName(v8::String::NewSymbol("HTMLImageElement")); 103 result->SetClassName(v8::String::NewSymbol("HTMLImageElement"));
104 result->Inherit(V8HTMLImageElement::GetTemplate(isolate, currentWorldType)); 104 result->Inherit(V8HTMLImageElement::GetTemplate(isolate, currentWorldType));
105 105
106 data->setPrivateTemplate(currentWorldType, &privateTemplateUniqueKey, result ); 106 data->setPrivateTemplate(currentWorldType, &privateTemplateUniqueKey, result );
107 return scope.Close(result); 107 return scope.Close(result);
108 } 108 }
109 109
110 } // namespace WebCore 110 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/custom/V8HTMLImageElementConstructor.h ('k') | Source/bindings/v8/custom/V8TypedArrayCustom.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698