#include "chrome/browser/devtools/devtools_embedder_message_dispatcher.h"
#include <memory>
#include "base/functional/bind.h"
#include "base/values.h"
#include "chrome/browser/browser_features.h"
#include "chrome/browser/devtools/devtools_settings.h"
#include "chrome/browser/devtools/visual_logging.h"
namespace {
DispatchCallback;
bool GetValue(const base::Value& value, std::string* result) { … }
bool GetValue(const base::Value& value, int* result) { … }
bool GetValue(const base::Value& value, double* result) { … }
bool GetValue(const base::Value& value, bool* result) { … }
bool GetValue(const base::Value& value, gfx::Rect* rect) { … }
bool GetValue(const base::Value& value, RegisterOptions* options) { … }
bool GetValue(const base::Value& value, ImpressionEvent* event) { … }
bool GetValue(const base::Value& value, ResizeEvent* event) { … }
bool GetValue(const base::Value& value, ClickEvent* event) { … }
bool GetValue(const base::Value& value, HoverEvent* event) { … }
bool GetValue(const base::Value& value, DragEvent* event) { … }
bool GetValue(const base::Value& value, ChangeEvent* event) { … }
bool GetValue(const base::Value& value, KeyDownEvent* event) { … }
template <typename T>
struct StorageTraits { … };
StorageTraits<const T &>;
template <typename... Ts>
struct ParamTuple { … };
ParamTuple<T, Ts...>;
template <typename... As>
bool ParseAndHandle(const base::RepeatingCallback<void(As...)>& handler,
const std::string& method,
DispatchCallback callback,
const base::Value::List& list) { … }
template <typename... As>
bool ParseAndHandleWithCallback(
const base::RepeatingCallback<void(DispatchCallback, As...)>& handler,
const std::string& method,
DispatchCallback callback,
const base::Value::List& list) { … }
}
class DispatcherImpl : public DevToolsEmbedderMessageDispatcher { … };
std::unique_ptr<DevToolsEmbedderMessageDispatcher>
DevToolsEmbedderMessageDispatcher::CreateForDevToolsFrontend(
Delegate* delegate) { … }