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

Side by Side Diff: ui/base/ime/input_method_mac.h

Issue 312523003: MacViews: Implement a ui::InputMethod for Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_BASE_IME_INPUT_METHOD_MINIMAL_H_ 5 #ifndef UI_BASE_IME_INPUT_METHOD_MAC_H_
6 #define UI_BASE_IME_INPUT_METHOD_MINIMAL_H_ 6 #define UI_BASE_IME_INPUT_METHOD_MAC_H_
7 7
8 #include "ui/base/ime/input_method_base.h" 8 #include "ui/base/ime/input_method_base.h"
9 9
10 namespace ui { 10 namespace ui {
11 11
12 // A minimal implementation of ui::InputMethod, which supports only the direct 12 // A ui::InputMethod implementation for Mac.
13 // input without any compositions or conversions. 13 // On the Mac, key events don't pass through InputMethod.
14 class UI_BASE_EXPORT InputMethodMinimal : public InputMethodBase { 14 // Instead, NSTextInputClient calls are bridged to the currently focused
15 // ui::TextInputClient object.
16 class UI_BASE_EXPORT InputMethodMac : public InputMethodBase {
15 public: 17 public:
16 explicit InputMethodMinimal(internal::InputMethodDelegate* delegate); 18 explicit InputMethodMac(internal::InputMethodDelegate* delegate);
17 virtual ~InputMethodMinimal(); 19 virtual ~InputMethodMac();
18 20
19 // Overriden from InputMethod. 21 // Overriden from InputMethod.
20 virtual bool OnUntranslatedIMEMessage(const base::NativeEvent& event, 22 virtual bool OnUntranslatedIMEMessage(const base::NativeEvent& event,
21 NativeEventResult* result) OVERRIDE; 23 NativeEventResult* result) OVERRIDE;
22 virtual bool DispatchKeyEvent(const ui::KeyEvent& event) OVERRIDE; 24 virtual bool DispatchKeyEvent(const ui::KeyEvent& event) OVERRIDE;
23 virtual void OnCaretBoundsChanged(const TextInputClient* client) OVERRIDE; 25 virtual void OnCaretBoundsChanged(const TextInputClient* client) OVERRIDE;
24 virtual void CancelComposition(const TextInputClient* client) OVERRIDE; 26 virtual void CancelComposition(const TextInputClient* client) OVERRIDE;
25 virtual void OnInputLocaleChanged() OVERRIDE; 27 virtual void OnInputLocaleChanged() OVERRIDE;
26 virtual std::string GetInputLocale() OVERRIDE; 28 virtual std::string GetInputLocale() OVERRIDE;
27 virtual bool IsActive() OVERRIDE; 29 virtual bool IsActive() OVERRIDE;
28 virtual bool IsCandidatePopupOpen() const OVERRIDE; 30 virtual bool IsCandidatePopupOpen() const OVERRIDE;
29 31
30 private: 32 private:
31 DISALLOW_COPY_AND_ASSIGN(InputMethodMinimal); 33 DISALLOW_COPY_AND_ASSIGN(InputMethodMac);
32 }; 34 };
33 35
34 } // namespace ui 36 } // namespace ui
35 37
36 #endif // UI_BASE_IME_INPUT_METHOD_MINIMAL_H_ 38 #endif // UI_BASE_IME_INPUT_METHOD_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698