Files
brave-core/browser/ui/views/brave_layout_provider.h
T
Simon Hong 7acb9adb9a Updated contents view rounded corner border (#31583)
Resolves brave/brave-browser#49755

This PR added different contents border radius per platform.
LayoutProvider will give border radius per platform as we want different
radius per platform. In same platform, different radius could be used(
kRoundedCornersBorderRadius or kRoundedCornersBorderRadiusAtWindowCorner).
BraveContentsViewUtil::GetRoundedCornersForContentsView()
will give proper value for contents view based on some conditions.

TEST=BraveBrowserViewWithRoundedCornersTest.*
2025-11-20 07:55:06 +09:00

26 lines
1.0 KiB
C++

/* Copyright (c) 2019 The Brave Authors. All rights reserved.
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef BRAVE_BROWSER_UI_VIEWS_BRAVE_LAYOUT_PROVIDER_H_
#define BRAVE_BROWSER_UI_VIEWS_BRAVE_LAYOUT_PROVIDER_H_
#include "chrome/browser/ui/views/chrome_layout_provider.h"
class BraveLayoutProvider : public ChromeLayoutProvider {
public:
BraveLayoutProvider() = default;
BraveLayoutProvider(const BraveLayoutProvider&) = delete;
BraveLayoutProvider& operator=(const BraveLayoutProvider&) = delete;
~BraveLayoutProvider() override = default;
int GetCornerRadiusMetric(views::Emphasis emphasis,
const gfx::Size& size = gfx::Size()) const override;
int GetCornerRadiusMetric(
views::ShapeContextTokensOverride token) const override;
int GetDistanceMetric(int metric) const override;
};
#endif // BRAVE_BROWSER_UI_VIEWS_BRAVE_LAYOUT_PROVIDER_H_