| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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 MOJO_UI_ASSOCIATES_VIEW_TREE_HIT_TESTER_CLIENT_H_ | 5 #ifndef MOJO_UI_ASSOCIATES_VIEW_TREE_HIT_TESTER_CLIENT_H_ |
| 6 #define MOJO_UI_ASSOCIATES_VIEW_TREE_HIT_TESTER_CLIENT_H_ | 6 #define MOJO_UI_ASSOCIATES_VIEW_TREE_HIT_TESTER_CLIENT_H_ |
| 7 | 7 |
| 8 #include <queue> | 8 #include <queue> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 // hit tester is invalidated. | 22 // hit tester is invalidated. |
| 23 class ViewTreeHitTesterClient | 23 class ViewTreeHitTesterClient |
| 24 : public base::RefCounted<ViewTreeHitTesterClient> { | 24 : public base::RefCounted<ViewTreeHitTesterClient> { |
| 25 public: | 25 public: |
| 26 ViewTreeHitTesterClient( | 26 ViewTreeHitTesterClient( |
| 27 const scoped_refptr<ViewInspectorClient>& view_inspector_client, | 27 const scoped_refptr<ViewInspectorClient>& view_inspector_client, |
| 28 mojo::ui::ViewTreeTokenPtr view_tree_token); | 28 mojo::ui::ViewTreeTokenPtr view_tree_token); |
| 29 | 29 |
| 30 // Performs a hit test for the specified point then invokes the callback. | 30 // Performs a hit test for the specified point then invokes the callback. |
| 31 // Note: May invoke the callback immediately if no remote calls were required. | 31 // Note: May invoke the callback immediately if no remote calls were required. |
| 32 void HitTest(mojo::PointPtr point, const ResolvedHitsCallback& callback); | 32 void HitTest(mojo::PointFPtr point, const ResolvedHitsCallback& callback); |
| 33 | 33 |
| 34 // Sets a callback to invoke when the hit tester changes. | 34 // Sets a callback to invoke when the hit tester changes. |
| 35 void set_hit_tester_changed_callback(const base::Closure& callback) { | 35 void set_hit_tester_changed_callback(const base::Closure& callback) { |
| 36 hit_tester_changed_callback_ = callback; | 36 hit_tester_changed_callback_ = callback; |
| 37 } | 37 } |
| 38 | 38 |
| 39 private: | 39 private: |
| 40 friend class base::RefCounted<ViewTreeHitTesterClient>; | 40 friend class base::RefCounted<ViewTreeHitTesterClient>; |
| 41 ~ViewTreeHitTesterClient(); | 41 ~ViewTreeHitTesterClient(); |
| 42 | 42 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 56 | 56 |
| 57 base::WeakPtrFactory<ViewTreeHitTesterClient> weak_factory_; | 57 base::WeakPtrFactory<ViewTreeHitTesterClient> weak_factory_; |
| 58 | 58 |
| 59 DISALLOW_COPY_AND_ASSIGN(ViewTreeHitTesterClient); | 59 DISALLOW_COPY_AND_ASSIGN(ViewTreeHitTesterClient); |
| 60 }; | 60 }; |
| 61 | 61 |
| 62 } // namespace ui | 62 } // namespace ui |
| 63 } // namespace mojo | 63 } // namespace mojo |
| 64 | 64 |
| 65 #endif // MOJO_UI_ASSOCIATES_VIEW_TREE_HIT_TESTER_CLIENT_H_ | 65 #endif // MOJO_UI_ASSOCIATES_VIEW_TREE_HIT_TESTER_CLIENT_H_ |
| OLD | NEW |