chromium/chrome/browser/ui/views/apps/app_info_dialog/app_info_permissions_panel.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/ui/views/apps/app_info_dialog/app_info_permissions_panel.h"

#include <string>
#include <vector>

#include "apps/saved_files_service.h"
#include "base/files/file_path.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/memory/raw_ptr.h"
#include "base/strings/string_split.h"
#include "chrome/browser/apps/platform_apps/app_load_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/views/apps/app_info_dialog/app_info_label.h"
#include "chrome/browser/ui/views/chrome_layout_provider.h"
#include "chrome/grit/generated_resources.h"
#include "extensions/browser/api/device_permissions_manager.h"
#include "extensions/browser/api/file_system/saved_file_entry.h"
#include "extensions/common/extension.h"
#include "extensions/common/permissions/api_permission.h"
#include "extensions/common/permissions/permissions_data.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/metadata/metadata_impl_macros.h"
#include "ui/base/models/image_model.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/geometry/insets.h"
#include "ui/gfx/text_constants.h"
#include "ui/resources/grit/ui_resources.h"
#include "ui/views/border.h"
#include "ui/views/controls/button/image_button.h"
#include "ui/views/controls/label.h"
#include "ui/views/layout/box_layout.h"
#include "ui/views/layout/flex_layout_view.h"
#include "ui/views/view.h"

namespace {

// Pixel spacing measurements for different parts of the permissions list.
const int kSpacingBetweenBulletAndStartOfText =;
const int kSpacingBetweenTextAndRevokeButton =;
const int kIndentationBeforeNestedBullet =;

// Creates a close button that calls |callback| on click and can be placed to
// the right of a bullet in the permissions list. The alt-text is set to a
// revoke message containing the given |permission_message|.
class RevokeButton : public views::ImageButton {};

BEGIN_METADATA()

// A bulleted list of permissions.
class BulletedPermissionsList : public views::View {};

BEGIN_METADATA()

}  // namespace

AppInfoPermissionsPanel::AppInfoPermissionsPanel(
    Profile* profile,
    const extensions::Extension* app)
    :{}

AppInfoPermissionsPanel::~AppInfoPermissionsPanel() {}

void AppInfoPermissionsPanel::CreatePermissionsList() {}

bool AppInfoPermissionsPanel::HasActivePermissionMessages() const {}

extensions::PermissionMessages
AppInfoPermissionsPanel::GetActivePermissionMessages() const {}

int AppInfoPermissionsPanel::GetRetainedFileCount() const {}

std::u16string AppInfoPermissionsPanel::GetRetainedFileHeading() const {}

std::vector<std::u16string> AppInfoPermissionsPanel::GetRetainedFilePaths()
    const {}

void AppInfoPermissionsPanel::RevokeFilePermissions() {}

int AppInfoPermissionsPanel::GetRetainedDeviceCount() const {}

std::u16string AppInfoPermissionsPanel::GetRetainedDeviceHeading() const {}

std::vector<std::u16string> AppInfoPermissionsPanel::GetRetainedDevices()
    const {}

void AppInfoPermissionsPanel::RevokeDevicePermissions() {}

BEGIN_METADATA()