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_tool.h" | 5 #include "ash/common/system/chromeos/palette/palette_tool.h" |
6 | 6 |
7 #include "ash/common/system/chromeos/palette/palette_tool_manager.h" | 7 #include "ash/common/system/chromeos/palette/palette_tool_manager.h" |
| 8 #include "ash/common/system/chromeos/palette/tools/create_note_action.h" |
| 9 #include "base/memory/ptr_util.h" |
8 #include "ui/gfx/vector_icons_public.h" | 10 #include "ui/gfx/vector_icons_public.h" |
9 | 11 |
10 namespace ash { | 12 namespace ash { |
11 | 13 |
12 // static | 14 // static |
13 void PaletteTool::RegisterToolInstances(PaletteToolManager* tool_manager) {} | 15 void PaletteTool::RegisterToolInstances(PaletteToolManager* tool_manager) { |
| 16 tool_manager->AddTool(base::MakeUnique<CreateNoteAction>(tool_manager)); |
| 17 } |
14 | 18 |
15 PaletteTool::PaletteTool(Delegate* delegate) : delegate_(delegate) {} | 19 PaletteTool::PaletteTool(Delegate* delegate) : delegate_(delegate) {} |
16 | 20 |
17 PaletteTool::~PaletteTool() {} | 21 PaletteTool::~PaletteTool() {} |
18 | 22 |
19 void PaletteTool::OnEnable() { | 23 void PaletteTool::OnEnable() { |
20 enabled_ = true; | 24 enabled_ = true; |
21 } | 25 } |
22 | 26 |
23 void PaletteTool::OnDisable() { | 27 void PaletteTool::OnDisable() { |
24 enabled_ = false; | 28 enabled_ = false; |
25 } | 29 } |
26 | 30 |
27 gfx::VectorIconId PaletteTool::GetActiveTrayIcon() { | 31 gfx::VectorIconId PaletteTool::GetActiveTrayIcon() { |
28 return gfx::VectorIconId::VECTOR_ICON_NONE; | 32 return gfx::VectorIconId::VECTOR_ICON_NONE; |
29 } | 33 } |
30 | 34 |
31 } // namespace ash | 35 } // namespace ash |
OLD | NEW |