blob: 40af4ca39e7ac7d741824d81e40b1dc0c721cd73 [file] [log] [blame]
Jun Mukaie29ed1c2019-01-29 20:21:231// Copyright 2019 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "ui/base/hit_test.h"
6
Jun Mukaie29ed1c2019-01-29 20:21:237namespace ui {
8
9bool IsResizingComponent(int component) {
10 switch (component) {
11 case HTBOTTOM:
12 case HTBOTTOMLEFT:
13 case HTBOTTOMRIGHT:
14 case HTLEFT:
15 case HTRIGHT:
16 case HTTOP:
17 case HTTOPLEFT:
18 case HTTOPRIGHT:
19 return true;
20 default:
21 return false;
22 }
23}
24
25bool CanPerformDragOrResize(int component) {
26 return component == HTCAPTION || IsResizingComponent(component);
27}
28
29} // namespace ui