Chromium Code Reviews| Index: ash/common/system/chromeos/palette/palette_ids.cc |
| diff --git a/ash/common/system/chromeos/palette/palette_ids.cc b/ash/common/system/chromeos/palette/palette_ids.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..cffcb308b6674d9f1eb9f3914e97a910df1f427b |
| --- /dev/null |
| +++ b/ash/common/system/chromeos/palette/palette_ids.cc |
| @@ -0,0 +1,42 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "ash/common/system/chromeos/palette/palette_ids.h" |
| +#include "base/logging.h" |
| + |
| +namespace ash { |
| + |
| +std::string PaletteToolIdToString(PaletteToolId tool_id) { |
| + switch (tool_id) { |
| + case PaletteToolId::NONE: |
| + return "NONE"; |
| + case PaletteToolId::CREATE_NEW_NOTE: |
| + return "CREATE_NEW_NOTE"; |
| + case PaletteToolId::SCREENSHOT: |
| + return "SCREENSHOT"; |
| + case PaletteToolId::CAPTURE_REGION: |
| + return "CAPTURE_REGION"; |
| + case PaletteToolId::PRESENTATION: |
| + return "PRESENTATION"; |
| + case PaletteToolId::MAGNIFY: |
| + return "MAGNIFY"; |
| + } |
| + |
| + NOTREACHED(); |
| + return ""; |
|
oshima
2016/07/14 13:58:31
std::string()
jdufault
2016/07/18 20:39:57
Done.
|
| +} |
| + |
| +std::string PaletteGroupToString(PaletteGroup group) { |
| + switch (group) { |
| + case PaletteGroup::ACTION: |
| + return "ACTION"; |
| + case PaletteGroup::MODE: |
| + return "MODE"; |
| + } |
| + |
| + NOTREACHED(); |
| + return ""; |
|
oshima
2016/07/14 13:58:31
ditto
jdufault
2016/07/18 20:39:57
Done.
|
| +} |
| + |
| +} // namespace ash |