| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 virtual void Disable() OVERRIDE; | 84 virtual void Disable() OVERRIDE; |
| 85 virtual void PropertyActivate(const std::string& property_name) OVERRIDE; | 85 virtual void PropertyActivate(const std::string& property_name) OVERRIDE; |
| 86 virtual void Reset() OVERRIDE; | 86 virtual void Reset() OVERRIDE; |
| 87 virtual void ProcessKeyEvent(const ui::KeyEvent& key_event, | 87 virtual void ProcessKeyEvent(const ui::KeyEvent& key_event, |
| 88 const KeyEventDoneCallback& callback) OVERRIDE; | 88 const KeyEventDoneCallback& callback) OVERRIDE; |
| 89 virtual void CandidateClicked(uint32 index) OVERRIDE; | 89 virtual void CandidateClicked(uint32 index) OVERRIDE; |
| 90 virtual void SetSurroundingText(const std::string& text, uint32 cursor_pos, | 90 virtual void SetSurroundingText(const std::string& text, uint32 cursor_pos, |
| 91 uint32 anchor_pos) OVERRIDE; | 91 uint32 anchor_pos) OVERRIDE; |
| 92 virtual void HideInputView() OVERRIDE; | 92 virtual void HideInputView() OVERRIDE; |
| 93 | 93 |
| 94 int GetCotextIdForTesting() { return context_id_; } |
| 95 |
| 94 private: | 96 private: |
| 95 void RecordHistogram(const char* name, int count); | |
| 96 | |
| 97 // Converts MenuItem to InputMethodMenuItem. | 97 // Converts MenuItem to InputMethodMenuItem. |
| 98 void MenuItemToProperty(const MenuItem& item, | 98 void MenuItemToProperty(const MenuItem& item, |
| 99 ash::ime::InputMethodMenuItem* property); | 99 ash::ime::InputMethodMenuItem* property); |
| 100 | 100 |
| 101 // Enables overriding input view page to Virtual Keyboard window. | 101 // Enables overriding input view page to Virtual Keyboard window. |
| 102 void EnableInputView(); | 102 void EnableInputView(); |
| 103 | 103 |
| 104 ui::TextInputType current_input_type_; | 104 ui::TextInputType current_input_type_; |
| 105 | 105 |
| 106 // ID that is used for the current input context. False if there is no focus. | 106 // ID that is used for the current input context. False if there is no focus. |
| (...skipping 26 matching lines...) Expand all Loading... |
| 133 | 133 |
| 134 // Mapping of candidate index to candidate id. | 134 // Mapping of candidate index to candidate id. |
| 135 std::vector<int> candidate_ids_; | 135 std::vector<int> candidate_ids_; |
| 136 | 136 |
| 137 // Mapping of candidate id to index. | 137 // Mapping of candidate id to index. |
| 138 std::map<int, int> candidate_indexes_; | 138 std::map<int, int> candidate_indexes_; |
| 139 | 139 |
| 140 // Used with SendKeyEvents and ProcessKeyEvent to check if the key event | 140 // Used with SendKeyEvents and ProcessKeyEvent to check if the key event |
| 141 // sent to ProcessKeyEvent is sent by SendKeyEvents. | 141 // sent to ProcessKeyEvent is sent by SendKeyEvents. |
| 142 const ui::KeyEvent* sent_key_event_; | 142 const ui::KeyEvent* sent_key_event_; |
| 143 | |
| 144 // The start & end time of using this input method. This is for UMA. | |
| 145 base::Time start_time_; | |
| 146 base::Time end_time_; | |
| 147 }; | 143 }; |
| 148 | 144 |
| 149 } // namespace chromeos | 145 } // namespace chromeos |
| 150 | 146 |
| 151 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_H_ | 147 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_H_ |
| OLD | NEW |