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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 | 68 |
69 protected: | 69 protected: |
70 // Helper function used to forward the given event to the |profile_|'s event | 70 // Helper function used to forward the given event to the |profile_|'s event |
71 // router, which dipatches the event the extension with |extension_id_|. | 71 // router, which dipatches the event the extension with |extension_id_|. |
72 virtual void DispatchEventToExtension( | 72 virtual void DispatchEventToExtension( |
73 extensions::events::HistogramValue histogram_value, | 73 extensions::events::HistogramValue histogram_value, |
74 const std::string& event_name, | 74 const std::string& event_name, |
75 scoped_ptr<base::ListValue> args) = 0; | 75 std::unique_ptr<base::ListValue> args) = 0; |
76 | 76 |
77 // Returns the type of the current screen. | 77 // Returns the type of the current screen. |
78 virtual std::string GetCurrentScreenType() = 0; | 78 virtual std::string GetCurrentScreenType() = 0; |
79 | 79 |
80 // Returns true if the extension is ready to accept key event, otherwise | 80 // Returns true if the extension is ready to accept key event, otherwise |
81 // returns false. | 81 // returns false. |
82 bool ShouldForwardKeyEvent() const; | 82 bool ShouldForwardKeyEvent() const; |
83 | 83 |
84 // Returns true if there are any listeners on the given event. | 84 // Returns true if there are any listeners on the given event. |
85 bool HasListener(const std::string& event_name) const; | 85 bool HasListener(const std::string& event_name) const; |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 extension_registry_observer_; | 211 extension_registry_observer_; |
212 | 212 |
213 content::NotificationRegistrar registrar_; | 213 content::NotificationRegistrar registrar_; |
214 }; | 214 }; |
215 | 215 |
216 InputImeEventRouter* GetInputImeEventRouter(Profile* profile); | 216 InputImeEventRouter* GetInputImeEventRouter(Profile* profile); |
217 | 217 |
218 } // namespace extensions | 218 } // namespace extensions |
219 | 219 |
220 #endif // CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_H_ | 220 #endif // CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_H_ |
OLD | NEW |