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

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

Issue 5273004: Add "create Application Shortcut" to the app menu on NTP. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase for commit. Created 10 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_EXTENSION_PREFS_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_
7 #pragma once 7 #pragma once
8 8
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 // Returns true if the user enabled this extension to be loaded in incognito 151 // Returns true if the user enabled this extension to be loaded in incognito
152 // mode. 152 // mode.
153 bool IsIncognitoEnabled(const std::string& extension_id); 153 bool IsIncognitoEnabled(const std::string& extension_id);
154 void SetIsIncognitoEnabled(const std::string& extension_id, bool enabled); 154 void SetIsIncognitoEnabled(const std::string& extension_id, bool enabled);
155 155
156 // Returns true if the user has chosen to allow this extension to inject 156 // Returns true if the user has chosen to allow this extension to inject
157 // scripts into pages with file URLs. 157 // scripts into pages with file URLs.
158 bool AllowFileAccess(const std::string& extension_id); 158 bool AllowFileAccess(const std::string& extension_id);
159 void SetAllowFileAccess(const std::string& extension_id, bool allow); 159 void SetAllowFileAccess(const std::string& extension_id, bool allow);
160 160
161 ExtensionPrefs::LaunchType GetLaunchType(const std::string& extension_id); 161 // Get the launch type preference. If no preference is set, return
162 // |default_pref_value|.
163 LaunchType GetLaunchType(const std::string& extension_id,
164 LaunchType default_pref_value);
165
162 void SetLaunchType(const std::string& extension_id, LaunchType launch_type); 166 void SetLaunchType(const std::string& extension_id, LaunchType launch_type);
163 167
168 // Find the right launch container based on the launch type.
169 // If |extension|'s prefs do not have a launch type set, then
170 // use |default_pref_value|.
171 extension_misc::LaunchContainer GetLaunchContainer(
172 const Extension* extension,
173 LaunchType default_pref_value);
174
175
164 // Saves ExtensionInfo for each installed extension with the path to the 176 // Saves ExtensionInfo for each installed extension with the path to the
165 // version directory and the location. Blacklisted extensions won't be saved 177 // version directory and the location. Blacklisted extensions won't be saved
166 // and neither will external extensions the user has explicitly uninstalled. 178 // and neither will external extensions the user has explicitly uninstalled.
167 // Caller takes ownership of returned structure. 179 // Caller takes ownership of returned structure.
168 ExtensionsInfo* GetInstalledExtensionsInfo(); 180 ExtensionsInfo* GetInstalledExtensionsInfo();
169 181
170 // Returns the ExtensionInfo from the prefs for the given extension. If the 182 // Returns the ExtensionInfo from the prefs for the given extension. If the
171 // extension is not present, NULL is returned. 183 // extension is not present, NULL is returned.
172 ExtensionInfo* GetInstalledExtensionInfo(const std::string& extension_id); 184 ExtensionInfo* GetInstalledExtensionInfo(const std::string& extension_id);
173 185
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 // Base extensions install directory. 319 // Base extensions install directory.
308 FilePath install_directory_; 320 FilePath install_directory_;
309 321
310 // The URLs of all of the toolstrips. 322 // The URLs of all of the toolstrips.
311 URLList shelf_order_; 323 URLList shelf_order_;
312 324
313 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); 325 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs);
314 }; 326 };
315 327
316 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ 328 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_
OLDNEW
« no previous file with comments | « chrome/browser/dom_ui/ntp_resource_cache.cc ('k') | chrome/browser/extensions/extension_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698