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

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: Fixed patch set 4 errors. 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/laser_pointer_mode.h"
8 #include "ui/gfx/vector_icons_public.h" 9 #include "ui/gfx/vector_icons_public.h"
9 10
10 namespace ash { 11 namespace ash {
11 12
12 // static 13 // static
13 void PaletteTool::RegisterToolInstances(PaletteToolManager* tool_manager) {} 14 void PaletteTool::RegisterToolInstances(PaletteToolManager* tool_manager) {
15 tool_manager->AddTool(base::MakeUnique<LaserPointerMode>(tool_manager));
16 }
14 17
15 PaletteTool::PaletteTool(Delegate* delegate) : delegate_(delegate) {} 18 PaletteTool::PaletteTool(Delegate* delegate) : delegate_(delegate) {}
16 19
17 PaletteTool::~PaletteTool() {} 20 PaletteTool::~PaletteTool() {}
18 21
19 void PaletteTool::OnEnable() { 22 void PaletteTool::OnEnable() {
20 enabled_ = true; 23 enabled_ = true;
21 } 24 }
22 25
23 void PaletteTool::OnDisable() { 26 void PaletteTool::OnDisable() {
24 enabled_ = false; 27 enabled_ = false;
25 } 28 }
26 29
27 gfx::VectorIconId PaletteTool::GetActiveTrayIcon() { 30 gfx::VectorIconId PaletteTool::GetActiveTrayIcon() {
31 // TODO(jdufault): Icons do not seem to support multiple colors.
jdufault 2016/08/19 01:02:08 Remove TODO once you upload the icon fix.
sammiequon 2016/08/19 20:28:46 Ok.
28 return gfx::VectorIconId::VECTOR_ICON_NONE; 32 return gfx::VectorIconId::VECTOR_ICON_NONE;
29 } 33 }
30 34
31 } // namespace ash 35 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698