| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // The header files provides APIs for monitoring and controlling input | 5 // The header files provides APIs for monitoring and controlling input |
| 6 // method UI status. The APIs encapsulate the APIs of IBus, the underlying | 6 // method UI status. The APIs encapsulate the APIs of IBus, the underlying |
| 7 // input method framework. | 7 // input method framework. |
| 8 | 8 |
| 9 #ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_IBUS_UI_CONTROLLER_H_ | 9 #ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_IBUS_UI_CONTROLLER_H_ |
| 10 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_IBUS_UI_CONTROLLER_H_ | 10 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_IBUS_UI_CONTROLLER_H_ |
| 11 #pragma once | 11 #pragma once |
| 12 | 12 |
| 13 #include <string> | 13 #include <string> |
| 14 #include <vector> | 14 #include <vector> |
| 15 | 15 |
| 16 #include "base/basictypes.h" | 16 #include "base/basictypes.h" |
| 17 #include "base/observer_list.h" | 17 #include "base/observer_list.h" |
| 18 #include "third_party/mozc/session/candidates_lite.pb.h" | 18 #include "third_party/mozc/session/candidates_lite.pb.h" |
| 19 | 19 |
| 20 namespace gfx { |
| 21 class Rect; |
| 22 } // namespace gfx |
| 23 |
| 20 namespace chromeos { | 24 namespace chromeos { |
| 21 namespace input_method { | 25 namespace input_method { |
| 22 | 26 |
| 23 // A key for attaching the |ibus_service_panel_| object to |ibus_|. | 27 // A key for attaching the |ibus_service_panel_| object to |ibus_|. |
| 24 const char kPanelObjectKey[] = "panel-object"; | 28 const char kPanelObjectKey[] = "panel-object"; |
| 25 | 29 |
| 26 class InputMethodDescriptor; | 30 class InputMethodDescriptor; |
| 27 typedef std::vector<InputMethodDescriptor> InputMethodDescriptors; | 31 typedef std::vector<InputMethodDescriptor> InputMethodDescriptors; |
| 28 | 32 |
| 29 // The struct represents the input method lookup table (list of candidates). | 33 // The struct represents the input method lookup table (list of candidates). |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 // Called when the auxiliary text becomes hidden. | 82 // Called when the auxiliary text becomes hidden. |
| 79 virtual void OnHideAuxiliaryText() = 0; | 83 virtual void OnHideAuxiliaryText() = 0; |
| 80 | 84 |
| 81 // Called when the lookup table becomes hidden. | 85 // Called when the lookup table becomes hidden. |
| 82 virtual void OnHideLookupTable() = 0; | 86 virtual void OnHideLookupTable() = 0; |
| 83 | 87 |
| 84 // Called when the preedit text becomes hidden. | 88 // Called when the preedit text becomes hidden. |
| 85 virtual void OnHidePreeditText() = 0; | 89 virtual void OnHidePreeditText() = 0; |
| 86 | 90 |
| 87 // Called when the cursor location is set. | 91 // Called when the cursor location is set. |
| 88 virtual void OnSetCursorLocation(int x, int y, int width, int height) = 0; | 92 virtual void OnSetCursorLocation(const gfx::Rect& cusor_location, |
| 93 const gfx::Rect& composition_head) = 0; |
| 89 | 94 |
| 90 // Called when the auxiliary text is updated. | 95 // Called when the auxiliary text is updated. |
| 91 virtual void OnUpdateAuxiliaryText(const std::string& text, | 96 virtual void OnUpdateAuxiliaryText(const std::string& text, |
| 92 bool visible) = 0; | 97 bool visible) = 0; |
| 93 | 98 |
| 94 // Called when the lookup table is updated. | 99 // Called when the lookup table is updated. |
| 95 virtual void OnUpdateLookupTable(const InputMethodLookupTable& table) = 0; | 100 virtual void OnUpdateLookupTable(const InputMethodLookupTable& table) = 0; |
| 96 | 101 |
| 97 // Called when the preedit text is updated. | 102 // Called when the preedit text is updated. |
| 98 virtual void OnUpdatePreeditText(const std::string& utf8_text, | 103 virtual void OnUpdatePreeditText(const std::string& utf8_text, |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 virtual void NotifyPageDown() = 0; | 149 virtual void NotifyPageDown() = 0; |
| 145 }; | 150 }; |
| 146 | 151 |
| 147 bool IsActiveForTesting(const std::string& input_method_id, | 152 bool IsActiveForTesting(const std::string& input_method_id, |
| 148 const InputMethodDescriptors* descriptors); | 153 const InputMethodDescriptors* descriptors); |
| 149 | 154 |
| 150 } // namespace input_method | 155 } // namespace input_method |
| 151 } // namespace chromeos | 156 } // namespace chromeos |
| 152 | 157 |
| 153 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_IBUS_UI_CONTROLLER_H_ | 158 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_IBUS_UI_CONTROLLER_H_ |
| OLD | NEW |