| Index: chrome/renderer/extensions/downloads_custom_bindings.cc
|
| diff --git a/chrome/renderer/extensions/downloads_custom_bindings.cc b/chrome/renderer/extensions/downloads_custom_bindings.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..abf123a0283bf640ec44b1d7d98899b15b1cedfd
|
| --- /dev/null
|
| +++ b/chrome/renderer/extensions/downloads_custom_bindings.cc
|
| @@ -0,0 +1,30 @@
|
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "chrome/renderer/extensions/downloads_custom_bindings.h"
|
| +
|
| +#include <string>
|
| +
|
| +#include "base/string_number_conversions.h"
|
| +#include "grit/renderer_resources.h"
|
| +#include "v8/include/v8.h"
|
| +
|
| +namespace extensions {
|
| +
|
| +DownloadsCustomBindings::DownloadsCustomBindings()
|
| + : ChromeV8Extension(NULL) {
|
| + RouteStaticFunction("GetFilenameDeterminerId", &GetFilenameDeterminerId);
|
| +}
|
| +
|
| +// Attach an event name to an object.
|
| +// static
|
| +v8::Handle<v8::Value> DownloadsCustomBindings::GetFilenameDeterminerId(
|
| + const v8::Arguments& args) {
|
| + static int next_event_id = 0;
|
| + DCHECK_EQ(args.Length(), 0);
|
| + return v8::Integer::New(++next_event_id);
|
| +}
|
| +
|
| +} // extensions
|
| +
|
|
|