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_TOOL_H_ | 5 #ifndef ASH_COMMON_SYSTEM_CHROMEOS_PALETTE_PALETTE_TOOL_H_ |
6 #define ASH_COMMON_SYSTEM_CHROMEOS_PALETTE_PALETTE_TOOL_H_ | 6 #define ASH_COMMON_SYSTEM_CHROMEOS_PALETTE_PALETTE_TOOL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "ash/ash_export.h" | 12 #include "ash/ash_export.h" |
| 13 #include "ash/common/system/chromeos/palette/palette_ids.h" |
13 #include "base/callback.h" | 14 #include "base/callback.h" |
14 #include "base/macros.h" | 15 #include "base/macros.h" |
15 #include "ui/gfx/vector_icon_types.h" | 16 #include "ui/gfx/vector_icon_types.h" |
16 | 17 |
17 namespace views { | 18 namespace views { |
18 class View; | 19 class View; |
19 } | 20 } |
20 | 21 |
21 namespace ash { | 22 namespace ash { |
22 | 23 |
(...skipping 18 matching lines...) Expand all Loading... |
41 // Enable or disable a specific tool. | 42 // Enable or disable a specific tool. |
42 virtual void EnableTool(PaletteToolId tool_id) = 0; | 43 virtual void EnableTool(PaletteToolId tool_id) = 0; |
43 virtual void DisableTool(PaletteToolId tool_id) = 0; | 44 virtual void DisableTool(PaletteToolId tool_id) = 0; |
44 | 45 |
45 // Hide the entire palette. This should not change any tool state. | 46 // Hide the entire palette. This should not change any tool state. |
46 virtual void HidePalette() = 0; | 47 virtual void HidePalette() = 0; |
47 | 48 |
48 // Returns the root window. | 49 // Returns the root window. |
49 virtual WmWindow* GetWindow() = 0; | 50 virtual WmWindow* GetWindow() = 0; |
50 | 51 |
| 52 // Record usage of each pen palette option. |
| 53 virtual void RecordPaletteOptionsUsage(PaletteTrayOptions option) = 0; |
| 54 |
| 55 // Record mode cancellation of pen palette. |
| 56 virtual void RecordPaletteModeCancellation(PaletteModeCancelType type) = 0; |
| 57 |
51 private: | 58 private: |
52 DISALLOW_COPY_AND_ASSIGN(Delegate); | 59 DISALLOW_COPY_AND_ASSIGN(Delegate); |
53 }; | 60 }; |
54 | 61 |
55 // Adds all available PaletteTool instances to the tool_manager. | 62 // Adds all available PaletteTool instances to the tool_manager. |
56 static void RegisterToolInstances(PaletteToolManager* tool_manager); | 63 static void RegisterToolInstances(PaletteToolManager* tool_manager); |
57 | 64 |
58 // |delegate| must outlive this tool instance. | 65 // |delegate| must outlive this tool instance. |
59 explicit PaletteTool(Delegate* delegate); | 66 explicit PaletteTool(Delegate* delegate); |
60 virtual ~PaletteTool(); | 67 virtual ~PaletteTool(); |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 | 104 |
98 // Unowned pointer to the delegate. The delegate should outlive this instance. | 105 // Unowned pointer to the delegate. The delegate should outlive this instance. |
99 Delegate* delegate_; | 106 Delegate* delegate_; |
100 | 107 |
101 DISALLOW_COPY_AND_ASSIGN(PaletteTool); | 108 DISALLOW_COPY_AND_ASSIGN(PaletteTool); |
102 }; | 109 }; |
103 | 110 |
104 } // namespace ash | 111 } // namespace ash |
105 | 112 |
106 #endif // ASH_COMMON_SYSTEM_CHROMEOS_PALETTE_PALETTE_TOOL_H_ | 113 #endif // ASH_COMMON_SYSTEM_CHROMEOS_PALETTE_PALETTE_TOOL_H_ |
OLD | NEW |