| 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_FLAGS_UI_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_FLAGS_UI_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_FLAGS_UI_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_FLAGS_UI_H_ |
| 7 | 7 |
| 8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
| 9 #include "content/public/browser/web_ui_controller.h" | 9 #include "content/public/browser/web_ui_controller.h" |
| 10 #include "ui/base/layout.h" | 10 #include "ui/base/layout.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 class FlagsUI : public content::WebUIController { | 27 class FlagsUI : public content::WebUIController { |
| 28 public: | 28 public: |
| 29 explicit FlagsUI(content::WebUI* web_ui); | 29 explicit FlagsUI(content::WebUI* web_ui); |
| 30 virtual ~FlagsUI(); | 30 virtual ~FlagsUI(); |
| 31 | 31 |
| 32 static base::RefCountedMemory* GetFaviconResourceBytes( | 32 static base::RefCountedMemory* GetFaviconResourceBytes( |
| 33 ui::ScaleFactor scale_factor); | 33 ui::ScaleFactor scale_factor); |
| 34 static void RegisterPrefs(PrefRegistrySimple* registry); | 34 static void RegisterPrefs(PrefRegistrySimple* registry); |
| 35 #if defined(OS_CHROMEOS) | 35 #if defined(OS_CHROMEOS) |
| 36 static void RegisterUserPrefs(user_prefs::PrefRegistrySyncable* registry); | 36 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
| 37 #endif | 37 #endif |
| 38 | 38 |
| 39 private: | 39 private: |
| 40 #if defined(OS_CHROMEOS) | 40 #if defined(OS_CHROMEOS) |
| 41 // On ChromeOS verifying if the owner is signed in is async operation and only | 41 // On ChromeOS verifying if the owner is signed in is async operation and only |
| 42 // after finishing it the UI can be properly populated. This function is the | 42 // after finishing it the UI can be properly populated. This function is the |
| 43 // callback for whether the owner is signed in. It will respectively pick the | 43 // callback for whether the owner is signed in. It will respectively pick the |
| 44 // proper PrefService for the flags interface. | 44 // proper PrefService for the flags interface. |
| 45 void FinishInitialization( | 45 void FinishInitialization( |
| 46 Profile* profile, | 46 Profile* profile, |
| 47 chromeos::DeviceSettingsService::OwnershipStatus status, | 47 chromeos::DeviceSettingsService::OwnershipStatus status, |
| 48 bool current_user_is_owner); | 48 bool current_user_is_owner); |
| 49 #endif | 49 #endif |
| 50 base::WeakPtrFactory<FlagsUI> weak_factory_; | 50 base::WeakPtrFactory<FlagsUI> weak_factory_; |
| 51 | 51 |
| 52 DISALLOW_COPY_AND_ASSIGN(FlagsUI); | 52 DISALLOW_COPY_AND_ASSIGN(FlagsUI); |
| 53 }; | 53 }; |
| 54 | 54 |
| 55 #endif // CHROME_BROWSER_UI_WEBUI_FLAGS_UI_H_ | 55 #endif // CHROME_BROWSER_UI_WEBUI_FLAGS_UI_H_ |
| OLD | NEW |