| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_ACCESSIBILITY_ACCESSIBILITY_EXTENSION_LOADER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_ACCESSIBILITY_EXTENSION_LOADER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_ACCESSIBILITY_EXTENSION_LOADER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_ACCESSIBILITY_EXTENSION_LOADER_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| 11 | 11 |
| 12 namespace content { | 12 namespace content { |
| 13 class RenderViewHost; | 13 class RenderViewHost; |
| 14 } | 14 } |
| 15 | 15 |
| 16 class ExtensionService; | 16 class ExtensionService; |
| 17 class Profile; | 17 class Profile; |
| 18 | 18 |
| 19 namespace chromeos { | 19 namespace chromeos { |
| 20 | 20 |
| 21 class AccessibilityExtensionLoader { | 21 class AccessibilityExtensionLoader { |
| 22 public: | 22 public: |
| 23 AccessibilityExtensionLoader(const std::string& extension_id, | 23 AccessibilityExtensionLoader(const std::string& extension_id, |
| 24 const base::FilePath& extension_path, | 24 const base::FilePath& extension_path, |
| 25 const base::Closure& unload_callback); | 25 const base::Closure& unload_callback); |
| 26 ~AccessibilityExtensionLoader(); | 26 ~AccessibilityExtensionLoader(); |
| 27 | 27 |
| 28 void SetProfile(Profile* profile); | 28 void SetProfile(Profile* profile, const base::Closure& done_callback); |
| 29 void Load(Profile* profile, | 29 void Load(Profile* profile, |
| 30 const std::string& init_script_str, | 30 const std::string& init_script_str, |
| 31 const base::Closure& done_cb); | 31 const base::Closure& done_cb); |
| 32 void Unload(); | 32 void Unload(); |
| 33 void LoadToUserScreen(const base::Closure& done_cb); | 33 void LoadToUserScreen(const base::Closure& done_cb); |
| 34 void LoadToLockScreen(const base::Closure& done_cb); | 34 void LoadToLockScreen(const base::Closure& done_cb); |
| 35 void LoadExtension(Profile* profile, | 35 void LoadExtension(Profile* profile, |
| 36 content::RenderViewHost* render_view_host, | 36 content::RenderViewHost* render_view_host, |
| 37 base::Closure done_cb); | 37 base::Closure done_cb); |
| 38 | 38 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 59 base::Closure unload_callback_; | 59 base::Closure unload_callback_; |
| 60 | 60 |
| 61 base::WeakPtrFactory<AccessibilityExtensionLoader> weak_ptr_factory_; | 61 base::WeakPtrFactory<AccessibilityExtensionLoader> weak_ptr_factory_; |
| 62 | 62 |
| 63 DISALLOW_COPY_AND_ASSIGN(AccessibilityExtensionLoader); | 63 DISALLOW_COPY_AND_ASSIGN(AccessibilityExtensionLoader); |
| 64 }; | 64 }; |
| 65 | 65 |
| 66 } // namespace chromeos | 66 } // namespace chromeos |
| 67 | 67 |
| 68 #endif // CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_ACCESSIBILITY_EXTENSION_LOADER_
H_ | 68 #endif // CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_ACCESSIBILITY_EXTENSION_LOADER_
H_ |
| OLD | NEW |