Commit 656c9ee2 authored by Oscar Johansson's avatar Oscar Johansson Committed by Commit Bot

Move kResizeAreaCornerSize from namespace

When building with Jumbo, kResizeAreaCorner in
views/frame/opaque_browser_frame_view.cc and
views/overlay/overlay_window_views.cc conflict.
This commit solves the issue by moving the
constants from the namespace to the place where
it is used.

Bug: 773275
Change-Id: I87195fe6f650088e7aaa6117ad44e9e919d17cc9
Reviewed-on: https://chromium-review.googlesource.com/1102499
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Reviewed-by: default avatarBret Sepulveda <bsep@chromium.org>
Cr-Commit-Position: refs/heads/master@{#569978}
parent d35d0f75
...@@ -50,14 +50,6 @@ ...@@ -50,14 +50,6 @@
using content::WebContents; using content::WebContents;
namespace {
// 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.
const int kResizeAreaCornerSize = 16;
} // namespace
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// OpaqueBrowserFrameView, public: // OpaqueBrowserFrameView, public:
...@@ -249,6 +241,10 @@ int OpaqueBrowserFrameView::NonClientHitTest(const gfx::Point& point) { ...@@ -249,6 +241,10 @@ int OpaqueBrowserFrameView::NonClientHitTest(const gfx::Point& point) {
LOG(WARNING) << "delegate is null, returning safe default."; LOG(WARNING) << "delegate is null, returning safe default.";
return HTCAPTION; return HTCAPTION;
} }
// 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.
constexpr int kResizeAreaCornerSize = 16;
int window_component = GetHTComponentForFrame( int window_component = GetHTComponentForFrame(
point, FrameTopBorderThickness(false), NonClientBorderThickness(), point, FrameTopBorderThickness(false), NonClientBorderThickness(),
kResizeAreaCornerSize, kResizeAreaCornerSize, delegate->CanResize()); kResizeAreaCornerSize, kResizeAreaCornerSize, delegate->CanResize());
......
...@@ -34,7 +34,6 @@ namespace { ...@@ -34,7 +34,6 @@ namespace {
constexpr gfx::Size kMinWindowSize = gfx::Size(144, 100); constexpr gfx::Size kMinWindowSize = gfx::Size(144, 100);
const int kOverlayBorderThickness = 5; const int kOverlayBorderThickness = 5;
const int kResizeAreaCornerSize = 16;
// |play_pause_controls_view_| scales at 30% the size of the smaller of the // |play_pause_controls_view_| scales at 30% the size of the smaller of the
// screen's width and height. // screen's width and height.
...@@ -66,6 +65,7 @@ class OverlayWindowFrameView : public views::NonClientFrameView { ...@@ -66,6 +65,7 @@ class OverlayWindowFrameView : public views::NonClientFrameView {
if (!bounds().Contains(point)) if (!bounds().Contains(point))
return HTNOWHERE; return HTNOWHERE;
constexpr int kResizeAreaCornerSize = 16;
int window_component = GetHTComponentForFrame( int window_component = GetHTComponentForFrame(
point, kOverlayBorderThickness, kOverlayBorderThickness, point, kOverlayBorderThickness, kOverlayBorderThickness,
kResizeAreaCornerSize, kResizeAreaCornerSize, kResizeAreaCornerSize, kResizeAreaCornerSize,
......
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