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

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

Issue 2280273002: Disable magnification palette tool unless experimental palette features are enabled. (Closed)
Patch Set: 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
« no previous file with comments | « ash/common/ash_switches.cc ('k') | ash/common/system/chromeos/palette/palette_utils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/tools/capture_region_action.h" 9 #include "ash/common/system/chromeos/palette/tools/capture_region_action.h"
9 #include "ash/common/system/chromeos/palette/tools/capture_screen_action.h" 10 #include "ash/common/system/chromeos/palette/tools/capture_screen_action.h"
10 #include "ash/common/system/chromeos/palette/tools/create_note_action.h" 11 #include "ash/common/system/chromeos/palette/tools/create_note_action.h"
11 #include "ash/common/system/chromeos/palette/tools/magnifier_mode.h" 12 #include "ash/common/system/chromeos/palette/tools/magnifier_mode.h"
12 #include "base/memory/ptr_util.h" 13 #include "base/memory/ptr_util.h"
13 #include "ui/gfx/vector_icons_public.h" 14 #include "ui/gfx/vector_icons_public.h"
14 15
15 namespace ash { 16 namespace ash {
16 17
17 // static 18 // static
18 void PaletteTool::RegisterToolInstances(PaletteToolManager* tool_manager) { 19 void PaletteTool::RegisterToolInstances(PaletteToolManager* tool_manager) {
19 tool_manager->AddTool(base::MakeUnique<CaptureRegionAction>(tool_manager)); 20 tool_manager->AddTool(base::MakeUnique<CaptureRegionAction>(tool_manager));
20 tool_manager->AddTool(base::MakeUnique<CaptureScreenAction>(tool_manager)); 21 tool_manager->AddTool(base::MakeUnique<CaptureScreenAction>(tool_manager));
21 tool_manager->AddTool(base::MakeUnique<CreateNoteAction>(tool_manager)); 22 tool_manager->AddTool(base::MakeUnique<CreateNoteAction>(tool_manager));
22 tool_manager->AddTool(base::MakeUnique<MagnifierMode>(tool_manager)); 23 if (ArePaletteExperimentalFeaturesEnabled())
24 tool_manager->AddTool(base::MakeUnique<MagnifierMode>(tool_manager));
23 } 25 }
24 26
25 PaletteTool::PaletteTool(Delegate* delegate) : delegate_(delegate) {} 27 PaletteTool::PaletteTool(Delegate* delegate) : delegate_(delegate) {}
26 28
27 PaletteTool::~PaletteTool() {} 29 PaletteTool::~PaletteTool() {}
28 30
29 void PaletteTool::OnEnable() { 31 void PaletteTool::OnEnable() {
30 enabled_ = true; 32 enabled_ = true;
31 } 33 }
32 34
33 void PaletteTool::OnDisable() { 35 void PaletteTool::OnDisable() {
34 enabled_ = false; 36 enabled_ = false;
35 } 37 }
36 38
37 gfx::VectorIconId PaletteTool::GetActiveTrayIcon() { 39 gfx::VectorIconId PaletteTool::GetActiveTrayIcon() {
38 return gfx::VectorIconId::VECTOR_ICON_NONE; 40 return gfx::VectorIconId::VECTOR_ICON_NONE;
39 } 41 }
40 42
41 } // namespace ash 43 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/ash_switches.cc ('k') | ash/common/system/chromeos/palette/palette_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698