Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Side by Side Diff: ui/views/masked_view_targeter.h

Issue 308003019: Add DCHECK to MaskedViewTargeter::GetHitTestMask() overrides (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: DCHECK_EQ Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/app_list/views/speech_view.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 UI_VIEWS_MASKED_VIEW_TARGETER_H_ 5 #ifndef UI_VIEWS_MASKED_VIEW_TARGETER_H_
6 #define UI_VIEWS_MASKED_VIEW_TARGETER_H_ 6 #define UI_VIEWS_MASKED_VIEW_TARGETER_H_
7 7
8 #include "ui/views/view_targeter.h" 8 #include "ui/views/view_targeter.h"
9 #include "ui/views/views_export.h" 9 #include "ui/views/views_export.h"
10 10
(...skipping 10 matching lines...) Expand all
21 class VIEWS_EXPORT MaskedViewTargeter : public ViewTargeter { 21 class VIEWS_EXPORT MaskedViewTargeter : public ViewTargeter {
22 public: 22 public:
23 explicit MaskedViewTargeter(View* masked_view); 23 explicit MaskedViewTargeter(View* masked_view);
24 virtual ~MaskedViewTargeter(); 24 virtual ~MaskedViewTargeter();
25 25
26 // Sets the hit-test mask for |view| in |mask| (in |view|'s local 26 // Sets the hit-test mask for |view| in |mask| (in |view|'s local
27 // coordinate system). Returns whether a valid mask has been set in |mask|. 27 // coordinate system). Returns whether a valid mask has been set in |mask|.
28 virtual bool GetHitTestMask(const View* view, gfx::Path* mask) const = 0; 28 virtual bool GetHitTestMask(const View* view, gfx::Path* mask) const = 0;
29 29
30 protected: 30 protected:
31 const View* masked_view() const { return masked_view_; }
32
31 // ui::EventTargeter: 33 // ui::EventTargeter:
32 virtual bool EventLocationInsideBounds( 34 virtual bool EventLocationInsideBounds(
33 ui::EventTarget* target, 35 ui::EventTarget* target,
34 const ui::LocatedEvent& event) const OVERRIDE; 36 const ui::LocatedEvent& event) const OVERRIDE;
35 37
36 private: 38 private:
37 View* masked_view_; 39 View* masked_view_;
38 40
39 DISALLOW_COPY_AND_ASSIGN(MaskedViewTargeter); 41 DISALLOW_COPY_AND_ASSIGN(MaskedViewTargeter);
40 }; 42 };
41 43
42 } // namespace views 44 } // namespace views
43 45
44 #endif // UI_VIEWS_MASKED_VIEW_TARGETER_H_ 46 #endif // UI_VIEWS_MASKED_VIEW_TARGETER_H_
OLDNEW
« no previous file with comments | « ui/app_list/views/speech_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698