| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #include "ui/views/animation/ink_drop_state.h" | 5 #include "ui/views/animation/ink_drop_state.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 | 10 |
| 11 namespace views { | 11 namespace views { |
| 12 | 12 |
| 13 std::string ToString(InkDropState state) { | 13 std::string ToString(const InkDropState& state) { |
| 14 switch (state) { | 14 switch (state) { |
| 15 case InkDropState::HIDDEN: | 15 case InkDropState::HIDDEN: |
| 16 return std::string("HIDDEN"); | 16 return std::string("HIDDEN"); |
| 17 case InkDropState::ACTION_PENDING: | 17 case InkDropState::ACTION_PENDING: |
| 18 return std::string("ACTION_PENDING"); | 18 return std::string("ACTION_PENDING"); |
| 19 case InkDropState::ACTION_TRIGGERED: | 19 case InkDropState::ACTION_TRIGGERED: |
| 20 return std::string("ACTION_TRIGGERED"); | 20 return std::string("ACTION_TRIGGERED"); |
| 21 case InkDropState::ALTERNATE_ACTION_PENDING: | 21 case InkDropState::ALTERNATE_ACTION_PENDING: |
| 22 return std::string("ALTERNATE_ACTION_PENDING"); | 22 return std::string("ALTERNATE_ACTION_PENDING"); |
| 23 case InkDropState::ALTERNATE_ACTION_TRIGGERED: | 23 case InkDropState::ALTERNATE_ACTION_TRIGGERED: |
| 24 return std::string("ALTERNATE_ACTION_TRIGGERED"); | 24 return std::string("ALTERNATE_ACTION_TRIGGERED"); |
| 25 case InkDropState::ACTIVATED: | 25 case InkDropState::ACTIVATED: |
| 26 return std::string("ACTIVATED"); | 26 return std::string("ACTIVATED"); |
| 27 case InkDropState::DEACTIVATED: | 27 case InkDropState::DEACTIVATED: |
| 28 return std::string("DEACTIVATED"); | 28 return std::string("DEACTIVATED"); |
| 29 } | 29 } |
| 30 NOTREACHED() | 30 NOTREACHED() |
| 31 << "Should never be reached but is necessary for some compilers."; | 31 << "Should never be reached but is necessary for some compilers."; |
| 32 return std::string("UNKNOWN"); | 32 return std::string("UNKNOWN"); |
| 33 } | 33 } |
| 34 | 34 |
| 35 } // namespace views | 35 } // namespace views |
| OLD | NEW |