Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(582)

Side by Side Diff: ash/common/system/chromeos/palette/palette_tool.cc

Issue 2235063002: Add create note palette action. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@app-runtime-changes
Patch Set: Initial upload Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698