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

Unified Diff: ash/common/system/chromeos/palette/tools/capture_region_mode.h

Issue 2291913002: Allow the user to cancel the capture region action, and show its active status in the tray. (Closed)
Patch Set: Address comments 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 side-by-side diff with in-line comments
Download patch
Index: ash/common/system/chromeos/palette/tools/capture_region_mode.h
diff --git a/ash/common/system/chromeos/palette/tools/capture_region_action.h b/ash/common/system/chromeos/palette/tools/capture_region_mode.h
similarity index 66%
rename from ash/common/system/chromeos/palette/tools/capture_region_action.h
rename to ash/common/system/chromeos/palette/tools/capture_region_mode.h
index a40365604811a8e13956f279c345c80d53fa41cf..fb9af50496e7262af42f5b056414c089403a4eda 100644
--- a/ash/common/system/chromeos/palette/tools/capture_region_action.h
+++ b/ash/common/system/chromeos/palette/tools/capture_region_mode.h
@@ -7,25 +7,32 @@
#include "ash/ash_export.h"
#include "ash/common/system/chromeos/palette/common_palette_tool.h"
+#include "base/memory/weak_ptr.h"
namespace ash {
-class ASH_EXPORT CaptureRegionAction : public CommonPaletteTool {
+class ASH_EXPORT CaptureRegionMode : public CommonPaletteTool {
public:
- explicit CaptureRegionAction(Delegate* delegate);
- ~CaptureRegionAction() override;
+ explicit CaptureRegionMode(Delegate* delegate);
+ ~CaptureRegionMode() override;
private:
// PaletteTool:
PaletteGroup GetGroup() const override;
PaletteToolId GetToolId() const override;
+ gfx::VectorIconId GetActiveTrayIcon() override;
void OnEnable() override;
+ void OnDisable() override;
views::View* CreateView() override;
// CommonPaletteTool:
gfx::VectorIconId GetPaletteIconId() override;
- DISALLOW_COPY_AND_ASSIGN(CaptureRegionAction);
+ void OnScreenshotDone();
+
+ base::WeakPtrFactory<CaptureRegionMode> weak_factory_;
+
+ DISALLOW_COPY_AND_ASSIGN(CaptureRegionMode);
};
} // namespace ash

Powered by Google App Engine
This is Rietveld 408576698