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

Side by Side Diff: chrome/browser/extensions/unpacked_installer.h

Issue 11054006: Make application shortcuts point to app_host.exe, install App Host during app installation. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Moving quick-enable-app-host feature; adding App Host install code for unpacked extension installer. Created 8 years, 2 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_EXTENSIONS_UNPACKED_INSTALLER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_UNPACKED_INSTALLER_H_
6 #define CHROME_BROWSER_EXTENSIONS_UNPACKED_INSTALLER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_UNPACKED_INSTALLER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/file_path.h" 11 #include "base/file_path.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
15 #include "chrome/browser/extensions/app_host_installer.h"
15 16
16 class ExtensionService; 17 class ExtensionService;
17 18
18 namespace extensions { 19 namespace extensions {
19 20
20 class Extension; 21 class Extension;
21 class RequirementsChecker; 22 class RequirementsChecker;
22 23
23 // Installs and loads an unpacked extension. Because internal state needs to be 24 // Installs and loads an unpacked extension. Because internal state needs to be
24 // held about the instalation process, only one call to Load*() should be made 25 // held about the instalation process, only one call to Load*() should be made
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 void GetAbsolutePath(); 81 void GetAbsolutePath();
81 void CheckExtensionFileAccess(); 82 void CheckExtensionFileAccess();
82 void LoadWithFileAccess(int flags); 83 void LoadWithFileAccess(int flags);
83 84
84 // Notify the frontend that there was an error loading an extension. 85 // Notify the frontend that there was an error loading an extension.
85 void ReportExtensionLoadError(const std::string& error); 86 void ReportExtensionLoadError(const std::string& error);
86 87
87 // Called when an unpacked extension has been loaded and installed. 88 // Called when an unpacked extension has been loaded and installed.
88 void OnLoaded(); 89 void OnLoaded();
89 90
91 // Callback founction for AppHostInstaller.
erikwright (departed) 2012/10/03 20:57:07 founction
huangs 2012/10/04 00:53:14 Done (oops).
92 void OnAppHostInstallation(bool success);
93
94 void CompleteInstall();
95
90 // Helper to get the Extension::CreateFlags for the installing extension. 96 // Helper to get the Extension::CreateFlags for the installing extension.
91 int GetFlags(); 97 int GetFlags();
92 98
93 base::WeakPtr<ExtensionService> service_weak_; 99 base::WeakPtr<ExtensionService> service_weak_;
94 100
95 // The pathname of the directory to load from, which is an absolute path 101 // The pathname of the directory to load from, which is an absolute path
96 // after GetAbsolutePath has been called. 102 // after GetAbsolutePath has been called.
97 FilePath extension_path_; 103 FilePath extension_path_;
98 104
99 // If true and the extension contains plugins, we prompt the user before 105 // If true and the extension contains plugins, we prompt the user before
100 // loading. 106 // loading.
101 bool prompt_for_plugins_; 107 bool prompt_for_plugins_;
102 108
103 scoped_ptr<RequirementsChecker> requirements_checker_; 109 scoped_ptr<RequirementsChecker> requirements_checker_;
104 110
105 scoped_refptr<const Extension> extension_; 111 scoped_refptr<const Extension> extension_;
106 112
107 // Whether to require the extension installed to have a modern manifest 113 // Whether to require the extension installed to have a modern manifest
108 // version. 114 // version.
109 bool require_modern_manifest_version_; 115 bool require_modern_manifest_version_;
110 116
117 // Helper to install App Host.
118 AppHostInstaller app_host_installer_;
119
111 DISALLOW_COPY_AND_ASSIGN(UnpackedInstaller); 120 DISALLOW_COPY_AND_ASSIGN(UnpackedInstaller);
112 }; 121 };
113 122
114 } // namespace extensions 123 } // namespace extensions
115 124
116 #endif // CHROME_BROWSER_EXTENSIONS_UNPACKED_INSTALLER_H_ 125 #endif // CHROME_BROWSER_EXTENSIONS_UNPACKED_INSTALLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698