OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_RENDERER_EXTENSIONS_API_ACTIVITY_LOGGER_H_ |
| 6 #define CHROME_RENDERER_EXTENSIONS_API_ACTIVITY_LOGGER_H_ |
| 7 |
| 8 #include <string> |
| 9 #include "chrome/renderer/extensions/chrome_v8_extension.h" |
| 10 #include "v8/include/v8.h" |
| 11 |
| 12 namespace extensions { |
| 13 |
| 14 // Used to log extension API calls that are implemented with custom bindings. |
| 15 // The events are sent via IPC to extensions::ActivityLog for recording and |
| 16 // display. |
| 17 class APIActivityLogger : public ChromeV8Extension { |
| 18 public: |
| 19 APIActivityLogger(); |
| 20 |
| 21 // This is ultimately invoked in schema_generated_bindings.js with |
| 22 // JavaScript arguments... |
| 23 // arg0 - extension ID as a string |
| 24 // arg1 - API call name as a string |
| 25 // arg2 - arguments to the API call |
| 26 // arg3 - any extra logging info as a string (optional) |
| 27 static v8::Handle<v8::Value> LogActivity(const v8::Arguments & args); |
| 28 |
| 29 private: |
| 30 DISALLOW_COPY_AND_ASSIGN(APIActivityLogger); |
| 31 }; |
| 32 |
| 33 } // namespace extensions |
| 34 |
| 35 #endif // CHROME_RENDERER_EXTENSIONS_API_ACTIVITY_LOGGER_H_ |
| 36 |
OLD | NEW |