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

Unified Diff: ash/accelerators/accelerator_controller.h

Issue 2162193003: Separates out accelerators using non-common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@accelerators
Patch Set: sim=20 Created 4 years, 5 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/accelerators/accelerator_commands_unittest.cc ('k') | ash/accelerators/accelerator_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/accelerators/accelerator_controller.h
diff --git a/ash/accelerators/accelerator_controller.h b/ash/accelerators/accelerator_controller.h
index d6cd74f76b11653ddbeb9d229994da16fb5b6533..03bc2f5aaae1021cf3abb78ac02ab280f261d048 100644
--- a/ash/accelerators/accelerator_controller.h
+++ b/ash/accelerators/accelerator_controller.h
@@ -27,9 +27,9 @@ class AcceleratorManager;
namespace ash {
struct AcceleratorData;
+class AcceleratorControllerDelegate;
class ExitWarningHandler;
class ImeControlDelegate;
-class ScreenshotDelegate;
class VolumeControlDelegate;
// AcceleratorController provides functions for registering or unregistering
@@ -37,7 +37,7 @@ class VolumeControlDelegate;
// also implements several handlers as an accelerator target.
class ASH_EXPORT AcceleratorController : public ui::AcceleratorTarget {
public:
- AcceleratorController();
+ explicit AcceleratorController(AcceleratorControllerDelegate* delegate);
~AcceleratorController() override;
// A list of possible ways in which an accelerator should be restricted before
@@ -101,11 +101,6 @@ class ASH_EXPORT AcceleratorController : public ui::AcceleratorTarget {
void SetImeControlDelegate(
std::unique_ptr<ImeControlDelegate> ime_control_delegate);
- void SetScreenshotDelegate(
- std::unique_ptr<ScreenshotDelegate> screenshot_delegate);
- ScreenshotDelegate* screenshot_delegate() {
- return screenshot_delegate_.get();
- }
// Provides access to the ExitWarningHandler for testing.
ExitWarningHandler* GetExitWarningHandlerForTest() {
@@ -159,13 +154,14 @@ class ASH_EXPORT AcceleratorController : public ui::AcceleratorTarget {
AcceleratorProcessingRestriction GetAcceleratorProcessingRestriction(
int action);
+ AcceleratorControllerDelegate* delegate_;
+
std::unique_ptr<ui::AcceleratorManager> accelerator_manager_;
// A tracker for the current and previous accelerators.
std::unique_ptr<ui::AcceleratorHistory> accelerator_history_;
std::unique_ptr<ImeControlDelegate> ime_control_delegate_;
- std::unique_ptr<ScreenshotDelegate> screenshot_delegate_;
// Handles the exit accelerator which requires a double press to exit and
// shows a popup with an explanation.
« no previous file with comments | « ash/accelerators/accelerator_commands_unittest.cc ('k') | ash/accelerators/accelerator_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698