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

Side by Side Diff: ui/views/animation/test/ink_drop_host_view_test_api.h

Issue 2289403002: Making SetInkDropMode public (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing unit test v2.0 Created 4 years, 3 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
OLDNEW
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 UI_VIEWS_ANIMATION_TEST_INK_DROP_HOST_VIEW_TEST_API_H_ 5 #ifndef UI_VIEWS_ANIMATION_TEST_INK_DROP_HOST_VIEW_TEST_API_H_
6 #define UI_VIEWS_ANIMATION_TEST_INK_DROP_HOST_VIEW_TEST_API_H_ 6 #define UI_VIEWS_ANIMATION_TEST_INK_DROP_HOST_VIEW_TEST_API_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "ui/views/animation/ink_drop.h" 12 #include "ui/views/animation/ink_drop.h"
13 #include "ui/views/animation/ink_drop_host_view.h" 13 #include "ui/views/animation/ink_drop_host_view.h"
14 14
15 namespace views { 15 namespace views {
16 namespace test { 16 namespace test {
17 17
18 // Test API to provide internal access to an InkDropHostView instance. 18 // Test API to provide internal access to an InkDropHostView instance.
19 class InkDropHostViewTestApi { 19 class InkDropHostViewTestApi {
20 public: 20 public:
21 // Make the protected enum accessbile. 21 // Make the protected enum accessbile.
22 using InkDropMode = InkDropHostView::InkDropMode; 22 using InkDropMode = InkDropHostView::InkDropMode;
23 23
24 explicit InkDropHostViewTestApi(InkDropHostView* host_view); 24 explicit InkDropHostViewTestApi(InkDropHostView* host_view);
25 ~InkDropHostViewTestApi(); 25 ~InkDropHostViewTestApi();
26 26
27 void SetInkDropMode(InkDropMode ink_dorp_mode);
28
29 void SetInkDrop(std::unique_ptr<InkDrop> ink_drop, 27 void SetInkDrop(std::unique_ptr<InkDrop> ink_drop,
30 bool handles_gesture_events); 28 bool handles_gesture_events);
31 void SetInkDrop(std::unique_ptr<InkDrop> ink_drop); 29 void SetInkDrop(std::unique_ptr<InkDrop> ink_drop);
32 InkDrop* ink_drop() { return host_view_->ink_drop(); } 30 InkDrop* ink_drop() { return host_view_->ink_drop(); }
33 31
34 bool HasGestureHandler() const; 32 bool HasGestureHandler() const;
35 33
36 // Wrapper for InkDropHostView::GetInkDropCenterBasedOnLastEvent(). 34 // Wrapper for InkDropHostView::GetInkDropCenterBasedOnLastEvent().
37 gfx::Point GetInkDropCenterBasedOnLastEvent() const; 35 gfx::Point GetInkDropCenterBasedOnLastEvent() const;
38 36
39 // Wrapper for InkDropHostView::AnimateInkDrop(). 37 // Wrapper for InkDropHostView::AnimateInkDrop().
40 void AnimateInkDrop(InkDropState state, const ui::LocatedEvent* event); 38 void AnimateInkDrop(InkDropState state, const ui::LocatedEvent* event);
41 39
42 private: 40 private:
43 // The InkDropHostView to provide internal access to. 41 // The InkDropHostView to provide internal access to.
44 InkDropHostView* host_view_; 42 InkDropHostView* host_view_;
45 43
46 DISALLOW_COPY_AND_ASSIGN(InkDropHostViewTestApi); 44 DISALLOW_COPY_AND_ASSIGN(InkDropHostViewTestApi);
47 }; 45 };
48 46
49 } // namespace test 47 } // namespace test
50 } // namespace views 48 } // namespace views
51 49
52 #endif // UI_VIEWS_ANIMATION_TEST_INK_DROP_HOST_VIEW_TEST_API_H_ 50 #endif // UI_VIEWS_ANIMATION_TEST_INK_DROP_HOST_VIEW_TEST_API_H_
OLDNEW
« no previous file with comments | « ui/views/animation/ink_drop_host_view_unittest.cc ('k') | ui/views/animation/test/ink_drop_host_view_test_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698