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 #ifndef CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 void OnReset(const std::string& component_id) override; | 58 void OnReset(const std::string& component_id) override; |
59 void OnDeactivated(const std::string& component_id) override; | 59 void OnDeactivated(const std::string& component_id) override; |
60 void OnCompositionBoundsChanged( | 60 void OnCompositionBoundsChanged( |
61 const std::vector<gfx::Rect>& bounds) override; | 61 const std::vector<gfx::Rect>& bounds) override; |
62 bool IsInterestedInKeyEvent() const override; | 62 bool IsInterestedInKeyEvent() const override; |
63 void OnSurroundingTextChanged(const std::string& component_id, | 63 void OnSurroundingTextChanged(const std::string& component_id, |
64 const std::string& text, | 64 const std::string& text, |
65 int cursor_pos, | 65 int cursor_pos, |
66 int anchor_pos, | 66 int anchor_pos, |
67 int offset_pos) override; | 67 int offset_pos) override; |
| 68 void OnRequestEngineSwitch() override {}; |
68 | 69 |
69 protected: | 70 protected: |
70 // Helper function used to forward the given event to the |profile_|'s event | 71 // Helper function used to forward the given event to the |profile_|'s event |
71 // router, which dipatches the event the extension with |extension_id_|. | 72 // router, which dipatches the event the extension with |extension_id_|. |
72 virtual void DispatchEventToExtension( | 73 virtual void DispatchEventToExtension( |
73 extensions::events::HistogramValue histogram_value, | 74 extensions::events::HistogramValue histogram_value, |
74 const std::string& event_name, | 75 const std::string& event_name, |
75 std::unique_ptr<base::ListValue> args) = 0; | 76 std::unique_ptr<base::ListValue> args) = 0; |
76 | 77 |
77 // Returns the type of the current screen. | 78 // Returns the type of the current screen. |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 extension_registry_observer_; | 212 extension_registry_observer_; |
212 | 213 |
213 content::NotificationRegistrar registrar_; | 214 content::NotificationRegistrar registrar_; |
214 }; | 215 }; |
215 | 216 |
216 InputImeEventRouter* GetInputImeEventRouter(Profile* profile); | 217 InputImeEventRouter* GetInputImeEventRouter(Profile* profile); |
217 | 218 |
218 } // namespace extensions | 219 } // namespace extensions |
219 | 220 |
220 #endif // CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_H_ | 221 #endif // CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_H_ |
OLD | NEW |