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

Unified Diff: ash/accelerators/accelerator_controller_delegate_aura.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
Index: ash/accelerators/accelerator_controller_delegate_aura.h
diff --git a/ash/accelerators/accelerator_controller_delegate_aura.h b/ash/accelerators/accelerator_controller_delegate_aura.h
new file mode 100644
index 0000000000000000000000000000000000000000..06d9bceb59e274f53b128a531b5a308ae6e6f0c0
--- /dev/null
+++ b/ash/accelerators/accelerator_controller_delegate_aura.h
@@ -0,0 +1,51 @@
+// 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.
+
+#ifndef ASH_ACCELERATORS_ACCELERATOR_HANDLER_AURA_H_
+#define ASH_ACCELERATORS_ACCELERATOR_HANDLER_AURA_H_
+
+#include <memory>
+
+#include "ash/accelerators/accelerator_controller_delegate.h"
+#include "base/macros.h"
+
+namespace ash {
+
+class ScreenshotDelegate;
+
+// Contains all the accelerators that have dependencies on portions of ash
+// not yet converted to ash/common.
+class ASH_EXPORT AcceleratorControllerDelegateAura
+ : public AcceleratorControllerDelegate {
+ public:
+ AcceleratorControllerDelegateAura();
+ ~AcceleratorControllerDelegateAura() override;
+
+ void SetScreenshotDelegate(
+ std::unique_ptr<ScreenshotDelegate> screenshot_delegate);
+ ScreenshotDelegate* screenshot_delegate() {
+ return screenshot_delegate_.get();
+ }
+
+ // AcceleratorControllerDelegate:
+ bool HandlesAction(AcceleratorAction action) override;
+ bool CanPerformAction(AcceleratorAction action,
+ const ui::Accelerator& accelerator,
+ const ui::Accelerator& previous_accelerator) override;
+ void PerformAction(AcceleratorAction action,
+ const ui::Accelerator& accelerator) override;
+ void ShowDeprecatedAcceleratorNotification(const char* const notification_id,
+ int message_id,
+ int old_shortcut_id,
+ int new_shortcut_id) override;
+
+ private:
+ std::unique_ptr<ScreenshotDelegate> screenshot_delegate_;
+
+ DISALLOW_COPY_AND_ASSIGN(AcceleratorControllerDelegateAura);
+};
+
+} // namespace ash
+
+#endif // ASH_ACCELERATORS_ACCELERATOR_HANDLER_AURA_H_
« no previous file with comments | « ash/accelerators/accelerator_controller_delegate.h ('k') | ash/accelerators/accelerator_controller_delegate_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698