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

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

Issue 1236473002: Fix virtual/override/final usage in Source/bindings/. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/bindings/core/v8/V8Initializer.cpp ('k') | Source/bindings/core/v8/V8MutationCallback.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 // V8LazyEventListener is a wrapper for a JavaScript code string that is compile d and evaluated when an event is fired. 44 // V8LazyEventListener is a wrapper for a JavaScript code string that is compile d and evaluated when an event is fired.
45 // A V8LazyEventListener is either a HTML or SVG event handler. 45 // A V8LazyEventListener is either a HTML or SVG event handler.
46 class V8LazyEventListener final : public V8AbstractEventListener { 46 class V8LazyEventListener final : public V8AbstractEventListener {
47 public: 47 public:
48 static PassRefPtr<V8LazyEventListener> create(const AtomicString& functionNa me, const AtomicString& eventParameterName, const String& code, const String& so urceURL, const TextPosition& position, Node* node, v8::Isolate* isolate) 48 static PassRefPtr<V8LazyEventListener> create(const AtomicString& functionNa me, const AtomicString& eventParameterName, const String& code, const String& so urceURL, const TextPosition& position, Node* node, v8::Isolate* isolate)
49 { 49 {
50 return adoptRef(new V8LazyEventListener(isolate, functionName, eventPara meterName, code, sourceURL, position, node)); 50 return adoptRef(new V8LazyEventListener(isolate, functionName, eventPara meterName, code, sourceURL, position, node));
51 } 51 }
52 52
53 protected: 53 protected:
54 virtual void prepareListenerObject(ExecutionContext*) override; 54 void prepareListenerObject(ExecutionContext*) override;
55 55
56 private: 56 private:
57 V8LazyEventListener(v8::Isolate*, const AtomicString& functionName, const At omicString& eventParameterName, const String& code, const String sourceURL, cons t TextPosition&, Node*); 57 V8LazyEventListener(v8::Isolate*, const AtomicString& functionName, const At omicString& eventParameterName, const String& code, const String sourceURL, cons t TextPosition&, Node*);
58 58
59 virtual v8::Local<v8::Value> callListenerFunction(ScriptState*, v8::Local<v8 ::Value>, Event*) override; 59 v8::Local<v8::Value> callListenerFunction(ScriptState*, v8::Local<v8::Value> , Event*) override;
60 60
61 // Needs to return true for all event handlers implemented in JavaScript so that 61 // Needs to return true for all event handlers implemented in JavaScript so that
62 // the SVG code does not add the event handler in both 62 // the SVG code does not add the event handler in both
63 // SVGUseElement::buildShadowTree and again in 63 // SVGUseElement::buildShadowTree and again in
64 // SVGUseElement::transferEventListenersToShadowTree 64 // SVGUseElement::transferEventListenersToShadowTree
65 virtual bool wasCreatedFromMarkup() const override { return true; } 65 bool wasCreatedFromMarkup() const override { return true; }
66 66
67 AtomicString m_functionName; 67 AtomicString m_functionName;
68 AtomicString m_eventParameterName; 68 AtomicString m_eventParameterName;
69 String m_code; 69 String m_code;
70 String m_sourceURL; 70 String m_sourceURL;
71 Node* m_node; 71 Node* m_node;
72 TextPosition m_position; 72 TextPosition m_position;
73 }; 73 };
74 74
75 } // namespace blink 75 } // namespace blink
76 76
77 #endif // V8LazyEventListener_h 77 #endif // V8LazyEventListener_h
OLDNEW
« no previous file with comments | « Source/bindings/core/v8/V8Initializer.cpp ('k') | Source/bindings/core/v8/V8MutationCallback.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698