Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(240)

Side by Side Diff: chrome/browser/chromeos/input_method/component_extension_ime_manager_impl.h

Issue 495593004: Check the IME component extension's availability on linux_chromeos, so that system fallback VK can … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revised per comments. Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 10 matching lines...) Expand all
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 bool 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|.
(...skipping 14 matching lines...) Expand all
56 // kInputComponents key from manifest. This function returns true on success, 56 // kInputComponents key from manifest. This function returns true on success,
57 // otherwise retrun false. This function must be called on FILE thread. 57 // otherwise retrun false. This function must be called on FILE thread.
58 static bool ReadEngineComponent( 58 static bool ReadEngineComponent(
59 const ComponentExtensionIME& component_extension, 59 const ComponentExtensionIME& component_extension,
60 const base::DictionaryValue& dict, 60 const base::DictionaryValue& dict,
61 ComponentExtensionEngine* out); 61 ComponentExtensionEngine* out);
62 62
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 // For checking the function should be called on UI thread.
67 base::ThreadChecker thread_checker_;
68 base::WeakPtrFactory<ComponentExtensionIMEManagerImpl> weak_ptr_factory_;
69
70 DISALLOW_COPY_AND_ASSIGN(ComponentExtensionIMEManagerImpl); 66 DISALLOW_COPY_AND_ASSIGN(ComponentExtensionIMEManagerImpl);
71 }; 67 };
72 68
73 } // namespace chromeos 69 } // namespace chromeos
74 70
75 #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_
76 72
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698