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