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

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

Issue 11574006: Implement chrome.downloads.onDeterminingFilename() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: @r176065 Created 7 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
(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/downloads_custom_bindings.h"
6
7 #include <string>
8
9 #include "base/string_number_conversions.h"
10 #include "grit/renderer_resources.h"
11 #include "v8/include/v8.h"
12
13 namespace extensions {
14
15 DownloadsCustomBindings::DownloadsCustomBindings()
16 : ChromeV8Extension(NULL) {
17 RouteStaticFunction("GetFilenameDeterminerId", &GetFilenameDeterminerId);
18 }
19
20 // Attach an event name to an object.
21 // static
22 v8::Handle<v8::Value> DownloadsCustomBindings::GetFilenameDeterminerId(
23 const v8::Arguments& args) {
24 static int next_event_id = 0;
25 DCHECK(args.Length() == 0);
vabr (Chromium) 2013/01/11 12:43:40 Lint says: "Consider using DCHECK_EQ instead of DC
benjhayden 2013/01/11 21:21:27 Done.
26 return v8::String::New(base::IntToString(++next_event_id).c_str());
27 }
28
29 } // extensions
30
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698