OLD | NEW |
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_OPTIONS2_BROWSER_OPTIONS_HANDLER2_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS2_BROWSER_OPTIONS_HANDLER2_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS2_BROWSER_OPTIONS_HANDLER2_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS2_BROWSER_OPTIONS_HANDLER2_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 : public OptionsPageUIHandler, | 34 : public OptionsPageUIHandler, |
35 public CloudPrintSetupHandlerDelegate, | 35 public CloudPrintSetupHandlerDelegate, |
36 public ProfileSyncServiceObserver, | 36 public ProfileSyncServiceObserver, |
37 public SelectFileDialog::Listener, | 37 public SelectFileDialog::Listener, |
38 public ShellIntegration::DefaultWebClientObserver, | 38 public ShellIntegration::DefaultWebClientObserver, |
39 public TemplateURLServiceObserver { | 39 public TemplateURLServiceObserver { |
40 public: | 40 public: |
41 BrowserOptionsHandler(); | 41 BrowserOptionsHandler(); |
42 virtual ~BrowserOptionsHandler(); | 42 virtual ~BrowserOptionsHandler(); |
43 | 43 |
44 virtual void Initialize() OVERRIDE; | |
45 | |
46 // OptionsPageUIHandler implementation. | 44 // OptionsPageUIHandler implementation. |
47 virtual void GetLocalizedValues(DictionaryValue* localized_strings) OVERRIDE; | 45 virtual void GetLocalizedValues(DictionaryValue* localized_strings) OVERRIDE; |
| 46 virtual void InitializeHandler() OVERRIDE; |
| 47 virtual void InitializePage() OVERRIDE; |
48 virtual void RegisterMessages() OVERRIDE; | 48 virtual void RegisterMessages() OVERRIDE; |
49 | 49 |
50 // ProfileSyncServiceObserver implementation. | 50 // ProfileSyncServiceObserver implementation. |
51 virtual void OnStateChanged() OVERRIDE; | 51 virtual void OnStateChanged() OVERRIDE; |
52 | 52 |
53 // ShellIntegration::DefaultWebClientObserver implementation. | 53 // ShellIntegration::DefaultWebClientObserver implementation. |
54 virtual void SetDefaultWebClientUIState( | 54 virtual void SetDefaultWebClientUIState( |
55 ShellIntegration::DefaultWebClientUIState state) OVERRIDE; | 55 ShellIntegration::DefaultWebClientUIState state) OVERRIDE; |
56 | 56 |
57 // TemplateURLServiceObserver implementation. | 57 // TemplateURLServiceObserver implementation. |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 int StatusStringIdForState(ShellIntegration::DefaultWebClientState state); | 105 int StatusStringIdForState(ShellIntegration::DefaultWebClientState state); |
106 | 106 |
107 // Gets the current default browser state, and asynchronously reports it to | 107 // Gets the current default browser state, and asynchronously reports it to |
108 // the WebUI page. | 108 // the WebUI page. |
109 void UpdateDefaultBrowserState(); | 109 void UpdateDefaultBrowserState(); |
110 | 110 |
111 // Updates the UI with the given state for the default browser. | 111 // Updates the UI with the given state for the default browser. |
112 void SetDefaultBrowserUIString(int status_string_id); | 112 void SetDefaultBrowserUIString(int status_string_id); |
113 | 113 |
114 // Loads the possible default search engine list and reports it to the WebUI. | 114 // Loads the possible default search engine list and reports it to the WebUI. |
115 void UpdateSearchEngines(); | 115 void AddTemplateUrlServiceObserver(); |
116 | 116 |
117 // Sends an array of Profile objects to javascript. | 117 // Sends an array of Profile objects to javascript. |
118 // Each object is of the form: | 118 // Each object is of the form: |
119 // profileInfo = { | 119 // profileInfo = { |
120 // name: "Profile Name", | 120 // name: "Profile Name", |
121 // iconURL: "chrome://path/to/icon/image", | 121 // iconURL: "chrome://path/to/icon/image", |
122 // filePath: "/path/to/profile/data/on/disk", | 122 // filePath: "/path/to/profile/data/on/disk", |
123 // isCurrentProfile: false | 123 // isCurrentProfile: false |
124 // }; | 124 // }; |
125 void SendProfilesInfo(); | 125 void SendProfilesInfo(); |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 #if !defined(OS_CHROMEOS) | 301 #if !defined(OS_CHROMEOS) |
302 scoped_ptr<PrefSetObserver> proxy_prefs_; | 302 scoped_ptr<PrefSetObserver> proxy_prefs_; |
303 #endif // !defined(OS_CHROMEOS) | 303 #endif // !defined(OS_CHROMEOS) |
304 | 304 |
305 DISALLOW_COPY_AND_ASSIGN(BrowserOptionsHandler); | 305 DISALLOW_COPY_AND_ASSIGN(BrowserOptionsHandler); |
306 }; | 306 }; |
307 | 307 |
308 } // namespace options2 | 308 } // namespace options2 |
309 | 309 |
310 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS2_BROWSER_OPTIONS_HANDLER2_H_ | 310 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS2_BROWSER_OPTIONS_HANDLER2_H_ |
OLD | NEW |