chromium/extensions/renderer/set_icon_natives.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.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "extensions/renderer/set_icon_natives.h"

#include <stddef.h>
#include <stdint.h>

#include <limits>
#include <memory>

#include "base/containers/span.h"
#include "base/functional/bind.h"
#include "base/numerics/safe_conversions.h"
#include "base/strings/string_number_conversions.h"
#include "extensions/renderer/script_context.h"
#include "gin/data_object_builder.h"
#include "skia/public/mojom/bitmap.mojom.h"
#include "third_party/blink/public/web/web_array_buffer_converter.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "v8/include/v8-context.h"
#include "v8/include/v8-exception.h"
#include "v8/include/v8-function-callback.h"
#include "v8/include/v8-isolate.h"
#include "v8/include/v8-object.h"
#include "v8/include/v8-primitive.h"

// TODO(devlin): Looks like there are lots of opportunities to use gin helpers
// like gin::Dictionary and gin::DataObjectBuilder here.

namespace {

const char kInvalidDimensions[] =;
const char kInvalidData[] =;
const char kNoMemory[] =;

void ThrowException(v8::Isolate* isolate, const char* error_message) {}

int GetIntPropertyFromV8Object(v8::Local<v8::Object> v8_object,
                               v8::Local<v8::Context> v8_context,
                               const char* property_name) {}

int GetIntPropertyFromV8Object(v8::Local<v8::Object> v8_object,
                               v8::Local<v8::Context> v8_context,
                               int index) {}

}  // namespace

namespace extensions {

SetIconNatives::SetIconNatives(ScriptContext* context)
    :{}

void SetIconNatives::AddRoutes() {}

bool SetIconNatives::ConvertImageDataToBitmapValue(
    const v8::Local<v8::Object> image_data,
    v8::Local<v8::Value>* image_data_bitmap) {}

bool SetIconNatives::ConvertImageDataSetToBitmapValueSet(
    v8::Local<v8::Object>& details,
    v8::Local<v8::Object>* bitmap_set_value) {}

void SetIconNatives::SetIconCommon(
    const v8::FunctionCallbackInfo<v8::Value>& args) {}

}  // namespace extensions