Revert 284234 "Pass signin_scoped_device_id to DeviceInfoSpecifics."
[chromium-blink-merge.git] / ui / views / view_targeter_delegate.h
blob134a8799ce9a04968a48f71ee36bb151d3f90365
1 // Copyright 2014 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.
5 #ifndef UI_VIEWS_VIEW_TARGETER_DELEGATE_H_
6 #define UI_VIEWS_VIEW_TARGETER_DELEGATE_H_
8 #include "base/macros.h"
9 #include "ui/views/views_export.h"
11 namespace gfx {
12 class Rect;
15 namespace views {
16 class View;
18 // Defines the default behaviour for hit-testing a rectangular region against
19 // the bounds of a View. Subclasses of View wishing to define custom
20 // hit-testing behaviour can extend this class.
21 class VIEWS_EXPORT ViewTargeterDelegate {
22 public:
23 ViewTargeterDelegate() {}
24 virtual ~ViewTargeterDelegate() {}
26 // Returns true if the bounds of |target| intersects |rect|, where |rect|
27 // is in the local coodinate space of |target|. Overrides of this method by
28 // a View subclass should enforce DCHECK_EQ(this, target).
29 virtual bool DoesIntersectRect(const View* target,
30 const gfx::Rect& rect) const;
32 private:
33 DISALLOW_COPY_AND_ASSIGN(ViewTargeterDelegate);
36 } // namespace views
38 #endif // UI_VIEWS_VIEW_TARGETER_DELEGATE_H_