| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/extensions/extension_input_ime_api.h" | 5 #include "chrome/browser/extensions/extension_input_ime_api.h" |
| 6 | 6 |
| 7 #include "base/json/json_writer.h" | 7 #include "base/json/json_writer.h" |
| 8 #include "base/string_number_conversions.h" | 8 #include "base/string_number_conversions.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "chrome/browser/chromeos/input_method/input_method_engine.h" | 10 #include "chrome/browser/chromeos/input_method/input_method_engine.h" |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 } | 161 } |
| 162 } | 162 } |
| 163 | 163 |
| 164 return true; | 164 return true; |
| 165 } | 165 } |
| 166 | 166 |
| 167 } | 167 } |
| 168 | 168 |
| 169 namespace events { | 169 namespace events { |
| 170 | 170 |
| 171 const char kOnActivate[] = "experimental.input.onActivate"; | 171 const char kOnActivate[] = "experimental.input.ime.onActivate"; |
| 172 const char kOnDeactivated[] = "experimental.input.onDeactivated"; | 172 const char kOnDeactivated[] = "experimental.input.ime.onDeactivated"; |
| 173 const char kOnFocus[] = "experimental.input.onFocus"; | 173 const char kOnFocus[] = "experimental.input.ime.onFocus"; |
| 174 const char kOnBlur[] = "experimental.input.onBlur"; | 174 const char kOnBlur[] = "experimental.input.ime.onBlur"; |
| 175 const char kOnInputContextUpdate[] = "experimental.input.onInputContextUpdate"; | 175 const char kOnInputContextUpdate[] = |
| 176 const char kOnKeyEvent[] = "experimental.input.onKeyEvent"; | 176 "experimental.input.ime.onInputContextUpdate"; |
| 177 const char kOnCandidateClicked[] = "experimental.input.onCandidateClicked"; | 177 const char kOnKeyEvent[] = "experimental.input.ime.onKeyEvent"; |
| 178 const char kOnMenuItemActivated[] = "experimental.input.onMenuItemActivated"; | 178 const char kOnCandidateClicked[] = "experimental.input.ime.onCandidateClicked"; |
| 179 const char kOnMenuItemActivated[] = |
| 180 "experimental.input.ime.onMenuItemActivated"; |
| 179 | 181 |
| 180 } // namespace events | 182 } // namespace events |
| 181 | 183 |
| 182 namespace chromeos { | 184 namespace chromeos { |
| 183 class ImeObserver : public chromeos::InputMethodEngine::Observer { | 185 class ImeObserver : public chromeos::InputMethodEngine::Observer { |
| 184 public: | 186 public: |
| 185 ImeObserver(Profile* profile, const std::string& extension_id, | 187 ImeObserver(Profile* profile, const std::string& extension_id, |
| 186 const std::string& engine_id) : | 188 const std::string& engine_id) : |
| 187 profile_(profile), | 189 profile_(profile), |
| 188 extension_id_(extension_id), | 190 extension_id_(extension_id), |
| (...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 849 | 851 |
| 850 bool handled = false; | 852 bool handled = false; |
| 851 EXTENSION_FUNCTION_VALIDATE(args_->GetBoolean(1, &handled)); | 853 EXTENSION_FUNCTION_VALIDATE(args_->GetBoolean(1, &handled)); |
| 852 | 854 |
| 853 ExtensionInputImeEventRouter::GetInstance()->OnEventHandled( | 855 ExtensionInputImeEventRouter::GetInstance()->OnEventHandled( |
| 854 extension_id(), request_id_str, handled); | 856 extension_id(), request_id_str, handled); |
| 855 | 857 |
| 856 return true; | 858 return true; |
| 857 } | 859 } |
| 858 #endif | 860 #endif |
| OLD | NEW |