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

Side by Side Diff: chrome/browser/ui/webui/extensions/extension_settings_handler.h

Issue 10407105: Improve error messaging of webRequest API in case of conflicts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Store ExtensionWarnings as values in set rather than pointers Created 8 years, 3 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 | Annotate | Revision Log
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_UI_WEBUI_EXTENSIONS_EXTENSION_SETTINGS_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_SETTINGS_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_SETTINGS_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_SETTINGS_HANDLER_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/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "chrome/browser/api/prefs/pref_change_registrar.h" 13 #include "chrome/browser/api/prefs/pref_change_registrar.h"
14 #include "chrome/browser/extensions/extension_install_ui.h" 14 #include "chrome/browser/extensions/extension_install_ui.h"
15 #include "chrome/browser/extensions/extension_uninstall_dialog.h" 15 #include "chrome/browser/extensions/extension_uninstall_dialog.h"
16 #include "chrome/browser/extensions/extension_warning_set.h"
17 #include "chrome/common/extensions/extension_resource.h" 16 #include "chrome/common/extensions/extension_resource.h"
18 #include "content/public/browser/navigation_controller.h" 17 #include "content/public/browser/navigation_controller.h"
19 #include "content/public/browser/notification_observer.h" 18 #include "content/public/browser/notification_observer.h"
20 #include "content/public/browser/notification_registrar.h" 19 #include "content/public/browser/notification_registrar.h"
21 #include "content/public/browser/render_view_host.h" 20 #include "content/public/browser/render_view_host.h"
22 #include "content/public/browser/web_contents_observer.h" 21 #include "content/public/browser/web_contents_observer.h"
23 #include "content/public/browser/web_ui_message_handler.h" 22 #include "content/public/browser/web_ui_message_handler.h"
24 #include "googleurl/src/gurl.h" 23 #include "googleurl/src/gurl.h"
25 #include "ui/base/dialogs/select_file_dialog.h" 24 #include "ui/base/dialogs/select_file_dialog.h"
26 25
27 class ExtensionService; 26 class ExtensionService;
28 class FilePath; 27 class FilePath;
29 class PrefService; 28 class PrefService;
30 29
31 namespace base { 30 namespace base {
32 class DictionaryValue; 31 class DictionaryValue;
33 class ListValue; 32 class ListValue;
34 } 33 }
35 34
36 namespace extensions { 35 namespace extensions {
37 class Extension; 36 class Extension;
38 class ExtensionHost; 37 class ExtensionHost;
38 class ExtensionWarningService;
39 class ManagementPolicy; 39 class ManagementPolicy;
40 } 40 }
41 41
42 // Information about a page running in an extension, for example a popup bubble, 42 // Information about a page running in an extension, for example a popup bubble,
43 // a background page, or a tab contents. 43 // a background page, or a tab contents.
44 struct ExtensionPage { 44 struct ExtensionPage {
45 ExtensionPage(const GURL& url, int render_process_id, int render_view_id, 45 ExtensionPage(const GURL& url, int render_process_id, int render_view_id,
46 bool incognito) 46 bool incognito)
47 : url(url), 47 : url(url),
48 render_process_id(render_process_id), 48 render_process_id(render_process_id),
(...skipping 16 matching lines...) Expand all
65 virtual ~ExtensionSettingsHandler(); 65 virtual ~ExtensionSettingsHandler();
66 66
67 static void RegisterUserPrefs(PrefService* prefs); 67 static void RegisterUserPrefs(PrefService* prefs);
68 68
69 // Extension Detail JSON Struct for page. |pages| is injected for unit 69 // Extension Detail JSON Struct for page. |pages| is injected for unit
70 // testing. 70 // testing.
71 // Note: |warning_set| can be NULL in unit tests. 71 // Note: |warning_set| can be NULL in unit tests.
72 base::DictionaryValue* CreateExtensionDetailValue( 72 base::DictionaryValue* CreateExtensionDetailValue(
73 const extensions::Extension* extension, 73 const extensions::Extension* extension,
74 const std::vector<ExtensionPage>& pages, 74 const std::vector<ExtensionPage>& pages,
75 const ExtensionWarningSet* warning_set); 75 const extensions::ExtensionWarningService* warning_set);
76 76
77 void GetLocalizedValues(base::DictionaryValue* localized_strings); 77 void GetLocalizedValues(base::DictionaryValue* localized_strings);
78 78
79 // content::WebContentsObserver implementation, which reloads all unpacked 79 // content::WebContentsObserver implementation, which reloads all unpacked
80 // extensions whenever chrome://extensions is reloaded. 80 // extensions whenever chrome://extensions is reloaded.
81 virtual void NavigateToPendingEntry( 81 virtual void NavigateToPendingEntry(
82 const GURL& url, 82 const GURL& url,
83 content::NavigationController::ReloadType reload_type) OVERRIDE; 83 content::NavigationController::ReloadType reload_type) OVERRIDE;
84 84
85 private: 85 private:
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 214
215 content::NotificationRegistrar registrar_; 215 content::NotificationRegistrar registrar_;
216 216
217 PrefChangeRegistrar pref_registrar_; 217 PrefChangeRegistrar pref_registrar_;
218 PrefChangeRegistrar local_state_pref_registrar_; 218 PrefChangeRegistrar local_state_pref_registrar_;
219 219
220 DISALLOW_COPY_AND_ASSIGN(ExtensionSettingsHandler); 220 DISALLOW_COPY_AND_ASSIGN(ExtensionSettingsHandler);
221 }; 221 };
222 222
223 #endif // CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_SETTINGS_HANDLER_H_ 223 #endif // CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_SETTINGS_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698