Commit 15488798 authored by Antonio Gomes's avatar Antonio Gomes Committed by Commit Bot

Declare kTopCornerRadiusWhenRestored in chromeos_ui_constants.h

... instead of ash_constants.

It is used in default_frame_header.cc, that will be moved to
//chromeos/ui/frame next.

BUG=1113900
R=jamescook@chromium.org

Change-Id: Ibd4417c516ae912964fbd07179912797257d308b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2522921
Commit-Queue: Antonio Gomes <tonikitoo@igalia.com>
Reviewed-by: default avatarJames Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#825751}
parent 1adaaeb9
...@@ -14,9 +14,6 @@ typedef unsigned int SkColor; ...@@ -14,9 +14,6 @@ typedef unsigned int SkColor;
namespace ash { namespace ash {
// Radius of the header's top corners when the window is restored.
constexpr int kTopCornerRadiusWhenRestored = 2;
// Background color used for the Chrome OS boot splash screen. // Background color used for the Chrome OS boot splash screen.
constexpr SkColor kChromeOsBootColor = SkColorSetRGB(0xfe, 0xfe, 0xfe); constexpr SkColor kChromeOsBootColor = SkColorSetRGB(0xfe, 0xfe, 0xfe);
......
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
#include "ash/public/cpp/default_frame_header.h" #include "ash/public/cpp/default_frame_header.h"
#include "ash/public/cpp/ash_constants.h"
#include "ash/public/cpp/window_properties.h" #include "ash/public/cpp/window_properties.h"
#include "base/logging.h" // DCHECK #include "base/logging.h" // DCHECK
#include "chromeos/ui/base/chromeos_ui_constants.h"
#include "chromeos/ui/base/window_properties.h" #include "chromeos/ui/base/window_properties.h"
#include "chromeos/ui/base/window_state_type.h" #include "chromeos/ui/base/window_state_type.h"
#include "chromeos/ui/frame/caption_buttons/caption_button_model.h" #include "chromeos/ui/frame/caption_buttons/caption_button_model.h"
...@@ -109,7 +109,7 @@ void DefaultFrameHeader::UpdateFrameColors() { ...@@ -109,7 +109,7 @@ void DefaultFrameHeader::UpdateFrameColors() {
void DefaultFrameHeader::DoPaintHeader(gfx::Canvas* canvas) { void DefaultFrameHeader::DoPaintHeader(gfx::Canvas* canvas) {
int corner_radius = IsNormalWindowStateType(GetTargetWindow()->GetProperty( int corner_radius = IsNormalWindowStateType(GetTargetWindow()->GetProperty(
chromeos::kWindowStateTypeKey)) chromeos::kWindowStateTypeKey))
? kTopCornerRadiusWhenRestored ? chromeos::kTopCornerRadiusWhenRestored
: 0; : 0;
cc::PaintFlags flags; cc::PaintFlags flags;
......
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
#include "chrome/browser/ui/views/frame/browser_frame_header_ash.h" #include "chrome/browser/ui/views/frame/browser_frame_header_ash.h"
#include "ash/public/cpp/ash_constants.h"
#include "ash/public/cpp/tablet_mode.h" #include "ash/public/cpp/tablet_mode.h"
#include "base/check.h" #include "base/check.h"
#include "chrome/app/vector_icons/vector_icons.h" #include "chrome/app/vector_icons/vector_icons.h"
#include "chromeos/ui/base/chromeos_ui_constants.h"
#include "chromeos/ui/base/window_properties.h" #include "chromeos/ui/base/window_properties.h"
#include "chromeos/ui/base/window_state_type.h" #include "chromeos/ui/base/window_state_type.h"
#include "chromeos/ui/frame/caption_buttons/frame_caption_button_container_view.h" #include "chromeos/ui/frame/caption_buttons/frame_caption_button_container_view.h"
...@@ -180,7 +180,7 @@ void BrowserFrameHeaderAsh::PaintFrameImages(gfx::Canvas* canvas) { ...@@ -180,7 +180,7 @@ void BrowserFrameHeaderAsh::PaintFrameImages(gfx::Canvas* canvas) {
target_widget()->GetNativeWindow()->GetProperty( target_widget()->GetNativeWindow()->GetProperty(
chromeos::kWindowStateTypeKey); chromeos::kWindowStateTypeKey);
int corner_radius = chromeos::IsNormalWindowStateType(state_type) int corner_radius = chromeos::IsNormalWindowStateType(state_type)
? ash::kTopCornerRadiusWhenRestored ? chromeos::kTopCornerRadiusWhenRestored
: 0; : 0;
PaintFrameImagesInRoundRect(canvas, frame_image, frame_overlay_image, PaintFrameImagesInRoundRect(canvas, frame_image, frame_overlay_image,
......
...@@ -9,6 +9,9 @@ ...@@ -9,6 +9,9 @@
namespace chromeos { namespace chromeos {
// Radius of the header's top corners when the window is restored.
constexpr int kTopCornerRadiusWhenRestored = 2;
// In the window corners, the resize areas don't actually expand bigger, but the // In the window corners, the resize areas don't actually expand bigger, but the
// 16 px at the end of each edge triggers diagonal resizing. // 16 px at the end of each edge triggers diagonal resizing.
constexpr int kResizeAreaCornerSize = 16; constexpr int kResizeAreaCornerSize = 16;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment