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/system/palette/palette_tool.h" | 5 #include "ash/system/palette/palette_tool.h" |
6 | 6 |
7 #include "ash/system/palette/palette_tool_manager.h" | 7 #include "ash/system/palette/palette_tool_manager.h" |
8 #include "ash/system/palette/palette_utils.h" | 8 #include "ash/system/palette/palette_utils.h" |
9 #include "ash/system/palette/tools/capture_region_mode.h" | 9 #include "ash/system/palette/tools/capture_region_mode.h" |
10 #include "ash/system/palette/tools/capture_screen_action.h" | 10 #include "ash/system/palette/tools/capture_screen_action.h" |
11 #include "ash/system/palette/tools/create_note_action.h" | 11 #include "ash/system/palette/tools/create_note_action.h" |
12 #include "ash/system/palette/tools/laser_pointer_mode.h" | 12 #include "ash/system/palette/tools/laser_pointer_mode.h" |
13 #include "ash/system/palette/tools/magnifier_mode.h" | 13 #include "ash/system/palette/tools/magnifier_mode.h" |
| 14 #include "ash/system/palette/tools/metalayer_mode.h" |
14 #include "base/memory/ptr_util.h" | 15 #include "base/memory/ptr_util.h" |
15 #include "ui/gfx/paint_vector_icon.h" | 16 #include "ui/gfx/paint_vector_icon.h" |
16 | 17 |
17 namespace ash { | 18 namespace ash { |
18 | 19 |
19 // static | 20 // static |
20 void PaletteTool::RegisterToolInstances(PaletteToolManager* tool_manager) { | 21 void PaletteTool::RegisterToolInstances(PaletteToolManager* tool_manager) { |
21 tool_manager->AddTool(base::MakeUnique<CaptureRegionMode>(tool_manager)); | 22 tool_manager->AddTool(base::MakeUnique<CaptureRegionMode>(tool_manager)); |
22 tool_manager->AddTool(base::MakeUnique<CaptureScreenAction>(tool_manager)); | 23 tool_manager->AddTool(base::MakeUnique<CaptureScreenAction>(tool_manager)); |
23 tool_manager->AddTool(base::MakeUnique<CreateNoteAction>(tool_manager)); | 24 tool_manager->AddTool(base::MakeUnique<CreateNoteAction>(tool_manager)); |
| 25 tool_manager->AddTool(base::MakeUnique<MetalayerMode>(tool_manager)); |
24 tool_manager->AddTool(base::MakeUnique<LaserPointerMode>(tool_manager)); | 26 tool_manager->AddTool(base::MakeUnique<LaserPointerMode>(tool_manager)); |
25 tool_manager->AddTool(base::MakeUnique<MagnifierMode>(tool_manager)); | 27 tool_manager->AddTool(base::MakeUnique<MagnifierMode>(tool_manager)); |
26 } | 28 } |
27 | 29 |
28 PaletteTool::PaletteTool(Delegate* delegate) : delegate_(delegate) {} | 30 PaletteTool::PaletteTool(Delegate* delegate) : delegate_(delegate) {} |
29 | 31 |
30 PaletteTool::~PaletteTool() {} | 32 PaletteTool::~PaletteTool() {} |
31 | 33 |
32 void PaletteTool::OnEnable() { | 34 void PaletteTool::OnEnable() { |
33 enabled_ = true; | 35 enabled_ = true; |
34 } | 36 } |
35 | 37 |
36 void PaletteTool::OnDisable() { | 38 void PaletteTool::OnDisable() { |
37 enabled_ = false; | 39 enabled_ = false; |
38 } | 40 } |
39 | 41 |
40 const gfx::VectorIcon& PaletteTool::GetActiveTrayIcon() const { | 42 const gfx::VectorIcon& PaletteTool::GetActiveTrayIcon() const { |
41 return gfx::kNoneIcon; | 43 return gfx::kNoneIcon; |
42 } | 44 } |
43 | 45 |
44 } // namespace ash | 46 } // namespace ash |
OLD | NEW |