OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef ASH_FRAME_FRAME_BORDER_HITTEST_CONTROLLER_H_ | 5 #ifndef ASH_FRAME_FRAME_BORDER_HITTEST_CONTROLLER_H_ |
6 #define ASH_FRAME_FRAME_BORDER_HITTEST_CONTROLLER_H_ | 6 #define ASH_FRAME_FRAME_BORDER_HITTEST_CONTROLLER_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 | 11 |
12 namespace aura { | 12 namespace aura { |
13 class Window; | 13 class Window; |
14 } | 14 } |
15 | 15 |
16 namespace gfx { | 16 namespace gfx { |
17 class Point; | 17 class Point; |
18 } | 18 } |
19 | 19 |
20 namespace views { | 20 namespace views { |
21 class NonClientFrameView; | 21 class NonClientFrameView; |
22 class Widget; | 22 class Widget; |
23 } | 23 } |
24 | 24 |
25 namespace ash { | 25 namespace ash { |
26 class HeaderPainter; | 26 class FrameCaptionButtonContainerView; |
27 | 27 |
28 // Class which manages the hittest override bounds for |frame|. | 28 // Class which manages the hittest override bounds for |frame|. |
29 class ASH_EXPORT FrameBorderHitTestController { | 29 class ASH_EXPORT FrameBorderHitTestController { |
30 public: | 30 public: |
31 explicit FrameBorderHitTestController(views::Widget* frame); | 31 explicit FrameBorderHitTestController(views::Widget* frame); |
32 virtual ~FrameBorderHitTestController(); | 32 virtual ~FrameBorderHitTestController(); |
33 | 33 |
34 // Does the non client hit test on behalf of |view|. |point| must be in the | 34 // Does the non client hit test on behalf of |view|. |point_in_widget| must be |
35 // coordinates of |view|'s widget. | 35 // in the coordinates of |view|'s widget. |
36 static int NonClientHitTest(views::NonClientFrameView* view, | 36 static int NonClientHitTest( |
37 HeaderPainter* header_painter, | 37 views::NonClientFrameView* view, |
38 const gfx::Point& point); | 38 FrameCaptionButtonContainerView* caption_button_container, |
| 39 const gfx::Point& point_in_widget); |
39 | 40 |
40 private: | 41 private: |
41 // The window whose hittest override bounds are being managed. | 42 // The window whose hittest override bounds are being managed. |
42 aura::Window* frame_window_; | 43 aura::Window* frame_window_; |
43 | 44 |
44 DISALLOW_COPY_AND_ASSIGN(FrameBorderHitTestController); | 45 DISALLOW_COPY_AND_ASSIGN(FrameBorderHitTestController); |
45 }; | 46 }; |
46 | 47 |
47 } // namespace ash | 48 } // namespace ash |
48 | 49 |
49 #endif // ASH_FRAME_FRAME_BORDER_HITTEST_CONTROLLER_H_ | 50 #endif // ASH_FRAME_FRAME_BORDER_HITTEST_CONTROLLER_H_ |
OLD | NEW |