Commit 390ccf8f authored by jdufault's avatar jdufault Committed by Commit bot

Disable magnification palette tool unless experimental palette features are enabled.

TEST=manual
BUG=641603

Review-Url: https://codereview.chromium.org/2280273002
Cr-Commit-Position: refs/heads/master@{#414883}
parent f05e88ae
...@@ -56,6 +56,10 @@ const char kAshEnableUnifiedDesktop[] = "ash-enable-unified-desktop"; ...@@ -56,6 +56,10 @@ const char kAshEnableUnifiedDesktop[] = "ash-enable-unified-desktop";
// Enables the palette next to the status area. // Enables the palette next to the status area.
const char kAshEnablePalette[] = "ash-enable-palette"; const char kAshEnablePalette[] = "ash-enable-palette";
// Enables experimental ash palette tools.
const char kAshEnableExperimentalPaletteFeatures[] =
"ash-enable-experimental-palette-features";
#endif #endif
// Enables the observation of accelerometer events to enter touch-view mode. // Enables the observation of accelerometer events to enter touch-view mode.
......
...@@ -30,6 +30,7 @@ ASH_EXPORT extern const char kAshDisableTouchExplorationMode[]; ...@@ -30,6 +30,7 @@ ASH_EXPORT extern const char kAshDisableTouchExplorationMode[];
ASH_EXPORT extern const char kAshEnableFullscreenAppList[]; ASH_EXPORT extern const char kAshEnableFullscreenAppList[];
ASH_EXPORT extern const char kAshEnableMagnifierKeyScroller[]; ASH_EXPORT extern const char kAshEnableMagnifierKeyScroller[];
ASH_EXPORT extern const char kAshEnablePalette[]; ASH_EXPORT extern const char kAshEnablePalette[];
ASH_EXPORT extern const char kAshEnableExperimentalPaletteFeatures[];
ASH_EXPORT extern const char kAshEnableUnifiedDesktop[]; ASH_EXPORT extern const char kAshEnableUnifiedDesktop[];
#endif #endif
ASH_EXPORT extern const char kAshEnableTouchView[]; ASH_EXPORT extern const char kAshEnableTouchView[];
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#include "ash/common/system/chromeos/palette/palette_tool.h" #include "ash/common/system/chromeos/palette/palette_tool.h"
#include "ash/common/system/chromeos/palette/palette_tool_manager.h" #include "ash/common/system/chromeos/palette/palette_tool_manager.h"
#include "ash/common/system/chromeos/palette/palette_utils.h"
#include "ash/common/system/chromeos/palette/tools/capture_region_action.h" #include "ash/common/system/chromeos/palette/tools/capture_region_action.h"
#include "ash/common/system/chromeos/palette/tools/capture_screen_action.h" #include "ash/common/system/chromeos/palette/tools/capture_screen_action.h"
#include "ash/common/system/chromeos/palette/tools/create_note_action.h" #include "ash/common/system/chromeos/palette/tools/create_note_action.h"
...@@ -19,7 +20,8 @@ void PaletteTool::RegisterToolInstances(PaletteToolManager* tool_manager) { ...@@ -19,7 +20,8 @@ void PaletteTool::RegisterToolInstances(PaletteToolManager* tool_manager) {
tool_manager->AddTool(base::MakeUnique<CaptureRegionAction>(tool_manager)); tool_manager->AddTool(base::MakeUnique<CaptureRegionAction>(tool_manager));
tool_manager->AddTool(base::MakeUnique<CaptureScreenAction>(tool_manager)); tool_manager->AddTool(base::MakeUnique<CaptureScreenAction>(tool_manager));
tool_manager->AddTool(base::MakeUnique<CreateNoteAction>(tool_manager)); tool_manager->AddTool(base::MakeUnique<CreateNoteAction>(tool_manager));
tool_manager->AddTool(base::MakeUnique<MagnifierMode>(tool_manager)); if (ArePaletteExperimentalFeaturesEnabled())
tool_manager->AddTool(base::MakeUnique<MagnifierMode>(tool_manager));
} }
PaletteTool::PaletteTool(Delegate* delegate) : delegate_(delegate) {} PaletteTool::PaletteTool(Delegate* delegate) : delegate_(delegate) {}
......
...@@ -14,4 +14,9 @@ bool IsPaletteFeatureEnabled() { ...@@ -14,4 +14,9 @@ bool IsPaletteFeatureEnabled() {
switches::kAshEnablePalette); switches::kAshEnablePalette);
} }
bool ArePaletteExperimentalFeaturesEnabled() {
return base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kAshEnableExperimentalPaletteFeatures);
}
} // namespace ash } // namespace ash
...@@ -13,6 +13,9 @@ namespace ash { ...@@ -13,6 +13,9 @@ namespace ash {
// been disabled by the user. // been disabled by the user.
ASH_EXPORT bool IsPaletteFeatureEnabled(); ASH_EXPORT bool IsPaletteFeatureEnabled();
// Are experimental palette features enabled?
ASH_EXPORT bool ArePaletteExperimentalFeaturesEnabled();
} // namespace ash } // namespace ash
#endif // ASH_COMMON_SYSTEM_CHROMEOS_PALETTE_PALETTE_UTILS_H_ #endif // ASH_COMMON_SYSTEM_CHROMEOS_PALETTE_PALETTE_UTILS_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment