Chromium Code Reviews| 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/capture_region_action.h" | 8 #include "ash/common/system/chromeos/palette/tools/capture_region_action.h" |
| 9 #include "ash/common/system/chromeos/palette/tools/capture_screen_action.h" | 9 #include "ash/common/system/chromeos/palette/tools/capture_screen_action.h" |
| 10 #include "ash/common/system/chromeos/palette/tools/create_note_action.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( | 17 tool_manager->AddTool( |
| 17 base::WrapUnique(new CaptureScreenAction(tool_manager))); | 18 base::WrapUnique(new CaptureScreenAction(tool_manager))); |
| 18 tool_manager->AddTool( | 19 tool_manager->AddTool( |
| 19 base::WrapUnique(new CaptureRegionAction(tool_manager))); | 20 base::WrapUnique(new CaptureRegionAction(tool_manager))); |
| 21 tool_manager->AddTool(base::WrapUnique(new CreateNoteAction(tool_manager))); | |
|
James Cook
2016/08/12 23:58:55
MakeUnique
jdufault
2016/08/16 21:38:18
Done.
| |
| 20 } | 22 } |
| 21 | 23 |
| 22 PaletteTool::PaletteTool(Delegate* delegate) : delegate_(delegate) {} | 24 PaletteTool::PaletteTool(Delegate* delegate) : delegate_(delegate) {} |
| 23 | 25 |
| 24 PaletteTool::~PaletteTool() {} | 26 PaletteTool::~PaletteTool() {} |
| 25 | 27 |
| 26 void PaletteTool::OnEnable() { | 28 void PaletteTool::OnEnable() { |
| 27 enabled_ = true; | 29 enabled_ = true; |
| 28 } | 30 } |
| 29 | 31 |
| 30 void PaletteTool::OnDisable() { | 32 void PaletteTool::OnDisable() { |
| 31 enabled_ = false; | 33 enabled_ = false; |
| 32 } | 34 } |
| 33 | 35 |
| 34 gfx::VectorIconId PaletteTool::GetActiveTrayIcon() { | 36 gfx::VectorIconId PaletteTool::GetActiveTrayIcon() { |
| 35 return gfx::VectorIconId::VECTOR_ICON_NONE; | 37 return gfx::VectorIconId::VECTOR_ICON_NONE; |
| 36 } | 38 } |
| 37 | 39 |
| 38 } // namespace ash | 40 } // namespace ash |
| OLD | NEW |