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

Unified Diff: ash/accelerators/accelerator_delegate.h

Issue 307533007: Move common accelerator code from ash to ui/wm/core (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | « no previous file | ash/accelerators/accelerator_delegate.cc » ('j') | ui/wm/core/accelerator_delegate.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/accelerators/accelerator_delegate.h
diff --git a/ash/accelerators/accelerator_delegate.h b/ash/accelerators/accelerator_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..d9d7b09c9492e29ef45adbc2eb190c3440d3bf26
--- /dev/null
+++ b/ash/accelerators/accelerator_delegate.h
@@ -0,0 +1,34 @@
+// Copyright 2014 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_DELEGATE_H_
+#define ASH_ACCELERATORS_ACCELERATOR_DELEGATE_H_
+
+#include "ash/ash_export.h"
+#include "base/macros.h"
+#include "ui/wm/core/accelerator_delegate.h"
+
+namespace ash {
+
+class ASH_EXPORT AcceleratorDelegate : public wm::AcceleratorDelegate {
+ public:
+ AcceleratorDelegate();
+ virtual ~AcceleratorDelegate();
+
+ // wm::AcceleratorDelegate:
+ virtual void PreProcessAccelerator(
+ const ui::Accelerator& accelerator) OVERRIDE;
+ virtual bool CanConsumeSystemKeys(const ui::KeyEvent& event) OVERRIDE;
+ virtual bool ShouldProcessAcceleratorNow(
+ const ui::KeyEvent& key_event,
+ const ui::Accelerator& accelerator) OVERRIDE;
+ virtual bool ProcessAccelerator(const ui::Accelerator& accelerator) OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(AcceleratorDelegate);
+};
+
+} // namespace ash
+
+#endif // ASH_ACCELERATORS_ACCELERATOR_DELEGATE_H_
« no previous file with comments | « no previous file | ash/accelerators/accelerator_delegate.cc » ('j') | ui/wm/core/accelerator_delegate.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698