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

Side by Side Diff: chrome/renderer/extensions/experimental.usb_custom_bindings.cc

Issue 10224009: Experimental USB API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 (c) 2012 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/experimental.usb_custom_bindings.h"
6
7 #include "base/logging.h"
8 #include "v8/include/v8.h"
9
10 namespace {
11
12 v8::Handle<v8::Value> GetNextUsbEventId(const v8::Arguments &arguments) {
13 static int next_event_id = 1;
14 return v8::Integer::New(next_event_id++);
15 }
16
17 } // namespace
18
19 namespace extensions {
20
21 ExperimentalUsbCustomBindings::ExperimentalUsbCustomBindings()
22 : ChromeV8Extension(NULL) {
23 RouteStaticFunction("GetNextUsbEventId", &GetNextUsbEventId);
24 }
25
26 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698