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

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

Issue 2645153003: Convert ExtensionSettingsHandler to use the new navigation callbacks. (Closed)
Patch Set: use GetReloadType Created 3 years, 11 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
« no previous file with comments | « no previous file | chrome/browser/ui/webui/extensions/extension_settings_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/macros.h" 8 #include "base/macros.h"
9 #include "content/public/browser/reload_type.h" 9 #include "content/public/browser/reload_type.h"
10 #include "content/public/browser/web_contents_observer.h" 10 #include "content/public/browser/web_contents_observer.h"
11 #include "content/public/browser/web_ui_message_handler.h" 11 #include "content/public/browser/web_ui_message_handler.h"
12 12
13 class ExtensionService; 13 class ExtensionService;
14 class GURL;
15 14
16 namespace content { 15 namespace content {
17 class WebUIDataSource; 16 class WebUIDataSource;
18 } 17 }
19 18
20 namespace user_prefs { 19 namespace user_prefs {
21 class PrefRegistrySyncable; 20 class PrefRegistrySyncable;
22 } 21 }
23 22
24 namespace extensions { 23 namespace extensions {
25 24
26 // Extension Settings UI handler. 25 // Extension Settings UI handler.
27 class ExtensionSettingsHandler : public content::WebUIMessageHandler, 26 class ExtensionSettingsHandler : public content::WebUIMessageHandler,
28 public content::WebContentsObserver { 27 public content::WebContentsObserver {
29 public: 28 public:
30 ExtensionSettingsHandler(); 29 ExtensionSettingsHandler();
31 ~ExtensionSettingsHandler() override; 30 ~ExtensionSettingsHandler() override;
32 31
33 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); 32 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
34 33
35 // Note: This uses |web_ui()| from |WebUIMessageHandler|, so it must only be 34 // Note: This uses |web_ui()| from |WebUIMessageHandler|, so it must only be
36 // called after |web_ui->AddMessageHandler(this)| has been called. 35 // called after |web_ui->AddMessageHandler(this)| has been called.
37 void GetLocalizedValues(content::WebUIDataSource* source); 36 void GetLocalizedValues(content::WebUIDataSource* source);
38 37
39 private: 38 private:
40 // WebContentsObserver implementation. 39 // WebContentsObserver implementation.
41 void DidStartNavigationToPendingEntry( 40 void DidStartNavigation(
42 const GURL& url, 41 content::NavigationHandle* navigation_handle) override;
43 content::ReloadType reload_type) override;
44 42
45 // WebUIMessageHandler implementation. 43 // WebUIMessageHandler implementation.
46 void RegisterMessages() override; 44 void RegisterMessages() override;
47 45
48 // Helper method that reloads all unpacked extensions. 46 // Helper method that reloads all unpacked extensions.
49 void ReloadUnpackedExtensions(); 47 void ReloadUnpackedExtensions();
50 48
51 // Our model. Outlives us since it's owned by our containing profile. 49 // Our model. Outlives us since it's owned by our containing profile.
52 ExtensionService* extension_service_; 50 ExtensionService* extension_service_;
53 51
54 DISALLOW_COPY_AND_ASSIGN(ExtensionSettingsHandler); 52 DISALLOW_COPY_AND_ASSIGN(ExtensionSettingsHandler);
55 }; 53 };
56 54
57 } // namespace extensions 55 } // namespace extensions
58 56
59 #endif // CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_SETTINGS_HANDLER_H_ 57 #endif // CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_SETTINGS_HANDLER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/webui/extensions/extension_settings_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698