chromium/chrome/browser/extensions/extension_action_storage_manager.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 "chrome/browser/extensions/extension_action_storage_manager.h"

#include <stdint.h>

#include <memory>
#include <utility>

#include "base/base64.h"
#include "base/functional/bind.h"
#include "base/strings/string_number_conversions.h"
#include "base/values.h"
#include "extensions/browser/extension_action_manager.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extension_system.h"
#include "extensions/browser/state_store.h"
#include "extensions/common/constants.h"
#include "extensions/common/extension_id.h"
#include "ui/gfx/codec/png_codec.h"
#include "ui/gfx/image/image.h"
#include "ui/gfx/image/image_skia.h"
#include "ui/gfx/image/image_skia_rep.h"

namespace extensions {

namespace {

const char kBrowserActionStorageKey[] =;
const char kPopupUrlStorageKey[] =;
const char kTitleStorageKey[] =;
const char kIconStorageKey[] =;
const char kBadgeTextStorageKey[] =;
const char kBadgeBackgroundColorStorageKey[] =;
const char kBadgeTextColorStorageKey[] =;
const char kAppearanceStorageKey[] =;

// Only add values to the end of this enum, since it's stored in the user's
// Extension State, under the kAppearanceStorageKey.  It represents the
// ExtensionAction's default visibility.
enum StoredAppearance {};

// Conversion function for reading/writing to storage.
SkColor RawStringToSkColor(const std::string& str) {}

// Conversion function for reading/writing to storage.
std::string SkColorToRawString(SkColor color) {}

// Conversion function for reading/writing to storage.
bool StringToSkBitmap(const std::string& str, SkBitmap* bitmap) {}

// Conversion function for reading/writing to storage.
std::string BitmapToString(const SkBitmap& bitmap) {}

// Set |action|'s default values to those specified in |dict|.
void SetDefaultsFromValue(const base::Value::Dict& dict,
                          ExtensionAction* action) {}

// Store |action|'s default values in a base::Value::Dict for use in storing to
// disk.
base::Value::Dict DefaultsToValue(ExtensionAction* action) {}

}  // namespace

ExtensionActionStorageManager::ExtensionActionStorageManager(
    content::BrowserContext* context)
    :{}

ExtensionActionStorageManager::~ExtensionActionStorageManager() {}

void ExtensionActionStorageManager::OnExtensionLoaded(
    content::BrowserContext* browser_context,
    const Extension* extension) {}

void ExtensionActionStorageManager::OnExtensionActionUpdated(
    ExtensionAction* extension_action,
    content::WebContents* web_contents,
    content::BrowserContext* browser_context) {}

void ExtensionActionStorageManager::OnExtensionActionAPIShuttingDown() {}

void ExtensionActionStorageManager::WriteToStorage(
    ExtensionAction* extension_action) {}

void ExtensionActionStorageManager::ReadFromStorage(
    const ExtensionId& extension_id,
    std::optional<base::Value> value) {}

StateStore* ExtensionActionStorageManager::GetStateStore() {}

}  // namespace extensions