1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39
   40
   41
   42
   43
   44
   45
   46
   47

ash / public / cpp / arc_compat_mode_util.h [blame]

// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef ASH_PUBLIC_CPP_ARC_COMPAT_MODE_UTIL_H_
#define ASH_PUBLIC_CPP_ARC_COMPAT_MODE_UTIL_H_

#include "ash/public/cpp/ash_public_export.h"
#include "ui/gfx/vector_icon_types.h"

namespace aura {
class Window;
}  // namespace aura

namespace views {
class Widget;
}  // namespace views

namespace ash {

enum class ResizeCompatMode {
  kPhone,
  kTablet,
  kResizable,
};

namespace compat_mode_util {

ASH_PUBLIC_EXPORT ResizeCompatMode
PredictCurrentMode(const views::Widget* widget);

ASH_PUBLIC_EXPORT ResizeCompatMode
PredictCurrentMode(const aura::Window* window);

// Determines which icon should be associated with the given `ResizeCompatMode`
// state.
ASH_PUBLIC_EXPORT const gfx::VectorIcon& GetIcon(ResizeCompatMode mode);

// Determines what text should be displayed for the given `ResizeCompatMode`
// state.
ASH_PUBLIC_EXPORT std::u16string GetText(ResizeCompatMode mode);

}  // namespace compat_mode_util

}  // namespace ash

#endif  // ASH_PUBLIC_CPP_ARC_COMPAT_MODE_UTIL_H_