#include "extensions/browser/api_activity_monitor.h"
#include "base/values.h"
#include "extensions/common/extension_id.h"
namespace extensions {
namespace activity_monitor {
namespace {
Monitor g_event_monitor = …;
Monitor g_function_monitor = …;
WebRequestMonitor g_web_request_monitor = …;
}
Monitor GetApiEventMonitor() { … }
Monitor GetApiFunctionMonitor() { … }
WebRequestMonitor GetWebRequestMonitor() { … }
void SetApiEventMonitor(Monitor event_monitor) { … }
void SetApiFunctionMonitor(Monitor function_monitor) { … }
void SetWebRequestMonitor(WebRequestMonitor web_request_monitor) { … }
void OnApiEventDispatched(content::BrowserContext* browser_context,
const ExtensionId& extension_id,
const std::string& event_name,
const base::Value::List& event_args) { … }
void OnApiFunctionCalled(content::BrowserContext* browser_context,
const ExtensionId& extension_id,
const std::string& api_name,
const base::Value::List& args) { … }
void OnWebRequestApiUsed(content::BrowserContext* browser_context,
const ExtensionId& extension_id,
const GURL& url,
bool is_incognito,
const std::string& api_call,
base::Value::Dict details) { … }
}
}