Reland the ULONG -> SIZE_T change from 317177
[chromium-blink-merge.git] / extensions / browser / api_activity_monitor.h
blobb8f0cc32c401143b11a97b50aa3e6264b94005b6
1 // Copyright 2014 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.
5 #ifndef EXTENSIONS_BROWSER_API_ACTIVITY_MONITOR_H_
6 #define EXTENSIONS_BROWSER_API_ACTIVITY_MONITOR_H_
8 #include <string>
10 #include "base/memory/scoped_ptr.h"
12 namespace base {
13 class ListValue;
16 namespace extensions {
18 // ApiActivityMonitor is used to monitor extension API event dispatch and API
19 // function calls. An embedder can use this interface to log low-level extension
20 // activity.
21 class ApiActivityMonitor {
22 public:
23 // Called when an API event is dispatched to an extension.
24 virtual void OnApiEventDispatched(const std::string& extension_id,
25 const std::string& event_name,
26 scoped_ptr<base::ListValue> event_args) = 0;
28 // Called when an extension calls an API function.
29 virtual void OnApiFunctionCalled(const std::string& extension_id,
30 const std::string& api_name,
31 scoped_ptr<base::ListValue> args) = 0;
33 protected:
34 virtual ~ApiActivityMonitor() {}
37 } // namespace extensions
39 #endif // EXTENSIONS_BROWSER_API_ACTIVITY_MONITOR_H_