summaryrefslogtreecommitdiffstats
path: root/ash/frame/frame_border_hit_test_controller.h
blob: e46ff5b2548ecc2fa39c6b2837435f0092861f6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef ASH_FRAME_FRAME_BORDER_HITTEST_CONTROLLER_H_
#define ASH_FRAME_FRAME_BORDER_HITTEST_CONTROLLER_H_

#include "ash/ash_export.h"
#include "base/compiler_specific.h"
#include "base/macros.h"

namespace aura {
class Window;
}

namespace gfx {
class Point;
}

namespace views {
class NonClientFrameView;
class Widget;
}

namespace ash {
class FrameCaptionButtonContainerView;

// Class which manages the hittest override bounds for |frame|.
class ASH_EXPORT FrameBorderHitTestController {
 public:
  explicit FrameBorderHitTestController(views::Widget* frame);
  virtual ~FrameBorderHitTestController();

  // Does the non client hit test on behalf of |view|. |point_in_widget| must be
  // in the coordinates of |view|'s widget.
  static int NonClientHitTest(
      views::NonClientFrameView* view,
      FrameCaptionButtonContainerView* caption_button_container,
      const gfx::Point& point_in_widget);

 private:
  // The window whose hittest override bounds are being managed.
  aura::Window* frame_window_;

  DISALLOW_COPY_AND_ASSIGN(FrameBorderHitTestController);
};

}  // namespace ash

#endif  // ASH_FRAME_FRAME_BORDER_HITTEST_CONTROLLER_H_