chromium/chrome/browser/devtools/devtools_embedder_message_dispatcher.cc

// Copyright 2013 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#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) {}

}  // namespace

/**
 * Dispatcher for messages sent from the frontend running in an
 * isolated renderer (devtools:// or chrome://inspect) to the embedder
 * in the browser.
 *
 * The messages are sent via InspectorFrontendHost.sendMessageToEmbedder or
 * chrome.send method accordingly.
 */
class DispatcherImpl : public DevToolsEmbedderMessageDispatcher {};

// static
std::unique_ptr<DevToolsEmbedderMessageDispatcher>
DevToolsEmbedderMessageDispatcher::CreateForDevToolsFrontend(
    Delegate* delegate) {}