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

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

Issue 2239743004: Palette tool laser prototype. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@patch
Patch Set: Rebased. Created 4 years, 3 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/palette_utils.h" 8 #include "ash/common/system/chromeos/palette/palette_utils.h"
9 #include "ash/common/system/chromeos/palette/tools/capture_region_action.h" 9 #include "ash/common/system/chromeos/palette/tools/capture_region_action.h"
10 #include "ash/common/system/chromeos/palette/tools/capture_screen_action.h" 10 #include "ash/common/system/chromeos/palette/tools/capture_screen_action.h"
11 #include "ash/common/system/chromeos/palette/tools/create_note_action.h" 11 #include "ash/common/system/chromeos/palette/tools/create_note_action.h"
12 #include "ash/common/system/chromeos/palette/tools/laser_pointer_mode.h"
12 #include "ash/common/system/chromeos/palette/tools/magnifier_mode.h" 13 #include "ash/common/system/chromeos/palette/tools/magnifier_mode.h"
13 #include "base/memory/ptr_util.h" 14 #include "base/memory/ptr_util.h"
14 #include "ui/gfx/vector_icons_public.h" 15 #include "ui/gfx/vector_icons_public.h"
15 16
16 namespace ash { 17 namespace ash {
17 18
18 // static 19 // static
19 void PaletteTool::RegisterToolInstances(PaletteToolManager* tool_manager) { 20 void PaletteTool::RegisterToolInstances(PaletteToolManager* tool_manager) {
20 tool_manager->AddTool(base::MakeUnique<CaptureRegionAction>(tool_manager)); 21 tool_manager->AddTool(base::MakeUnique<CaptureRegionAction>(tool_manager));
21 tool_manager->AddTool(base::MakeUnique<CaptureScreenAction>(tool_manager)); 22 tool_manager->AddTool(base::MakeUnique<CaptureScreenAction>(tool_manager));
22 tool_manager->AddTool(base::MakeUnique<CreateNoteAction>(tool_manager)); 23 tool_manager->AddTool(base::MakeUnique<CreateNoteAction>(tool_manager));
24 tool_manager->AddTool(base::MakeUnique<LaserPointerMode>(tool_manager));
23 if (ArePaletteExperimentalFeaturesEnabled()) 25 if (ArePaletteExperimentalFeaturesEnabled())
24 tool_manager->AddTool(base::MakeUnique<MagnifierMode>(tool_manager)); 26 tool_manager->AddTool(base::MakeUnique<MagnifierMode>(tool_manager));
25 } 27 }
26 28
27 PaletteTool::PaletteTool(Delegate* delegate) : delegate_(delegate) {} 29 PaletteTool::PaletteTool(Delegate* delegate) : delegate_(delegate) {}
28 30
29 PaletteTool::~PaletteTool() {} 31 PaletteTool::~PaletteTool() {}
30 32
31 void PaletteTool::OnEnable() { 33 void PaletteTool::OnEnable() {
32 enabled_ = true; 34 enabled_ = true;
33 } 35 }
34 36
35 void PaletteTool::OnDisable() { 37 void PaletteTool::OnDisable() {
36 enabled_ = false; 38 enabled_ = false;
37 } 39 }
38 40
39 gfx::VectorIconId PaletteTool::GetActiveTrayIcon() { 41 gfx::VectorIconId PaletteTool::GetActiveTrayIcon() {
40 return gfx::VectorIconId::VECTOR_ICON_NONE; 42 return gfx::VectorIconId::VECTOR_ICON_NONE;
41 } 43 }
42 44
43 } // namespace ash 45 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/palette_delegate.h ('k') | ash/common/system/chromeos/palette/tools/laser_pointer_mode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698