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

Side by Side Diff: ui/views/animation/ink_drop_animation_ended_reason.h

Issue 1949143003: Added pretty printers for some Ink Drop enums. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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_INK_DROP_ANIMATION_ENDED_REASON_H_ 5 #ifndef UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_ENDED_REASON_H_
6 #define UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_ENDED_REASON_H_ 6 #define UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_ENDED_REASON_H_
7 7
8 #include <iosfwd>
8 #include <string> 9 #include <string>
9 10
11 #include "ui/views/views_export.h"
12
10 namespace views { 13 namespace views {
11 14
12 // Enumeration of the different reasons why an ink drop animation has finished. 15 // Enumeration of the different reasons why an ink drop animation has finished.
13 enum class InkDropAnimationEndedReason { 16 enum class InkDropAnimationEndedReason {
14 // The animation was completed successfully. 17 // The animation was completed successfully.
15 SUCCESS, 18 SUCCESS,
16 // The animation was stopped prematurely before reaching its final state. 19 // The animation was stopped prematurely before reaching its final state.
17 PRE_EMPTED 20 PRE_EMPTED
18 }; 21 };
19 22
20 // Returns a human readable string for |reason|. Useful for logging. 23 // Returns a human readable string for |reason|. Useful for logging.
21 std::string ToString(InkDropAnimationEndedReason reason); 24 VIEWS_EXPORT std::string ToString(const InkDropAnimationEndedReason& reason);
sky 2016/05/04 23:43:42 Generally we don't pass primitives by ref. For exa
bruthig 2016/05/04 23:51:48 Done.
25
26 // This is declared here for use in gtest-based unit tests but is defined in
27 // the views_test_support target. Depend on that to use this in your unit test.
28 // This should not be used in production code - call ToString() instead.
29 void PrintTo(const InkDropAnimationEndedReason& reason, ::std::ostream* os);
sky 2016/05/04 23:43:42 and here
bruthig 2016/05/04 23:51:48 Done.
22 30
23 } // namespace views 31 } // namespace views
24 32
25 #endif // UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_ENDED_REASON_H_ 33 #endif // UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_ENDED_REASON_H_
OLDNEW
« no previous file with comments | « no previous file | ui/views/animation/ink_drop_animation_ended_reason.cc » ('j') | ui/views/animation/ink_drop_hover.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698