#include "ui/views/window/caption_button_layout_constants.h"
#include "build/chromeos_buildflags.h"
#include "ui/base/pointer/touch_ui_controller.h"
#include "ui/gfx/geometry/size.h"
#if BUILDFLAG(IS_CHROMEOS)
#include "chromeos/constants/chromeos_features.h"
#endif
namespace views {
gfx::Size GetCaptionButtonLayoutSize(CaptionButtonLayoutSize size) {
#if BUILDFLAG(IS_CHROMEOS)
if (chromeos::features::IsJellyrollEnabled()) {
return gfx::Size(
36,
size == CaptionButtonLayoutSize::kBrowserCaptionMaximized ? 34 : 40);
}
#endif
if (size == CaptionButtonLayoutSize::kNonBrowserCaption) {
return gfx::Size(32, 32);
}
int height = ui::TouchUiController::Get()->touch_ui() ? 41 : 34;
if (size == CaptionButtonLayoutSize::kBrowserCaptionRestored) {
height += 8;
}
return gfx::Size(32, height);
}
}