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

Side by Side Diff: mandoline/ui/aura/input_method_mandoline.h

Issue 1286383003: Mandoline: Enable Android software keyboard for the Omnibox. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update Created 5 years, 4 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
OLDNEW
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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 #include "ui/base/ime/input_method_base.h" 5 #include "ui/base/ime/input_method_base.h"
6 6
7 #ifndef MANDOLINE_UI_AURA_INPUT_METHOD_MANDOLINE_H_ 7 #ifndef MANDOLINE_UI_AURA_INPUT_METHOD_MANDOLINE_H_
8 #define MANDOLINE_UI_AURA_INPUT_METHOD_MANDOLINE_H_ 8 #define MANDOLINE_UI_AURA_INPUT_METHOD_MANDOLINE_H_
9 9
10 namespace mojo {
11 class View;
12 };
sky 2015/08/14 19:59:23 no ;
Peng 2015/08/17 13:26:49 Done.
13
10 namespace mandoline { 14 namespace mandoline {
11 15
12 class InputMethodMandoline : public ui::InputMethodBase { 16 class InputMethodMandoline : public ui::InputMethodBase {
13 public: 17 public:
14 explicit InputMethodMandoline(ui::internal::InputMethodDelegate* delegate); 18 InputMethodMandoline(ui::internal::InputMethodDelegate* delegate,
19 mojo::View* view);
15 ~InputMethodMandoline() override; 20 ~InputMethodMandoline() override;
16 21
17 private: 22 private:
18 // Overridden from ui::InputMethod: 23 // Overridden from ui::InputMethod:
24 void OnFocus() override;
25 void OnBlur() override;
19 bool OnUntranslatedIMEMessage(const base::NativeEvent& event, 26 bool OnUntranslatedIMEMessage(const base::NativeEvent& event,
20 NativeEventResult* result) override; 27 NativeEventResult* result) override;
21 void DispatchKeyEvent(ui::KeyEvent* event) override; 28 void DispatchKeyEvent(ui::KeyEvent* event) override;
29 void OnTextInputTypeChanged(const ui::TextInputClient* client) override;
22 void OnCaretBoundsChanged(const ui::TextInputClient* client) override; 30 void OnCaretBoundsChanged(const ui::TextInputClient* client) override;
23 void CancelComposition(const ui::TextInputClient* client) override; 31 void CancelComposition(const ui::TextInputClient* client) override;
24 void OnInputLocaleChanged() override; 32 void OnInputLocaleChanged() override;
25 std::string GetInputLocale() override; 33 std::string GetInputLocale() override;
26 bool IsCandidatePopupOpen() const override; 34 bool IsCandidatePopupOpen() const override;
27 35
36 // Overridden from ui::InputMethodBase:
37 void OnWillChangeFocusedClient(ui::TextInputClient* focused_before,
38 ui::TextInputClient* focused) override;
39 void OnDidChangeFocusedClient(ui::TextInputClient* focused_before,
40 ui::TextInputClient* focused) override;
41
42 void UpdateTextInputType();
43
44 // The toplevel view which is not owned by this class.
45 mojo::View* view_;
46
28 DISALLOW_COPY_AND_ASSIGN(InputMethodMandoline); 47 DISALLOW_COPY_AND_ASSIGN(InputMethodMandoline);
29 }; 48 };
30 49
31 } // namespace mandoline 50 } // namespace mandoline
32 51
33 #endif // MANDOLINE_UI_AURA_INPUT_METHOD_MANDOLINE_H_ 52 #endif // MANDOLINE_UI_AURA_INPUT_METHOD_MANDOLINE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698