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

Unified Diff: ui/wm/core/accelerator_delegate.h

Issue 308193002: Simplify AcceleratorDelegate interface (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
Index: ui/wm/core/accelerator_delegate.h
diff --git a/ui/wm/core/accelerator_delegate.h b/ui/wm/core/accelerator_delegate.h
index dccabda2e7bebaa142536bb04236c47120f3d6c7..72ec0a0ae34977d13c243ad7aa274124fa33bc9f 100644
--- a/ui/wm/core/accelerator_delegate.h
+++ b/ui/wm/core/accelerator_delegate.h
@@ -16,20 +16,19 @@ class AcceleratorDelegate {
public:
virtual ~AcceleratorDelegate() {}
+ // Type of keys that triggers accelerators.
+ enum KeyType {
+ SYSTEM_KEYS,
sky 2014/05/30 20:27:40 KEY_TYPE_SYSTEM
+ NORMAL_KEYS,
sky 2014/05/30 20:27:40 KEY_TYPE_NORMAL, or maybe KEY_TYPE_NON_SYSTEM or e
+ };
+
// TODO(oshima): Move the repeat detection to AcceleratorFilter.
virtual void PreProcessAccelerator(const ui::Accelerator& accelerator) = 0;
- // Returns true if the window should be allowed a chance to handle
- // system keys.
- virtual bool CanConsumeSystemKeys(const ui::KeyEvent& event) = 0;
-
- // Returns true if the |accelerator| should be processed.
- virtual bool ShouldProcessAcceleratorNow(
- const ui::KeyEvent& key_event,
- const ui::Accelerator& accelerator) = 0;
-
// Return true if the |accelerator| has been processed.
- virtual bool ProcessAccelerator(const ui::Accelerator& accelerator) = 0;
+ virtual bool ProcessAccelerator(const ui::KeyEvent& event,
+ const ui::Accelerator& accelerator,
+ KeyType key_type) = 0;
};
} // namespace wm

Powered by Google App Engine
This is Rietveld 408576698