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

Side by Side Diff: chrome/renderer/extensions/logging_native_handler.h

Issue 235943018: Move extensions bindings code out of //chrome (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit Created 6 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 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 #ifndef CHROME_RENDERER_EXTENSIONS_LOGGING_NATIVE_HANDLER_H_
6 #define CHROME_RENDERER_EXTENSIONS_LOGGING_NATIVE_HANDLER_H_
7
8 #include <string>
9
10 #include "extensions/renderer/object_backed_native_handler.h"
11
12 namespace extensions {
13 class ScriptContext;
14
15 // Exposes logging.h macros to JavaScript bindings.
16 class LoggingNativeHandler : public ObjectBackedNativeHandler {
17 public:
18 explicit LoggingNativeHandler(ScriptContext* context);
19 virtual ~LoggingNativeHandler();
20
21 // Equivalent to CHECK(predicate) << message.
22 //
23 // void(predicate, message?)
24 void Check(const v8::FunctionCallbackInfo<v8::Value>& args);
25
26 // Equivalent to DCHECK(predicate) << message.
27 //
28 // void(predicate, message?)
29 void Dcheck(const v8::FunctionCallbackInfo<v8::Value>& args);
30
31 // Equivalent to DCHECK_IS_ON.
32 //
33 // bool()
34 void DcheckIsOn(const v8::FunctionCallbackInfo<v8::Value>& args);
35
36 // Equivalent to LOG(INFO) << message.
37 //
38 // void(message)
39 void Log(const v8::FunctionCallbackInfo<v8::Value>& args);
40
41 // Equivalent to LOG(WARNING) << message.
42 //
43 // void(message)
44 void Warning(const v8::FunctionCallbackInfo<v8::Value>& args);
45
46 void ParseArgs(const v8::FunctionCallbackInfo<v8::Value>& args,
47 bool* check_value,
48 std::string* error_message);
49
50 std::string ToStringOrDefault(const v8::Handle<v8::String>& v8_string,
51 const std::string& dflt);
52 };
53
54 } // namespace extensions
55
56 #endif // CHROME_RENDERER_EXTENSIONS_LOGGING_NATIVE_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/renderer/extensions/id_generator_custom_bindings.cc ('k') | chrome/renderer/extensions/logging_native_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698