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