chromeos: Move files in //ash/common/system/chromeos to //ash/system
Ash only compiles on chromeos so there's no need for special /chromeos
subdirectories. We're also getting rid of //ash/common, so just move
everything into //ash/system.
Mechanical file moves:
* //ash/system/chromeos -> //ash/system
* //ash/common/system/chromeos -> //ash/system
Also fix some bad include guards.
This is a mechnical move with tools/git/mass-rename.py. No behavior
changes.
BUG=666778
TEST=compiles, ash_unittests
[email protected]
Change-Id: I572565f83fe7a8c63e58693afd92f454b9ac8bb0
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation
Change-Id: I572565f83fe7a8c63e58693afd92f454b9ac8bb0
Reviewed-on: https://chromium-review.googlesource.com/471884
Commit-Queue: James Cook <[email protected]>
Reviewed-by: James Cook <[email protected]>
Cr-Commit-Position: refs/heads/master@{#463121}
diff --git a/ash/system/palette/tools/capture_screen_action.cc b/ash/system/palette/tools/capture_screen_action.cc
new file mode 100644
index 0000000..85fde9e
--- /dev/null
+++ b/ash/system/palette/tools/capture_screen_action.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/system/palette/tools/capture_screen_action.h"
+
+#include "ash/common/palette_delegate.h"
+#include "ash/resources/vector_icons/vector_icons.h"
+#include "ash/shell.h"
+#include "ash/strings/grit/ash_strings.h"
+#include "ash/system/palette/palette_ids.h"
+#include "ui/base/l10n/l10n_util.h"
+
+namespace ash {
+
+CaptureScreenAction::CaptureScreenAction(Delegate* delegate)
+ : CommonPaletteTool(delegate) {}
+
+CaptureScreenAction::~CaptureScreenAction() {}
+
+PaletteGroup CaptureScreenAction::GetGroup() const {
+ return PaletteGroup::ACTION;
+}
+
+PaletteToolId CaptureScreenAction::GetToolId() const {
+ return PaletteToolId::CAPTURE_SCREEN;
+}
+
+void CaptureScreenAction::OnEnable() {
+ CommonPaletteTool::OnEnable();
+
+ delegate()->DisableTool(GetToolId());
+ delegate()->HidePaletteImmediately();
+ Shell::Get()->palette_delegate()->TakeScreenshot();
+}
+
+views::View* CaptureScreenAction::CreateView() {
+ return CreateDefaultView(
+ l10n_util::GetStringUTF16(IDS_ASH_STYLUS_TOOLS_CAPTURE_SCREEN_ACTION));
+}
+
+const gfx::VectorIcon& CaptureScreenAction::GetPaletteIcon() const {
+ return kPaletteActionCaptureScreenIcon;
+}
+
+} // namespace ash