| 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_COMPONENT_EXTENSION_IME_MANAGER_IMP
L_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_COMPONENT_EXTENSION_IME_MANAGER_IMP
L_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_COMPONENT_EXTENSION_IME_MANAGER_IMP
L_H_ | 6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_COMPONENT_EXTENSION_IME_MANAGER_IMP
L_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 | 56 |
| 57 // Reads manifest.json file in |file_path|. This function must be called on | 57 // Reads manifest.json file in |file_path|. This function must be called on |
| 58 // file thread. | 58 // file thread. |
| 59 static scoped_ptr<DictionaryValue> GetManifest( | 59 static scoped_ptr<DictionaryValue> GetManifest( |
| 60 const base::FilePath& file_path); | 60 const base::FilePath& file_path); |
| 61 | 61 |
| 62 // Reads extension information: description, option page. This function | 62 // Reads extension information: description, option page. This function |
| 63 // returns true on success, otherwise returns false. This function must be | 63 // returns true on success, otherwise returns false. This function must be |
| 64 // called on file thread. | 64 // called on file thread. |
| 65 static bool ReadExtensionInfo(const DictionaryValue& manifest, | 65 static bool ReadExtensionInfo(const DictionaryValue& manifest, |
| 66 ComponentExtensionIME* out); | 66 const std::string& extension_id, |
| 67 ComponentExtensionIME* out); |
| 67 | 68 |
| 68 // Reads each engine component in |dict|. |dict| is given by GetList with | 69 // Reads each engine component in |dict|. |dict| is given by GetList with |
| 69 // kInputComponents key from manifest. This function returns true on success, | 70 // kInputComponents key from manifest. This function returns true on success, |
| 70 // otherwise retrun false. This function must be called on file thread. | 71 // otherwise retrun false. This function must be called on file thread. |
| 71 static bool ReadEngineComponent(const DictionaryValue& dict, | 72 static bool ReadEngineComponent(const DictionaryValue& dict, |
| 72 IBusComponent::EngineDescription* out); | 73 IBusComponent::EngineDescription* out); |
| 73 | 74 |
| 74 // True if initialized. | 75 // True if initialized. |
| 75 bool is_initialized_; | 76 bool is_initialized_; |
| 76 | 77 |
| 77 // The list of component extension IME. | 78 // The list of component extension IME. |
| 78 std::vector<ComponentExtensionIME> component_extension_list_; | 79 std::vector<ComponentExtensionIME> component_extension_list_; |
| 79 | 80 |
| 80 // The list of already loaded extension ids. | 81 // The list of already loaded extension ids. |
| 81 std::set<std::string> loaded_extension_id_; | 82 std::set<std::string> loaded_extension_id_; |
| 82 | 83 |
| 83 base::ThreadChecker thread_checker_; | 84 base::ThreadChecker thread_checker_; |
| 84 base::WeakPtrFactory<ComponentExtensionIMEManagerImpl> weak_ptr_factory_; | 85 base::WeakPtrFactory<ComponentExtensionIMEManagerImpl> weak_ptr_factory_; |
| 85 | 86 |
| 86 DISALLOW_COPY_AND_ASSIGN(ComponentExtensionIMEManagerImpl); | 87 DISALLOW_COPY_AND_ASSIGN(ComponentExtensionIMEManagerImpl); |
| 87 }; | 88 }; |
| 88 | 89 |
| 89 } // namespace chromeos | 90 } // namespace chromeos |
| 90 | 91 |
| 91 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_COMPONENT_EXTENSION_IME_MANAGER_
IMPL_H_ | 92 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_COMPONENT_EXTENSION_IME_MANAGER_
IMPL_H_ |
| 92 | 93 |
| OLD | NEW |