| Index: ui/wm/public/text_edit_key_bindings_delegate_x11.h
|
| diff --git a/ui/wm/public/text_edit_key_bindings_delegate_x11.h b/ui/wm/public/text_edit_key_bindings_delegate_x11.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..be91745cd8de64a72985a15d4078a886dc2aa3eb
|
| --- /dev/null
|
| +++ b/ui/wm/public/text_edit_key_bindings_delegate_x11.h
|
| @@ -0,0 +1,45 @@
|
| +// 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 UI_WM_PUBLIC_TEXT_EDIT_KEY_BINDINGS_DELEGATE_X11_H_
|
| +#define UI_WM_PUBLIC_TEXT_EDIT_KEY_BINDINGS_DELEGATE_X11_H_
|
| +
|
| +#include <vector>
|
| +
|
| +#include "ui/wm/core/wm_core_export.h"
|
| +
|
| +namespace ui {
|
| +class Event;
|
| +
|
| +namespace wm {
|
| +class TextEditCommandX11;
|
| +
|
| +// An interface which can interpret various text editing commands out of key
|
| +// events.
|
| +//
|
| +// On desktop Linux, we've traditionally supported the user's custom
|
| +// keybindings. We need to support this in both content/ and in views/.
|
| +class WM_CORE_EXPORT TextEditKeyBindingsDelegateX11 {
|
| + public:
|
| + // Matches a key event against the users' platform specific key bindings,
|
| + // false will be returned if the key event doesn't correspond to a predefined
|
| + // key binding. Edit commands matched with |event| will be stored in
|
| + // |edit_commands|, if |edit_commands| is non-NULL.
|
| + virtual bool MatchEvent(const ui::Event& event,
|
| + std::vector<TextEditCommandX11>* commands) = 0;
|
| +
|
| + protected:
|
| + virtual ~TextEditKeyBindingsDelegateX11() {}
|
| +};
|
| +
|
| +// Sets/Gets the global TextEditKeyBindingsDelegateX11. No ownership
|
| +// changes. Can be NULL.
|
| +WM_CORE_EXPORT void SetTextEditKeyBindingsDelegate(
|
| + TextEditKeyBindingsDelegateX11* delegate);
|
| +WM_CORE_EXPORT TextEditKeyBindingsDelegateX11* GetTextEditKeyBindingsDelegate();
|
| +
|
| +} // namespace wm
|
| +} // namespace ui
|
| +
|
| +#endif // UI_WM_PUBLIC_TEXT_EDIT_KEY_BINDINGS_DELEGATE_X11_H_
|
|
|