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

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

Issue 12314164: Modified Omnibox extension api to use JSON Schema Compiler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: kalman's requests Created 7 years, 9 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_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 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/memory/linked_ptr.h" 12 #include "base/memory/linked_ptr.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/time.h" 14 #include "base/time.h"
15 #include "base/values.h" 15 #include "base/values.h"
16 #include "chrome/browser/extensions/api/content_settings/content_settings_store. h" 16 #include "chrome/browser/extensions/api/content_settings/content_settings_store. h"
17 #include "chrome/browser/extensions/extension_prefs_scope.h" 17 #include "chrome/browser/extensions/extension_prefs_scope.h"
18 #include "chrome/browser/extensions/extension_scoped_prefs.h" 18 #include "chrome/browser/extensions/extension_scoped_prefs.h"
19 #include "chrome/browser/media_galleries/media_galleries_preferences.h" 19 #include "chrome/browser/media_galleries/media_galleries_preferences.h"
20 #include "chrome/common/extensions/api/omnibox.h"
20 #include "chrome/common/extensions/extension.h" 21 #include "chrome/common/extensions/extension.h"
21 #include "extensions/common/url_pattern_set.h" 22 #include "extensions/common/url_pattern_set.h"
22 #include "sync/api/string_ordinal.h" 23 #include "sync/api/string_ordinal.h"
23 24
24 class ExtensionPrefValueMap; 25 class ExtensionPrefValueMap;
25 class ExtensionSorting; 26 class ExtensionSorting;
26 class PrefService; 27 class PrefService;
27 class PrefRegistrySyncable; 28 class PrefRegistrySyncable;
28 29
29 namespace extensions { 30 namespace extensions {
30 class ExtensionPrefsUninstallExtension; 31 class ExtensionPrefsUninstallExtension;
31 class URLPatternSet; 32 class URLPatternSet;
32 struct ExtensionOmniboxSuggestion;
33 33
34 namespace app_file_handler_util { 34 namespace app_file_handler_util {
35 struct SavedFileEntry; 35 struct SavedFileEntry;
36 } 36 }
37 37
38 // Class for managing global and per-extension preferences. 38 // Class for managing global and per-extension preferences.
39 // 39 //
40 // This class distinguishes the following kinds of preferences: 40 // This class distinguishes the following kinds of preferences:
41 // - global preferences: 41 // - global preferences:
42 // internal state for the extension system in general, not associated 42 // internal state for the extension system in general, not associated
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 void AddSavedFileEntry(const std::string& extension_id, 316 void AddSavedFileEntry(const std::string& extension_id,
317 const std::string& id, 317 const std::string& id,
318 const base::FilePath& file_path, 318 const base::FilePath& file_path,
319 bool writable); 319 bool writable);
320 void ClearSavedFileEntries(const std::string& extension_id); 320 void ClearSavedFileEntries(const std::string& extension_id);
321 void GetSavedFileEntries( 321 void GetSavedFileEntries(
322 const std::string& extension_id, 322 const std::string& extension_id,
323 std::vector<app_file_handler_util::SavedFileEntry>* out); 323 std::vector<app_file_handler_util::SavedFileEntry>* out);
324 324
325 // Controls the omnibox default suggestion as set by the extension. 325 // Controls the omnibox default suggestion as set by the extension.
326 ExtensionOmniboxSuggestion GetOmniboxDefaultSuggestion( 326 scoped_ptr<api::omnibox::SuggestResult> GetOmniboxDefaultSuggestion(
327 const std::string& extension_id); 327 const std::string& extension_id);
328 void SetOmniboxDefaultSuggestion( 328 void SetOmniboxDefaultSuggestion(
329 const std::string& extension_id, 329 const std::string& extension_id,
330 const ExtensionOmniboxSuggestion& suggestion); 330 const api::omnibox::SuggestResult& suggestion);
331 331
332 // Returns true if the user enabled this extension to be loaded in incognito 332 // Returns true if the user enabled this extension to be loaded in incognito
333 // mode. 333 // mode.
334 bool IsIncognitoEnabled(const std::string& extension_id); 334 bool IsIncognitoEnabled(const std::string& extension_id);
335 void SetIsIncognitoEnabled(const std::string& extension_id, bool enabled); 335 void SetIsIncognitoEnabled(const std::string& extension_id, bool enabled);
336 336
337 // Returns true if the user has chosen to allow this extension to inject 337 // Returns true if the user has chosen to allow this extension to inject
338 // scripts into pages with file URLs. 338 // scripts into pages with file URLs.
339 bool AllowFileAccess(const std::string& extension_id); 339 bool AllowFileAccess(const std::string& extension_id);
340 void SetAllowFileAccess(const std::string& extension_id, bool allow); 340 void SetAllowFileAccess(const std::string& extension_id, bool allow);
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
650 scoped_refptr<ContentSettingsStore> content_settings_store_; 650 scoped_refptr<ContentSettingsStore> content_settings_store_;
651 651
652 scoped_ptr<TimeProvider> time_provider_; 652 scoped_ptr<TimeProvider> time_provider_;
653 653
654 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); 654 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs);
655 }; 655 };
656 656
657 } // namespace extensions 657 } // namespace extensions
658 658
659 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ 659 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698