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

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

Issue 16032015: Extensions: pass ChromeV8Context around instead of v8::Handle. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 6 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
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_RENDERER_EXTENSIONS_API_ACTIVITY_LOGGER_H_ 5 #ifndef CHROME_RENDERER_EXTENSIONS_API_ACTIVITY_LOGGER_H_
6 #define CHROME_RENDERER_EXTENSIONS_API_ACTIVITY_LOGGER_H_ 6 #define CHROME_RENDERER_EXTENSIONS_API_ACTIVITY_LOGGER_H_
7 7
8 #include <string> 8 #include <string>
9 #include "chrome/renderer/extensions/chrome_v8_extension.h" 9 #include "chrome/renderer/extensions/chrome_v8_extension.h"
10 #include "chrome/renderer/extensions/dispatcher.h" 10 #include "chrome/renderer/extensions/dispatcher.h"
11 #include "v8/include/v8.h" 11 #include "v8/include/v8.h"
12 12
13 namespace extensions { 13 namespace extensions {
14 14
15 // Used to log extension API calls and events that are implemented with custom 15 // Used to log extension API calls and events that are implemented with custom
16 // bindings.The actions are sent via IPC to extensions::ActivityLog for 16 // bindings.The actions are sent via IPC to extensions::ActivityLog for
17 // recording and display. 17 // recording and display.
18 class APIActivityLogger : public ChromeV8Extension { 18 class APIActivityLogger : public ChromeV8Extension {
19 public: 19 public:
20 APIActivityLogger(Dispatcher* dispatcher, v8::Handle<v8::Context> v8_context); 20 APIActivityLogger(Dispatcher* dispatcher, ChromeV8Context* v8_context);
not at google - send to devlin 2013/05/29 15:55:13 Yes - I would have much preferred to be calling th
marja 2013/05/29 16:56:33 Done.
21 21
22 // This is ultimately invoked in schema_generated_bindings.js with 22 // This is ultimately invoked in schema_generated_bindings.js with
23 // JavaScript arguments. Logged as an APIAction. 23 // JavaScript arguments. Logged as an APIAction.
24 // arg0 - extension ID as a string 24 // arg0 - extension ID as a string
25 // arg1 - API call name as a string 25 // arg1 - API call name as a string
26 // arg2 - arguments to the API call 26 // arg2 - arguments to the API call
27 // arg3 - any extra logging info as a string (optional) 27 // arg3 - any extra logging info as a string (optional)
28 static v8::Handle<v8::Value> LogAPICall(const v8::Arguments& args); 28 static v8::Handle<v8::Value> LogAPICall(const v8::Arguments& args);
29 29
30 // This is ultimately invoked in schema_generated_bindings.js with 30 // This is ultimately invoked in schema_generated_bindings.js with
(...skipping 19 matching lines...) Expand all
50 // how they are ultimately dispatched to the log. 50 // how they are ultimately dispatched to the log.
51 static void LogInternal(const CallType call_type, 51 static void LogInternal(const CallType call_type,
52 const v8::Arguments& args); 52 const v8::Arguments& args);
53 53
54 DISALLOW_COPY_AND_ASSIGN(APIActivityLogger); 54 DISALLOW_COPY_AND_ASSIGN(APIActivityLogger);
55 }; 55 };
56 56
57 } // namespace extensions 57 } // namespace extensions
58 58
59 #endif // CHROME_RENDERER_EXTENSIONS_API_ACTIVITY_LOGGER_H_ 59 #endif // CHROME_RENDERER_EXTENSIONS_API_ACTIVITY_LOGGER_H_
60
OLDNEW
« no previous file with comments | « no previous file | chrome/renderer/extensions/api_activity_logger.cc » ('j') | chrome/renderer/extensions/app_bindings.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698