OLD | NEW |
---|---|
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 #include "ash/common/system/chromeos/palette/palette_ids.h" | 5 #include "ash/common/system/chromeos/palette/palette_ids.h" |
6 #include "base/logging.h" | 6 #include "base/logging.h" |
7 | 7 |
8 namespace ash { | 8 namespace ash { |
9 | 9 |
10 std::string PaletteToolIdToString(PaletteToolId tool_id) { | 10 std::string PaletteToolIdToString(PaletteToolId tool_id) { |
(...skipping 21 matching lines...) Expand all Loading... | |
32 case PaletteGroup::ACTION: | 32 case PaletteGroup::ACTION: |
33 return "ACTION"; | 33 return "ACTION"; |
34 case PaletteGroup::MODE: | 34 case PaletteGroup::MODE: |
35 return "MODE"; | 35 return "MODE"; |
36 } | 36 } |
37 | 37 |
38 NOTREACHED(); | 38 NOTREACHED(); |
39 return std::string(); | 39 return std::string(); |
40 } | 40 } |
41 | 41 |
42 PaletteTrayOptions PaletteToolIdToPaletteTrayOptions(PaletteToolId tool_id) { | |
43 PaletteTrayOptions option = PALETTE_OPTIONS_COUNT; | |
jdufault
2016/09/02 21:54:30
Can we just return the value directly?
switch (to
xiaoyinh(OOO Sep 11-29)
2016/09/06 17:40:05
Done.
| |
44 switch (tool_id) { | |
45 case PaletteToolId::NONE: | |
46 break; | |
47 case PaletteToolId::CREATE_NOTE: | |
48 option = PALETTE_NEW_NOTE; | |
49 break; | |
50 case PaletteToolId::CAPTURE_REGION: | |
51 option = PALETTE_CAPTURE_REGION; | |
52 break; | |
53 case PaletteToolId::CAPTURE_SCREEN: | |
54 option = PALETTE_CAPTURE_SCREEN; | |
55 break; | |
56 case PaletteToolId::LASER_POINTER: | |
57 option = PALETTE_LASER_POINTER; | |
58 break; | |
59 case PaletteToolId::MAGNIFY: | |
60 option = PALETTE_MAGNIFY; | |
61 break; | |
62 } | |
63 | |
64 return option; | |
65 } | |
66 | |
42 } // namespace ash | 67 } // namespace ash |
OLD | NEW |