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

Unified Diff: ui/base/accelerators/accelerator_manager_delegate.h

Issue 2177983002: Adds AcceleratorManagerDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleanup 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 | « ui/base/accelerators/accelerator_manager.cc ('k') | ui/base/accelerators/accelerator_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/accelerators/accelerator_manager_delegate.h
diff --git a/ui/base/accelerators/accelerator_manager_delegate.h b/ui/base/accelerators/accelerator_manager_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..e3c6d9ccf6e53ebee773c721a1374ae0b03e18c0
--- /dev/null
+++ b/ui/base/accelerators/accelerator_manager_delegate.h
@@ -0,0 +1,31 @@
+// 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 UI_BASE_ACCELERATORS_ACCELERATOR_MANAGER_DELEGATE_H_
+#define UI_BASE_ACCELERATORS_ACCELERATOR_MANAGER_DELEGATE_H_
+
+#include "ui/base/ui_base_export.h"
+
+namespace ui {
+
+class Accelerator;
+
+class UI_BASE_EXPORT AcceleratorManagerDelegate {
+ public:
+ // Called the first time a target is registered for |accelerator|. This is
+ // only called the first time a target is registered for a unique accelerator.
+ // For example, if Register() is called twice with the same accelerator
+ // this is called only for the first call.
+ virtual void OnAcceleratorRegistered(const Accelerator& accelerator) = 0;
+
+ // Called when there no more targets are registered for |accelerator|.
+ virtual void OnAcceleratorUnregistered(const Accelerator& accelerator) = 0;
+
+ protected:
+ virtual ~AcceleratorManagerDelegate() {}
+};
+
+} // namespace ui
+
+#endif // UI_BASE_ACCELERATORS_ACCELERATOR_MANAGER_DELEGATE_H_
« no previous file with comments | « ui/base/accelerators/accelerator_manager.cc ('k') | ui/base/accelerators/accelerator_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698