ink_drop_state.cc 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  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
  3. // found in the LICENSE file.
  4. #include "ui/views/animation/ink_drop_state.h"
  5. #include <ostream>
  6. #include <string>
  7. #include "base/notreached.h"
  8. namespace views {
  9. std::string ToString(InkDropState state) {
  10. switch (state) {
  11. case InkDropState::HIDDEN:
  12. return std::string("HIDDEN");
  13. case InkDropState::ACTION_PENDING:
  14. return std::string("ACTION_PENDING");
  15. case InkDropState::ACTION_TRIGGERED:
  16. return std::string("ACTION_TRIGGERED");
  17. case InkDropState::ALTERNATE_ACTION_PENDING:
  18. return std::string("ALTERNATE_ACTION_PENDING");
  19. case InkDropState::ALTERNATE_ACTION_TRIGGERED:
  20. return std::string("ALTERNATE_ACTION_TRIGGERED");
  21. case InkDropState::ACTIVATED:
  22. return std::string("ACTIVATED");
  23. case InkDropState::DEACTIVATED:
  24. return std::string("DEACTIVATED");
  25. }
  26. NOTREACHED()
  27. << "Should never be reached but is necessary for some compilers.";
  28. return std::string("UNKNOWN");
  29. }
  30. } // namespace views