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 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
13 #include "base/sequenced_task_runner.h" | 13 #include "base/sequenced_task_runner.h" |
14 #include "base/threading/thread_checker.h" | 14 #include "base/threading/thread_checker.h" |
15 #include "base/values.h" | 15 #include "base/values.h" |
16 #include "chromeos/ime/component_extension_ime_manager.h" | 16 #include "chromeos/ime/component_extension_ime_manager.h" |
17 | 17 |
18 class Profile; | 18 class Profile; |
19 | 19 |
20 namespace chromeos { | 20 namespace chromeos { |
21 | 21 |
22 // The implementation class of ComponentExtensionIMEManagerDelegate. | 22 // The implementation class of ComponentExtensionIMEManagerDelegate. |
23 class ComponentExtensionIMEManagerImpl | 23 class ComponentExtensionIMEManagerImpl |
24 : public ComponentExtensionIMEManagerDelegate { | 24 : public ComponentExtensionIMEManagerDelegate { |
25 public: | 25 public: |
26 ComponentExtensionIMEManagerImpl(); | 26 ComponentExtensionIMEManagerImpl(); |
27 virtual ~ComponentExtensionIMEManagerImpl(); | 27 virtual ~ComponentExtensionIMEManagerImpl(); |
28 | 28 |
29 // ComponentExtensionIMEManagerDelegate overrides: | 29 // ComponentExtensionIMEManagerDelegate overrides: |
30 virtual std::vector<ComponentExtensionIME> ListIME() OVERRIDE; | 30 virtual std::vector<ComponentExtensionIME> ListIME() override; |
31 virtual void Load(Profile* profile, | 31 virtual void Load(Profile* profile, |
32 const std::string& extension_id, | 32 const std::string& extension_id, |
33 const std::string& manifest, | 33 const std::string& manifest, |
34 const base::FilePath& file_path) OVERRIDE; | 34 const base::FilePath& file_path) override; |
35 virtual void Unload(Profile* profile, | 35 virtual void Unload(Profile* profile, |
36 const std::string& extension_id, | 36 const std::string& extension_id, |
37 const base::FilePath& file_path) OVERRIDE; | 37 const base::FilePath& file_path) override; |
38 | 38 |
39 private: | 39 private: |
40 // Reads component extensions and extract their localized information: name, | 40 // Reads component extensions and extract their localized information: name, |
41 // description and ime id. This function fills them into |out_imes|. | 41 // description and ime id. This function fills them into |out_imes|. |
42 static void ReadComponentExtensionsInfo( | 42 static void ReadComponentExtensionsInfo( |
43 std::vector<ComponentExtensionIME>* out_imes); | 43 std::vector<ComponentExtensionIME>* out_imes); |
44 | 44 |
45 // Parses manifest string to manifest json dictionary value. | 45 // Parses manifest string to manifest json dictionary value. |
46 static scoped_ptr<base::DictionaryValue> GetManifest( | 46 static scoped_ptr<base::DictionaryValue> GetManifest( |
47 const std::string& manifest_string); | 47 const std::string& manifest_string); |
(...skipping 15 matching lines...) Expand all Loading... |
63 // The list of component extension IME. | 63 // The list of component extension IME. |
64 std::vector<ComponentExtensionIME> component_extension_list_; | 64 std::vector<ComponentExtensionIME> component_extension_list_; |
65 | 65 |
66 DISALLOW_COPY_AND_ASSIGN(ComponentExtensionIMEManagerImpl); | 66 DISALLOW_COPY_AND_ASSIGN(ComponentExtensionIMEManagerImpl); |
67 }; | 67 }; |
68 | 68 |
69 } // namespace chromeos | 69 } // namespace chromeos |
70 | 70 |
71 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_COMPONENT_EXTENSION_IME_MANAGER_
IMPL_H_ | 71 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_COMPONENT_EXTENSION_IME_MANAGER_
IMPL_H_ |
72 | 72 |
OLD | NEW |