#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "extensions/renderer/dom_activity_logger.h"
#include <memory>
#include <utility>
#include "content/public/renderer/render_frame.h"
#include "content/public/renderer/v8_value_converter.h"
#include "extensions/common/dom_action_types.h"
#include "extensions/common/extension_id.h"
#include "extensions/renderer/activity_log_converter_strategy.h"
#include "extensions/renderer/extension_frame_helper.h"
#include "extensions/renderer/script_context.h"
#include "extensions/renderer/script_context_set.h"
#include "ipc/ipc_sync_channel.h"
#include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/public/platform/web_url.h"
#include "v8/include/v8-isolate.h"
WebString;
WebURL;
namespace extensions {
namespace {
void AppendV8Value(v8::Isolate* isolate,
const std::string& api_name,
const v8::Local<v8::Value>& v8_value,
base::Value::List& list) { … }
}
DOMActivityLogger::DOMActivityLogger(const ExtensionId& extension_id)
: … { … }
DOMActivityLogger::~DOMActivityLogger() = default;
void DOMActivityLogger::AttachToWorld(int32_t world_id,
const ExtensionId& extension_id) { … }
void DOMActivityLogger::LogGetter(v8::Isolate* isolate,
v8::Local<v8::Context> context,
const WebString& api_name,
const WebURL& url,
const WebString& title) { … }
void DOMActivityLogger::LogSetter(v8::Isolate* isolate,
v8::Local<v8::Context> context,
const WebString& api_name,
const v8::Local<v8::Value>& new_value,
const WebURL& url,
const WebString& title) { … }
void DOMActivityLogger::LogMethod(v8::Isolate* isolate,
v8::Local<v8::Context> context,
const WebString& api_name,
int argc,
const v8::Local<v8::Value>* argv,
const WebURL& url,
const WebString& title) { … }
void DOMActivityLogger::LogEvent(blink::WebLocalFrame& frame,
const WebString& event_name,
int argc,
const WebString* argv,
const WebURL& url,
const WebString& title) { … }
mojom::RendererHost* DOMActivityLogger::GetRendererHost(
v8::Local<v8::Context> context) { … }
}