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

Side by Side Diff: chrome/renderer/extensions/event_bindings.cc

Issue 9192029: Bindings layer for declarative events API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Continued Created 8 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/renderer/extensions/event_bindings.h" 5 #include "chrome/renderer/extensions/event_bindings.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 std::string event_name(*v8::String::AsciiValue(args[0])); 119 std::string event_name(*v8::String::AsciiValue(args[0]));
120 if (--listener_counts[event_name] == 0) { 120 if (--listener_counts[event_name] == 0) {
121 content::RenderThread::Get()->Send( 121 content::RenderThread::Get()->Send(
122 new ExtensionHostMsg_RemoveListener(context->extension_id(), 122 new ExtensionHostMsg_RemoveListener(context->extension_id(),
123 event_name)); 123 event_name));
124 } 124 }
125 } 125 }
126 126
127 return v8::Undefined(); 127 return v8::Undefined();
128 } 128 }
129
129 }; 130 };
130 131
131 } // namespace 132 } // namespace
132 133
133 v8::Extension* EventBindings::Get(ExtensionDispatcher* dispatcher) { 134 v8::Extension* EventBindings::Get(ExtensionDispatcher* dispatcher) {
134 static v8::Extension* extension = new ExtensionImpl(dispatcher); 135 static v8::Extension* extension = new ExtensionImpl(dispatcher);
135 return extension; 136 return extension;
136 } 137 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698