Chromium Code Reviews| 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 #ifndef ASH_COMMON_SYSTEM_CHROMEOS_PALETTE_PALETTE_IDS_H_ | 5 #ifndef ASH_COMMON_SYSTEM_CHROMEOS_PALETTE_PALETTE_IDS_H_ |
| 6 #define ASH_COMMON_SYSTEM_CHROMEOS_PALETTE_PALETTE_IDS_H_ | 6 #define ASH_COMMON_SYSTEM_CHROMEOS_PALETTE_PALETTE_IDS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
| 11 | 11 |
| 12 namespace ash { | 12 namespace ash { |
| 13 | 13 |
| 14 // Usage of each pen palette option. This enum is used to back an UMA histogram | |
| 15 // and should be treated as append-only. | |
| 16 enum PaletteTrayOptions { | |
|
jdufault
2016/09/02 21:54:30
nit: Put these after either PaletteToolId or Palet
xiaoyinh(OOO Sep 11-29)
2016/09/06 17:40:05
Done.
| |
| 17 PALETTE_CLOSED_NO_ACTION = 0, | |
| 18 PALETTE_SETTINGS_BUTTON, | |
| 19 PALETTE_HELP_BUTTON, | |
| 20 PALETTE_CAPTURE_REGION, | |
| 21 PALETTE_CAPTURE_SCREEN, | |
| 22 PALETTE_NEW_NOTE, | |
| 23 PALETTE_MAGNIFY, | |
| 24 PALETTE_LASER_POINTER, | |
| 25 PALETTE_OPTIONS_COUNT | |
| 26 }; | |
| 27 | |
| 28 // Type of palette mode cancellation. This enum is used to back an UMA histogram | |
| 29 // and should be treated as append-only. | |
| 30 enum PaletteModeCancelType { | |
| 31 PALETTE_MODE_LASER_POINTER_CANCELLED = 0, | |
| 32 PALETTE_MODE_LASER_POINTER_SWITCHED, | |
| 33 PALETTE_MODE_MAGNIFY_CANCELLED, | |
| 34 PALETTE_MODE_MAGNIFY_SWITCHED, | |
| 35 PALETTE_MODE_CANCEL_TYPE_COUNT | |
| 36 }; | |
| 37 | |
| 14 // Palette tools are grouped into different categories. Each tool corresponds to | 38 // Palette tools are grouped into different categories. Each tool corresponds to |
| 15 // exactly one group, and at most one tool can be active per group. Actions are | 39 // exactly one group, and at most one tool can be active per group. Actions are |
| 16 // actions the user wants to do, such as take a screenshot, and modes generally | 40 // actions the user wants to do, such as take a screenshot, and modes generally |
| 17 // change OS behavior, like showing a laser pointer instead of a cursor. A mode | 41 // change OS behavior, like showing a laser pointer instead of a cursor. A mode |
| 18 // is active until the user completes the action or disables it. | 42 // is active until the user completes the action or disables it. |
| 19 enum class PaletteGroup { ACTION, MODE }; | 43 enum class PaletteGroup { ACTION, MODE }; |
| 20 | 44 |
| 21 enum class PaletteToolId { | 45 enum class PaletteToolId { |
| 22 NONE, | 46 NONE, |
| 23 CREATE_NOTE, | 47 CREATE_NOTE, |
| 24 CAPTURE_REGION, | 48 CAPTURE_REGION, |
| 25 CAPTURE_SCREEN, | 49 CAPTURE_SCREEN, |
| 26 LASER_POINTER, | 50 LASER_POINTER, |
| 27 MAGNIFY, | 51 MAGNIFY, |
| 28 }; | 52 }; |
| 29 | 53 |
| 30 // Helper functions that convert PaletteToolIds and PaletteGroups to strings. | 54 // Helper functions that convert PaletteToolIds and PaletteGroups to strings. |
| 31 ASH_EXPORT std::string PaletteToolIdToString(PaletteToolId tool_id); | 55 ASH_EXPORT std::string PaletteToolIdToString(PaletteToolId tool_id); |
| 32 ASH_EXPORT std::string PaletteGroupToString(PaletteGroup group); | 56 ASH_EXPORT std::string PaletteGroupToString(PaletteGroup group); |
| 33 | 57 |
| 58 // Helper functions that convert PaletteToolIds to PaletteTrayOptions. | |
| 59 ASH_EXPORT PaletteTrayOptions | |
| 60 PaletteToolIdToPaletteTrayOptions(PaletteToolId tool_id); | |
| 61 | |
| 34 } // namespace ash | 62 } // namespace ash |
| 35 | 63 |
| 36 #endif // ASH_COMMON_SYSTEM_CHROMEOS_PALETTE_PALETTE_IDS_H_ | 64 #endif // ASH_COMMON_SYSTEM_CHROMEOS_PALETTE_PALETTE_IDS_H_ |
| OLD | NEW |