Chromium Code Reviews| OLD | NEW |
|---|---|
| (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++); | |
|
asargent_no_longer_on_chrome
2012/04/26 21:21:45
I notice this is essentially the same as the socke
| |
| 15 } | |
| 16 | |
| 17 } // namespace | |
| 18 | |
| 19 namespace extensions { | |
| 20 | |
| 21 ExperimentalUsbCustomBindings::ExperimentalUsbCustomBindings() | |
| 22 : ChromeV8Extension(NULL) { | |
| 23 RouteStaticFunction("GetNextUsbEventId", &GetNextUsbEventId); | |
| 24 } | |
| 25 | |
| 26 } // namespace extensions | |
| OLD | NEW |