OLD | NEW |
1 # Copyright (C) 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> | 1 # Copyright (C) 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> |
2 # Copyright (C) 2006 Anders Carlsson <andersca@mac.com> | 2 # Copyright (C) 2006 Anders Carlsson <andersca@mac.com> |
3 # Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> | 3 # Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> |
4 # Copyright (C) 2006 Alexey Proskuryakov <ap@webkit.org> | 4 # Copyright (C) 2006 Alexey Proskuryakov <ap@webkit.org> |
5 # Copyright (C) 2006 Apple Computer, Inc. | 5 # Copyright (C) 2006 Apple Computer, Inc. |
6 # Copyright (C) 2007, 2008, 2009, 2012 Google Inc. | 6 # Copyright (C) 2007, 2008, 2009, 2012 Google Inc. |
7 # Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> | 7 # Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> |
8 # Copyright (C) Research In Motion Limited 2010. All rights reserved. | 8 # Copyright (C) Research In Motion Limited 2010. All rights reserved. |
9 # Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 9 # Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
10 # Copyright (C) 2012 Ericsson AB. All rights reserved. | 10 # Copyright (C) 2012 Ericsson AB. All rights reserved. |
(...skipping 4859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4870 | 4870 |
4871 my @includes = (); | 4871 my @includes = (); |
4872 push(@includes, "bindings/v8/ActiveDOMCallback.h"); | 4872 push(@includes, "bindings/v8/ActiveDOMCallback.h"); |
4873 push(@includes, "bindings/v8/DOMWrapperWorld.h"); | 4873 push(@includes, "bindings/v8/DOMWrapperWorld.h"); |
4874 push(@includes, "bindings/v8/ScopedPersistent.h"); | 4874 push(@includes, "bindings/v8/ScopedPersistent.h"); |
4875 push(@includes, HeaderFilesForInterface($interfaceName, $implClassName)); | 4875 push(@includes, HeaderFilesForInterface($interfaceName, $implClassName)); |
4876 for my $include (sort @includes) { | 4876 for my $include (sort @includes) { |
4877 $header{includes}->add("#include \"$include\"\n"); | 4877 $header{includes}->add("#include \"$include\"\n"); |
4878 } | 4878 } |
4879 $header{nameSpaceWebCore}->addHeader("\nclass ExecutionContext;\n"); | 4879 $header{nameSpaceWebCore}->addHeader("\nclass ExecutionContext;\n"); |
4880 $header{class}->addHeader("class $v8ClassName : public $implClassName, publi
c ActiveDOMCallback {"); | 4880 $header{class}->addHeader("class $v8ClassName FINAL : public $implClassName,
public ActiveDOMCallback {"); |
4881 $header{class}->addFooter("};\n"); | 4881 $header{class}->addFooter("};\n"); |
4882 | 4882 |
4883 $header{classPublic}->add(<<END); | 4883 $header{classPublic}->add(<<END); |
4884 static PassOwnPtr<${v8ClassName}> create(v8::Handle<v8::Function> callback,
ExecutionContext* context) | 4884 static PassOwnPtr<${v8ClassName}> create(v8::Handle<v8::Function> callback,
ExecutionContext* context) |
4885 { | 4885 { |
4886 ASSERT(context); | 4886 ASSERT(context); |
4887 return adoptPtr(new ${v8ClassName}(callback, context)); | 4887 return adoptPtr(new ${v8ClassName}(callback, context)); |
4888 } | 4888 } |
4889 | 4889 |
4890 virtual ~${v8ClassName}(); | 4890 virtual ~${v8ClassName}(); |
4891 | 4891 |
4892 END | 4892 END |
4893 | 4893 |
4894 # Functions | 4894 # Functions |
4895 my $numFunctions = @{$interface->functions}; | 4895 my $numFunctions = @{$interface->functions}; |
4896 if ($numFunctions > 0) { | 4896 if ($numFunctions > 0) { |
4897 foreach my $function (@{$interface->functions}) { | 4897 foreach my $function (@{$interface->functions}) { |
4898 my $code = " virtual " . GetNativeTypeForCallbacks($function->typ
e) . " " . $function->name . "("; | 4898 my $code = " virtual " . GetNativeTypeForCallbacks($function->typ
e) . " " . $function->name . "("; |
4899 | 4899 |
4900 my @args = (); | 4900 my @args = (); |
4901 if (ExtendedAttributeContains($function->extendedAttributes->{"CallW
ith"}, "ThisValue")) { | 4901 if (ExtendedAttributeContains($function->extendedAttributes->{"CallW
ith"}, "ThisValue")) { |
4902 push(@args, GetNativeType("any") . " thisValue"); | 4902 push(@args, GetNativeType("any") . " thisValue"); |
4903 } | 4903 } |
4904 my @params = @{$function->parameters}; | 4904 my @params = @{$function->parameters}; |
4905 foreach my $param (@params) { | 4905 foreach my $param (@params) { |
4906 push(@args, GetNativeTypeForCallbacks($param->type) . " " . $par
am->name); | 4906 push(@args, GetNativeTypeForCallbacks($param->type) . " " . $par
am->name); |
4907 } | 4907 } |
4908 $code .= join(", ", @args); | 4908 $code .= join(", ", @args); |
4909 $code .= ");\n"; | 4909 $code .= ") OVERRIDE;\n"; |
4910 $header{classPublic}->add($code); | 4910 $header{classPublic}->add($code); |
4911 } | 4911 } |
4912 } | 4912 } |
4913 | 4913 |
4914 $header{classPrivate}->add(<<END); | 4914 $header{classPrivate}->add(<<END); |
4915 ${v8ClassName}(v8::Handle<v8::Function>, ExecutionContext*); | 4915 ${v8ClassName}(v8::Handle<v8::Function>, ExecutionContext*); |
4916 | 4916 |
4917 ScopedPersistent<v8::Function> m_callback; | 4917 ScopedPersistent<v8::Function> m_callback; |
4918 RefPtr<DOMWrapperWorld> m_world; | 4918 RefPtr<DOMWrapperWorld> m_world; |
4919 END | 4919 END |
(...skipping 1471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6391 if ($parameter->type eq "SerializedScriptValue") { | 6391 if ($parameter->type eq "SerializedScriptValue") { |
6392 return 1; | 6392 return 1; |
6393 } elsif (IsIntegerType($parameter->type)) { | 6393 } elsif (IsIntegerType($parameter->type)) { |
6394 return 1; | 6394 return 1; |
6395 } | 6395 } |
6396 } | 6396 } |
6397 return 0; | 6397 return 0; |
6398 } | 6398 } |
6399 | 6399 |
6400 1; | 6400 1; |
OLD | NEW |