chromium/chrome/browser/ui/views/apps/chrome_native_app_window_views.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/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "chrome/browser/ui/views/apps/chrome_native_app_window_views.h"

#include <stddef.h>

#include <utility>

#include "base/no_destructor.h"
#include "base/not_fatal_until.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/app_mode/app_mode_utils.h"
#include "chrome/browser/devtools/devtools_toggle_action.h"
#include "chrome/browser/devtools/devtools_window.h"
#include "chrome/browser/extensions/chrome_app_icon.h"
#include "chrome/browser/extensions/chrome_app_icon_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/views/accelerator_table.h"
#include "chrome/browser/ui/views/extensions/extension_keybinding_registry_views.h"
#include "components/favicon/content/content_favicon_driver.h"
#include "components/zoom/page_zoom.h"
#include "components/zoom/zoom_controller.h"
#include "extensions/browser/app_window/app_delegate.h"
#include "extensions/browser/extension_util.h"
#include "third_party/skia/include/core/SkRegion.h"
#include "ui/base/models/image_model.h"
#include "ui/gfx/geometry/rounded_corners_f.h"
#include "ui/gfx/geometry/skia_conversions.h"
#include "ui/gfx/image/image_skia.h"
#include "ui/gfx/image/image_skia_operations.h"
#include "ui/views/controls/webview/webview.h"
#include "ui/views/widget/widget.h"

AppWindow;

namespace {

const AcceleratorMapping kAppWindowAcceleratorMap[] =;

// These accelerators will only be available in kiosk mode. These allow the
// user to manually zoom app windows. This is only necessary in kiosk mode
// (in normal mode, the user can zoom via the screen magnifier).
// TODO(xiyuan): Write a test for kiosk accelerators.
const AcceleratorMapping kAppWindowKioskAppModeAcceleratorMap[] =;

std::map<ui::Accelerator, int> AcceleratorsFromMapping(
    const AcceleratorMapping mapping_array[],
    size_t mapping_length) {}

const std::map<ui::Accelerator, int>& GetAcceleratorTable() {}

}  // namespace

ChromeNativeAppWindowViews::ChromeNativeAppWindowViews() = default;

ChromeNativeAppWindowViews::~ChromeNativeAppWindowViews() = default;

void ChromeNativeAppWindowViews::OnBeforeWidgetInit(
    const AppWindow::CreateParams& create_params,
    views::Widget::InitParams* init_params,
    views::Widget* widget) {}

void ChromeNativeAppWindowViews::InitializeDefaultWindow(
    const AppWindow::CreateParams& create_params) {}

std::unique_ptr<views::NonClientFrameView>
ChromeNativeAppWindowViews::CreateStandardDesktopAppFrame() {}

bool ChromeNativeAppWindowViews::ShouldRemoveStandardFrame() {}

// ui::BaseWindow implementation.

gfx::Rect ChromeNativeAppWindowViews::GetRestoredBounds() const {}

ui::WindowShowState ChromeNativeAppWindowViews::GetRestoredState() const {}

ui::ZOrderLevel ChromeNativeAppWindowViews::GetZOrderLevel() const {}

// views::WidgetDelegate implementation.

ui::ImageModel ChromeNativeAppWindowViews::GetWindowAppIcon() {}

ui::ImageModel ChromeNativeAppWindowViews::GetWindowIcon() {}

std::unique_ptr<views::NonClientFrameView>
ChromeNativeAppWindowViews::CreateNonClientFrameView(views::Widget* widget) {}

bool ChromeNativeAppWindowViews::WidgetHasHitTestMask() const {}

void ChromeNativeAppWindowViews::GetWidgetHitTestMask(SkPath* mask) const {}

// views::View implementation.

bool ChromeNativeAppWindowViews::AcceleratorPressed(
    const ui::Accelerator& accelerator) {}

// NativeAppWindow implementation.

void ChromeNativeAppWindowViews::SetFullscreen(int fullscreen_types) {}

bool ChromeNativeAppWindowViews::IsFullscreenOrPending() const {}

void ChromeNativeAppWindowViews::UpdateShape(
    std::unique_ptr<ShapeRects> rects) {}

bool ChromeNativeAppWindowViews::HasFrameColor() const {}

SkColor ChromeNativeAppWindowViews::ActiveFrameColor() const {}

SkColor ChromeNativeAppWindowViews::InactiveFrameColor() const {}

// NativeAppWindowViews implementation.

void ChromeNativeAppWindowViews::InitializeWindow(
    AppWindow* app_window,
    const AppWindow::CreateParams& create_params) {}

gfx::Image ChromeNativeAppWindowViews::GetCustomImage() {}

gfx::Image ChromeNativeAppWindowViews::GetAppIconImage() {}

void ChromeNativeAppWindowViews::EnsureAppIconCreated() {}

void ChromeNativeAppWindowViews::OnIconUpdated(
    extensions::ChromeAppIcon* icon) {}