| Index: ash/common/system/chromeos/palette/palette_tool.cc
|
| diff --git a/ash/common/system/chromeos/palette/palette_tool.cc b/ash/common/system/chromeos/palette/palette_tool.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..d4dd839ce9c94ce3553461d588300b9cf801e92d
|
| --- /dev/null
|
| +++ b/ash/common/system/chromeos/palette/palette_tool.cc
|
| @@ -0,0 +1,46 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "ash/common/system/chromeos/palette/palette_tool.h"
|
| +
|
| +#include "base/logging.h"
|
| +
|
| +namespace ash {
|
| +
|
| +// static
|
| +void PaletteTool::RegisterToolInstances(PaletteToolManager* tool_manager) {}
|
| +
|
| +PaletteTool::PaletteTool() {}
|
| +
|
| +PaletteTool::~PaletteTool() {}
|
| +
|
| +void PaletteTool::Initialize(WmWindow* window,
|
| + const ToolAction& enable_tool,
|
| + const ToolAction& disable_tool) {
|
| + window_ = window;
|
| + enable_tool_ = enable_tool;
|
| + disable_tool_ = disable_tool;
|
| +}
|
| +
|
| +void PaletteTool::OnEnable() {
|
| + enabled_ = true;
|
| +}
|
| +
|
| +void PaletteTool::OnDisable() {
|
| + enabled_ = false;
|
| +}
|
| +
|
| +void PaletteTool::EnableSelf() {
|
| + DCHECK(!enable_tool_.is_null()) << "PaletteTool was not initialized";
|
| +
|
| + enable_tool_.Run(tool_id());
|
| +}
|
| +
|
| +void PaletteTool::DisableSelf() {
|
| + DCHECK(!disable_tool_.is_null()) << "PaletteTool was not initialized";
|
| +
|
| + disable_tool_.Run(tool_id());
|
| +}
|
| +
|
| +} // namespace ash
|
|
|