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

Unified Diff: ash/system/palette/tools/metalayer_mode.h

Issue 2824703006: Add MetalayerMode to the palette. (Closed)
Patch Set: Fixed copyright year Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/system/palette/palette_tool.cc ('k') | ash/system/palette/tools/metalayer_mode.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/palette/tools/metalayer_mode.h
diff --git a/ash/system/palette/tools/metalayer_mode.h b/ash/system/palette/tools/metalayer_mode.h
new file mode 100644
index 0000000000000000000000000000000000000000..c839fa9192f7f7c2ad2b282299f73df39486923a
--- /dev/null
+++ b/ash/system/palette/tools/metalayer_mode.h
@@ -0,0 +1,42 @@
+// Copyright 2017 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.
+
+#ifndef ASH_SYSTEM_PALETTE_TOOLS_METALAYER_MODE_H_
+#define ASH_SYSTEM_PALETTE_TOOLS_METALAYER_MODE_H_
+
+#include "ash/ash_export.h"
+#include "ash/system/palette/common_palette_tool.h"
+#include "base/memory/weak_ptr.h"
+
+namespace ash {
+
+// A palette tool that lets the user select a screen region to be passed
+// to the voice interaction framework.
+class ASH_EXPORT MetalayerMode : public CommonPaletteTool {
+ public:
+ explicit MetalayerMode(Delegate* delegate);
+ ~MetalayerMode() override;
+
+ private:
+ // PaletteTool:
+ PaletteGroup GetGroup() const override;
+ PaletteToolId GetToolId() const override;
+ void OnEnable() override;
+ void OnDisable() override;
+ const gfx::VectorIcon& GetActiveTrayIcon() const override;
+ views::View* CreateView() override;
+
+ // CommonPaletteTool:
+ const gfx::VectorIcon& GetPaletteIcon() const override;
+
+ void OnMetalayerDone();
+
+ base::WeakPtrFactory<MetalayerMode> weak_factory_;
+
+ DISALLOW_COPY_AND_ASSIGN(MetalayerMode);
+};
+
+} // namespace ash
+
+#endif // ASH_SYSTEM_PALETTE_TOOLS_METALAYER_MODE_H_
« no previous file with comments | « ash/system/palette/palette_tool.cc ('k') | ash/system/palette/tools/metalayer_mode.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698