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

Side by Side Diff: Source/core/dom/StringCallback.cpp

Issue 137943002: Update more core classes to use OVERRIDE / FINAL when needed (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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/core/dom/Node.h ('k') | Source/core/editing/EditingStyle.cpp » ('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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 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 21 matching lines...) Expand all
32 #include "core/dom/StringCallback.h" 32 #include "core/dom/StringCallback.h"
33 33
34 #include "core/dom/ExecutionContext.h" 34 #include "core/dom/ExecutionContext.h"
35 #include "core/dom/ExecutionContextTask.h" 35 #include "core/dom/ExecutionContextTask.h"
36 #include "wtf/text/WTFString.h" 36 #include "wtf/text/WTFString.h"
37 37
38 namespace WebCore { 38 namespace WebCore {
39 39
40 namespace { 40 namespace {
41 41
42 class DispatchCallbackTask : public ExecutionContextTask { 42 class DispatchCallbackTask FINAL : public ExecutionContextTask {
43 public: 43 public:
44 static PassOwnPtr<DispatchCallbackTask> create(PassOwnPtr<StringCallback> ca llback, const String& data) 44 static PassOwnPtr<DispatchCallbackTask> create(PassOwnPtr<StringCallback> ca llback, const String& data)
45 { 45 {
46 return adoptPtr(new DispatchCallbackTask(callback, data)); 46 return adoptPtr(new DispatchCallbackTask(callback, data));
47 } 47 }
48 48
49 virtual void performTask(ExecutionContext*) 49 virtual void performTask(ExecutionContext*) OVERRIDE
50 { 50 {
51 m_callback->handleEvent(m_data); 51 m_callback->handleEvent(m_data);
52 } 52 }
53 53
54 private: 54 private:
55 DispatchCallbackTask(PassOwnPtr<StringCallback> callback, const String& data ) 55 DispatchCallbackTask(PassOwnPtr<StringCallback> callback, const String& data )
56 : m_callback(callback) 56 : m_callback(callback)
57 , m_data(data) 57 , m_data(data)
58 { 58 {
59 } 59 }
60 60
61 OwnPtr<StringCallback> m_callback; 61 OwnPtr<StringCallback> m_callback;
62 const String m_data; 62 const String m_data;
63 }; 63 };
64 64
65 } // namespace 65 } // namespace
66 66
67 void StringCallback::scheduleCallback(PassOwnPtr<StringCallback> callback, Execu tionContext* context, const String& data) 67 void StringCallback::scheduleCallback(PassOwnPtr<StringCallback> callback, Execu tionContext* context, const String& data)
68 { 68 {
69 context->postTask(DispatchCallbackTask::create(callback, data)); 69 context->postTask(DispatchCallbackTask::create(callback, data));
70 } 70 }
71 71
72 } // namespace WebCore 72 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/dom/Node.h ('k') | Source/core/editing/EditingStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698