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

Side by Side Diff: trunk/src/chrome/renderer/extensions/webview_custom_bindings.cc

Issue 23965004: Revert 222090 "<webview>: Cleanup WebRequest event listeners whe..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 3 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
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/renderer/extensions/webview_custom_bindings.h"
6
7 #include <string>
8
9 #include "base/bind.h"
10 #include "v8/include/v8.h"
11
12 namespace extensions {
13
14 WebViewCustomBindings::WebViewCustomBindings(
15 Dispatcher* dispatcher, ChromeV8Context* context)
16 : ChromeV8Extension(dispatcher, context) {
17 RouteFunction("GetNextInstanceID",
18 base::Bind(&WebViewCustomBindings::GetNextInstanceID,
19 base::Unretained(this)));
20 }
21
22 void WebViewCustomBindings::GetNextInstanceID(
23 const v8::FunctionCallbackInfo<v8::Value>& args) {
24 static int next_instance_id = 1;
25 args.GetReturnValue().Set(next_instance_id++);
26 }
27
28 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698