chromium/ui/gtk/nav_button_provider_gtk.cc

// Copyright 2017 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 "ui/gtk/nav_button_provider_gtk.h"

#include "base/not_fatal_until.h"
#include "base/notreached.h"
#include "ui/base/glib/glib_cast.h"
#include "ui/base/glib/scoped_gobject.h"
#include "ui/gfx/image/image_skia.h"
#include "ui/gfx/image/image_skia_rep.h"
#include "ui/gfx/image/image_skia_source.h"
#include "ui/gtk/gtk_compat.h"
#include "ui/gtk/gtk_util.h"
#include "ui/linux/nav_button_provider.h"
#include "ui/views/widget/widget.h"

namespace gtk {

namespace {

struct NavButtonIcon {};

// gtkheaderbar.c uses GTK_ICON_SIZE_MENU, which is 16px.
const int kNavButtonIconSize =;

// Specified in GtkHeaderBar spec.
const int kHeaderSpacing =;

const char* ButtonStyleClassFromButtonType(
    ui::NavButtonProvider::FrameButtonDisplayType type) {}

GtkStateFlags GtkStateFlagsFromButtonState(
    ui::NavButtonProvider::ButtonState state) {}

const char* IconNameFromButtonType(
    ui::NavButtonProvider::FrameButtonDisplayType type) {}

gfx::Size LoadNavButtonIcon(ui::NavButtonProvider::FrameButtonDisplayType type,
                            GtkStyleContext* button_context,
                            int scale,
                            NavButtonIcon* icon = nullptr) {}

gfx::Size GetMinimumWidgetSize(gfx::Size content_size,
                               GtkStyleContext* content_context,
                               GtkCssContext widget_context) {}

GtkCssContext CreateHeaderContext(bool maximized) {}

GtkCssContext CreateWindowControlsContext(bool maximized) {}

void CalculateUnscaledButtonSize(
    ui::NavButtonProvider::FrameButtonDisplayType type,
    bool maximized,
    gfx::Size* button_size,
    gfx::Insets* button_margin) {}

class NavButtonImageSource : public gfx::ImageSkiaSource {};

}  // namespace

NavButtonProviderGtk::NavButtonProviderGtk() = default;

NavButtonProviderGtk::~NavButtonProviderGtk() = default;

void NavButtonProviderGtk::RedrawImages(int top_area_height,
                                        bool maximized,
                                        bool active) {}

gfx::ImageSkia NavButtonProviderGtk::GetImage(
    ui::NavButtonProvider::FrameButtonDisplayType type,
    ui::NavButtonProvider::ButtonState state) const {}

gfx::Insets NavButtonProviderGtk::GetNavButtonMargin(
    ui::NavButtonProvider::FrameButtonDisplayType type) const {}

gfx::Insets NavButtonProviderGtk::GetTopAreaSpacing() const {}

int NavButtonProviderGtk::GetInterNavButtonSpacing() const {}

}  // namespace gtk