Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / ui / base / ime / input_method_mac.h
blob3a259b1a927e547060a75ca209ea0e72cb088bb1
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
3 // found in the LICENSE file.
5 #ifndef UI_BASE_IME_INPUT_METHOD_MAC_H_
6 #define UI_BASE_IME_INPUT_METHOD_MAC_H_
8 #include "ui/base/ime/input_method_base.h"
10 namespace ui {
12 // A ui::InputMethod implementation for Mac.
13 // On the Mac, key events don't pass through InputMethod.
14 // Instead, NSTextInputClient calls are bridged to the currently focused
15 // ui::TextInputClient object.
16 class UI_BASE_IME_EXPORT InputMethodMac : public InputMethodBase {
17 public:
18 explicit InputMethodMac(internal::InputMethodDelegate* delegate);
19 ~InputMethodMac() override;
21 // Overriden from InputMethod.
22 bool OnUntranslatedIMEMessage(const base::NativeEvent& event,
23 NativeEventResult* result) override;
24 bool DispatchKeyEvent(const ui::KeyEvent& event) override;
25 void OnCaretBoundsChanged(const TextInputClient* client) override;
26 void CancelComposition(const TextInputClient* client) override;
27 void OnInputLocaleChanged() override;
28 std::string GetInputLocale() override;
29 bool IsCandidatePopupOpen() const override;
31 private:
32 DISALLOW_COPY_AND_ASSIGN(InputMethodMac);
35 } // namespace ui
37 #endif // UI_BASE_IME_INPUT_METHOD_MAC_H_