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

Side by Side Diff: mojo/ui/associates/mock_hit_tester.h

Issue 1778593003: Mozart: Add helpers for building view associates. (Closed) Base URL: git@github.com:domokit/mojo.git@moz-6
Patch Set: Created 4 years, 9 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
« no previous file with comments | « mojo/ui/associates/BUILD.gn ('k') | mojo/ui/associates/mock_hit_tester.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 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.
4
5 #ifndef MOJO_UI_ASSOCIATES_MOCK_HIT_TESTER_H_
6 #define MOJO_UI_ASSOCIATES_MOCK_HIT_TESTER_H_
7
8 #include <unordered_map>
9
10 #include "base/macros.h"
11 #include "mojo/services/gfx/composition/interfaces/hit_tests.mojom.h"
12
13 namespace mojo {
14 namespace ui {
15
16 // TODO(jeffbrown): Move this someplace closer to mojo::gfx::composition
17 class MockHitTester : public mojo::gfx::composition::HitTester {
18 public:
19 MockHitTester();
20 ~MockHitTester() override;
21
22 // Sets the next hit test result.
23 void SetNextResult(mojo::PointPtr point,
24 mojo::gfx::composition::HitTestResultPtr result);
25
26 // |HitTester|
27 void HitTest(mojo::PointPtr point, const HitTestCallback& callback) override;
28
29 private:
30 mojo::PointPtr point_;
31 mojo::gfx::composition::HitTestResultPtr result_;
32
33 DISALLOW_COPY_AND_ASSIGN(MockHitTester);
34 };
35
36 } // namespace ui
37 } // namespace mojo
38
39 #endif // MOJO_UI_ASSOCIATES_MOCK_HIT_TESTER_H_
OLDNEW
« no previous file with comments | « mojo/ui/associates/BUILD.gn ('k') | mojo/ui/associates/mock_hit_tester.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698