| 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 gfx { | 18 namespace gfx { |
| 18 struct VectorIcon; | 19 struct VectorIcon; |
| 19 } | 20 } |
| 20 | 21 |
| 21 namespace views { | 22 namespace views { |
| 22 class View; | 23 class View; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 45 // Enable or disable a specific tool. | 46 // Enable or disable a specific tool. |
| 46 virtual void EnableTool(PaletteToolId tool_id) = 0; | 47 virtual void EnableTool(PaletteToolId tool_id) = 0; |
| 47 virtual void DisableTool(PaletteToolId tool_id) = 0; | 48 virtual void DisableTool(PaletteToolId tool_id) = 0; |
| 48 | 49 |
| 49 // Hide the entire palette. This should not change any tool state. | 50 // Hide the entire palette. This should not change any tool state. |
| 50 virtual void HidePalette() = 0; | 51 virtual void HidePalette() = 0; |
| 51 | 52 |
| 52 // Returns the root window. | 53 // Returns the root window. |
| 53 virtual WmWindow* GetWindow() = 0; | 54 virtual WmWindow* GetWindow() = 0; |
| 54 | 55 |
| 56 // Record usage of each pen palette option. |
| 57 virtual void RecordPaletteOptionsUsage(PaletteTrayOptions option) = 0; |
| 58 |
| 59 // Record mode cancellation of pen palette. |
| 60 virtual void RecordPaletteModeCancellation(PaletteModeCancelType type) = 0; |
| 61 |
| 55 private: | 62 private: |
| 56 DISALLOW_COPY_AND_ASSIGN(Delegate); | 63 DISALLOW_COPY_AND_ASSIGN(Delegate); |
| 57 }; | 64 }; |
| 58 | 65 |
| 59 // Adds all available PaletteTool instances to the tool_manager. | 66 // Adds all available PaletteTool instances to the tool_manager. |
| 60 static void RegisterToolInstances(PaletteToolManager* tool_manager); | 67 static void RegisterToolInstances(PaletteToolManager* tool_manager); |
| 61 | 68 |
| 62 // |delegate| must outlive this tool instance. | 69 // |delegate| must outlive this tool instance. |
| 63 explicit PaletteTool(Delegate* delegate); | 70 explicit PaletteTool(Delegate* delegate); |
| 64 virtual ~PaletteTool(); | 71 virtual ~PaletteTool(); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 | 108 |
| 102 // Unowned pointer to the delegate. The delegate should outlive this instance. | 109 // Unowned pointer to the delegate. The delegate should outlive this instance. |
| 103 Delegate* delegate_; | 110 Delegate* delegate_; |
| 104 | 111 |
| 105 DISALLOW_COPY_AND_ASSIGN(PaletteTool); | 112 DISALLOW_COPY_AND_ASSIGN(PaletteTool); |
| 106 }; | 113 }; |
| 107 | 114 |
| 108 } // namespace ash | 115 } // namespace ash |
| 109 | 116 |
| 110 #endif // ASH_COMMON_SYSTEM_CHROMEOS_PALETTE_PALETTE_TOOL_H_ | 117 #endif // ASH_COMMON_SYSTEM_CHROMEOS_PALETTE_PALETTE_TOOL_H_ |
| OLD | NEW |