OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "mash/wm/frame/frame_border_hit_test_controller.h" | 5 #include "ash/mus/frame/frame_border_hit_test_controller.h" |
6 | 6 |
7 #include "mash/wm/frame/caption_buttons/frame_caption_button_container_view.h" | 7 #include "ash/mus/frame/caption_buttons/frame_caption_button_container_view.h" |
8 #include "ui/aura/env.h" | 8 #include "ui/aura/env.h" |
9 #include "ui/aura/window.h" | 9 #include "ui/aura/window.h" |
10 #include "ui/base/hit_test.h" | 10 #include "ui/base/hit_test.h" |
11 #include "ui/gfx/geometry/insets.h" | 11 #include "ui/gfx/geometry/insets.h" |
12 #include "ui/views/widget/widget.h" | 12 #include "ui/views/widget/widget.h" |
13 #include "ui/views/widget/widget_delegate.h" | 13 #include "ui/views/widget/widget_delegate.h" |
14 #include "ui/views/window/non_client_view.h" | 14 #include "ui/views/window/non_client_view.h" |
15 | 15 |
16 namespace mash { | 16 namespace ash { |
17 namespace wm { | 17 namespace mus { |
18 | 18 |
19 // In the window corners, the resize areas don't actually expand bigger, but the | 19 // In the window corners, the resize areas don't actually expand bigger, but the |
20 // 16 px at the end of each edge triggers diagonal resizing. | 20 // 16 px at the end of each edge triggers diagonal resizing. |
21 const int kResizeAreaCornerSize = 16; | 21 const int kResizeAreaCornerSize = 16; |
22 | 22 |
23 // Windows do not have a traditional visible window frame. Window content | 23 // Windows do not have a traditional visible window frame. Window content |
24 // extends to the edge of the window. We consider a small region outside the | 24 // extends to the edge of the window. We consider a small region outside the |
25 // window bounds and an even smaller region overlapping the window to be the | 25 // window bounds and an even smaller region overlapping the window to be the |
26 // "non-client" area and use it for resizing. | 26 // "non-client" area and use it for resizing. |
27 const int kResizeOutsideBoundsSize = 6; | 27 const int kResizeOutsideBoundsSize = 6; |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 int caption_button_component = caption_button_container->NonClientHitTest( | 78 int caption_button_component = caption_button_container->NonClientHitTest( |
79 point_in_caption_button_container); | 79 point_in_caption_button_container); |
80 if (caption_button_component != HTNOWHERE) | 80 if (caption_button_component != HTNOWHERE) |
81 return caption_button_component; | 81 return caption_button_component; |
82 } | 82 } |
83 | 83 |
84 // Caption is a safe default. | 84 // Caption is a safe default. |
85 return HTCAPTION; | 85 return HTCAPTION; |
86 } | 86 } |
87 | 87 |
88 } // namespace wm | 88 } // namespace mus |
89 } // namespace mash | 89 } // namespace ash |
OLD | NEW |