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_OPTIONS_BROWSER_OPTIONS_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_BROWSER_OPTIONS_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_BROWSER_OPTIONS_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_BROWSER_OPTIONS_HANDLER_H_ |
7 | 7 |
| 8 #include <memory> |
8 #include <string> | 9 #include <string> |
9 #include <vector> | 10 #include <vector> |
10 | 11 |
11 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
12 #include "base/macros.h" | 13 #include "base/macros.h" |
13 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
14 #include "base/memory/scoped_ptr.h" | |
15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
16 #include "base/scoped_observer.h" | 16 #include "base/scoped_observer.h" |
17 #include "build/build_config.h" | 17 #include "build/build_config.h" |
18 #include "chrome/browser/profiles/profile.h" | 18 #include "chrome/browser/profiles/profile.h" |
19 #include "chrome/browser/profiles/profile_attributes_storage.h" | 19 #include "chrome/browser/profiles/profile_attributes_storage.h" |
20 #include "chrome/browser/ui/webui/options/options_ui.h" | 20 #include "chrome/browser/ui/webui/options/options_ui.h" |
21 #include "chrome/browser/ui/zoom/chrome_zoom_level_prefs.h" | 21 #include "chrome/browser/ui/zoom/chrome_zoom_level_prefs.h" |
22 #include "components/policy/core/common/policy_service.h" | 22 #include "components/policy/core/common/policy_service.h" |
23 #include "components/prefs/pref_change_registrar.h" | 23 #include "components/prefs/pref_change_registrar.h" |
24 #include "components/prefs/pref_member.h" | 24 #include "components/prefs/pref_member.h" |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 // Loads the possible default search engine list and reports it to the WebUI. | 185 // Loads the possible default search engine list and reports it to the WebUI. |
186 void AddTemplateUrlServiceObserver(); | 186 void AddTemplateUrlServiceObserver(); |
187 | 187 |
188 // Creates a list of dictionaries where each dictionary is of the form: | 188 // Creates a list of dictionaries where each dictionary is of the form: |
189 // profileInfo = { | 189 // profileInfo = { |
190 // name: "Profile Name", | 190 // name: "Profile Name", |
191 // iconURL: "chrome://path/to/icon/image", | 191 // iconURL: "chrome://path/to/icon/image", |
192 // filePath: "/path/to/profile/data/on/disk", | 192 // filePath: "/path/to/profile/data/on/disk", |
193 // isCurrentProfile: false | 193 // isCurrentProfile: false |
194 // }; | 194 // }; |
195 scoped_ptr<base::ListValue> GetProfilesInfoList(); | 195 std::unique_ptr<base::ListValue> GetProfilesInfoList(); |
196 | 196 |
197 // Sends an array of Profile objects to javascript. | 197 // Sends an array of Profile objects to javascript. |
198 void SendProfilesInfo(); | 198 void SendProfilesInfo(); |
199 | 199 |
200 // Deletes the given profile. Expects one argument: | 200 // Deletes the given profile. Expects one argument: |
201 // 0: profile file path (string) | 201 // 0: profile file path (string) |
202 void DeleteProfile(const base::ListValue* args); | 202 void DeleteProfile(const base::ListValue* args); |
203 | 203 |
204 void ObserveThemeChanged(); | 204 void ObserveThemeChanged(); |
205 void ThemesReset(const base::ListValue* args); | 205 void ThemesReset(const base::ListValue* args); |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
368 bool policy_managed, | 368 bool policy_managed, |
369 bool owner_managed); | 369 bool owner_managed); |
370 | 370 |
371 #if defined(OS_CHROMEOS) | 371 #if defined(OS_CHROMEOS) |
372 // Setup the accessibility features for ChromeOS. | 372 // Setup the accessibility features for ChromeOS. |
373 void SetupAccessibilityFeatures(); | 373 void SetupAccessibilityFeatures(); |
374 #endif | 374 #endif |
375 | 375 |
376 // Returns a newly created dictionary with a number of properties that | 376 // Returns a newly created dictionary with a number of properties that |
377 // correspond to the status of sync. | 377 // correspond to the status of sync. |
378 scoped_ptr<base::DictionaryValue> GetSyncStateDictionary(); | 378 std::unique_ptr<base::DictionaryValue> GetSyncStateDictionary(); |
379 | 379 |
380 // Checks whether on Chrome OS the current user is the device owner. Returns | 380 // Checks whether on Chrome OS the current user is the device owner. Returns |
381 // true on other platforms. | 381 // true on other platforms. |
382 bool IsDeviceOwnerProfile(); | 382 bool IsDeviceOwnerProfile(); |
383 | 383 |
384 #if !defined(OS_CHROMEOS) | 384 #if !defined(OS_CHROMEOS) |
385 scoped_refptr<shell_integration::DefaultBrowserWorker> | 385 scoped_refptr<shell_integration::DefaultBrowserWorker> |
386 default_browser_worker_; | 386 default_browser_worker_; |
387 BooleanPrefMember default_browser_policy_; | 387 BooleanPrefMember default_browser_policy_; |
388 #endif | 388 #endif |
389 | 389 |
390 bool page_initialized_; | 390 bool page_initialized_; |
391 | 391 |
392 StringPrefMember homepage_; | 392 StringPrefMember homepage_; |
393 | 393 |
394 TemplateURLService* template_url_service_; // Weak. | 394 TemplateURLService* template_url_service_; // Weak. |
395 | 395 |
396 scoped_refptr<ui::SelectFileDialog> select_folder_dialog_; | 396 scoped_refptr<ui::SelectFileDialog> select_folder_dialog_; |
397 | 397 |
398 bool cloud_print_mdns_ui_enabled_; | 398 bool cloud_print_mdns_ui_enabled_; |
399 | 399 |
400 StringPrefMember auto_open_files_; | 400 StringPrefMember auto_open_files_; |
401 | 401 |
402 scoped_ptr<ChromeZoomLevelPrefs::DefaultZoomLevelSubscription> | 402 std::unique_ptr<ChromeZoomLevelPrefs::DefaultZoomLevelSubscription> |
403 default_zoom_level_subscription_; | 403 default_zoom_level_subscription_; |
404 | 404 |
405 PrefChangeRegistrar profile_pref_registrar_; | 405 PrefChangeRegistrar profile_pref_registrar_; |
406 #if defined(OS_CHROMEOS) | 406 #if defined(OS_CHROMEOS) |
407 scoped_ptr<policy::PolicyChangeRegistrar> policy_registrar_; | 407 std::unique_ptr<policy::PolicyChangeRegistrar> policy_registrar_; |
408 | 408 |
409 // Whether factory reset can be performed. | 409 // Whether factory reset can be performed. |
410 bool enable_factory_reset_; | 410 bool enable_factory_reset_; |
411 | 411 |
412 PrefChangeRegistrar local_state_pref_change_registrar_; | 412 PrefChangeRegistrar local_state_pref_change_registrar_; |
413 #endif | 413 #endif |
414 | 414 |
415 ScopedObserver<SigninManagerBase, SigninManagerBase::Observer> | 415 ScopedObserver<SigninManagerBase, SigninManagerBase::Observer> |
416 signin_observer_; | 416 signin_observer_; |
417 | 417 |
418 // Used to get WeakPtr to self for use on the UI thread. | 418 // Used to get WeakPtr to self for use on the UI thread. |
419 base::WeakPtrFactory<BrowserOptionsHandler> weak_ptr_factory_; | 419 base::WeakPtrFactory<BrowserOptionsHandler> weak_ptr_factory_; |
420 | 420 |
421 DISALLOW_COPY_AND_ASSIGN(BrowserOptionsHandler); | 421 DISALLOW_COPY_AND_ASSIGN(BrowserOptionsHandler); |
422 }; | 422 }; |
423 | 423 |
424 } // namespace options | 424 } // namespace options |
425 | 425 |
426 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_BROWSER_OPTIONS_HANDLER_H_ | 426 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_BROWSER_OPTIONS_HANDLER_H_ |
OLD | NEW |