chromium/extensions/renderer/extensions_render_frame_observer.cc

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

#include "extensions/renderer/extensions_render_frame_observer.h"

#include <stddef.h>

#include <memory>
#include <utility>
#include <vector>

#include "base/functional/bind.h"
#include "base/strings/string_split.h"
#include "base/strings/utf_string_conversions.h"
#include "content/public/renderer/render_frame.h"
#include "extensions/common/logging_constants.h"
#include "extensions/common/stack_frame.h"
#include "extensions/renderer/extension_frame_helper.h"
#include "third_party/blink/public/common/logging/logging_utils.h"
#include "third_party/blink/public/web/web_frame_widget.h"
#include "third_party/blink/public/web/web_local_frame.h"
#include "third_party/blink/public/web/web_view.h"

namespace extensions {

namespace {

// The delimiter for a stack trace provided by WebKit.
const char16_t kStackFrameDelimiter[] =;

// Get a stack trace from a WebKit console message.
// There are three possible scenarios:
// 1. WebKit gives us a stack trace in |stack_trace|.
// 2. The stack trace is embedded in the error |message| by an internal
//    script. This will be more useful than |stack_trace|, since |stack_trace|
//    will include the internal bindings trace, instead of a developer's code.
// 3. No stack trace is included. In this case, we should mock one up from
//    the given line number and source.
// |message| will be populated with the error message only (i.e., will not
// include any stack trace).
StackTrace GetStackTraceFromMessage(std::u16string* message,
                                    const std::u16string& source,
                                    const std::u16string& stack_trace,
                                    int32_t line_number) {}

}  // namespace

ExtensionsRenderFrameObserver::ExtensionsRenderFrameObserver(
    content::RenderFrame* render_frame,
    service_manager::BinderRegistry* registry)
    :{}

ExtensionsRenderFrameObserver::~ExtensionsRenderFrameObserver() {}

void ExtensionsRenderFrameObserver::BindAppWindowReceiver(
    mojo::PendingReceiver<mojom::AppWindow> receiver) {}

void ExtensionsRenderFrameObserver::SetSupportsDraggableRegions(
    bool supports_draggable_regions) {}

void ExtensionsRenderFrameObserver::SetVisuallyDeemphasized(bool deemphasized) {}

void ExtensionsRenderFrameObserver::DetailedConsoleMessageAdded(
    const std::u16string& message,
    const std::u16string& source,
    const std::u16string& stack_trace_string,
    uint32_t line_number,
    blink::mojom::ConsoleMessageLevel level) {}

void ExtensionsRenderFrameObserver::OnDestruct() {}

}  // namespace extensions