blob: 4b268362f81bb60b7884b7f1d3aac1ae15ad37bf [file] [log] [blame]
[email protected]68c7630b2012-05-02 22:37:421// Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]ad2a3ded2010-08-27 13:19:052// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
[email protected]265a1492011-02-27 05:58:075#ifndef CHROME_BROWSER_UI_WEBUI_FLAGS_UI_H_
6#define CHROME_BROWSER_UI_WEBUI_FLAGS_UI_H_
[email protected]ad2a3ded2010-08-27 13:19:057
[email protected]83d2c392013-03-06 16:26:568#include "base/memory/weak_ptr.h"
[email protected]e14c959122012-01-13 16:58:259#include "content/public/browser/web_ui_controller.h"
[email protected]5e009692012-09-05 15:50:0510#include "ui/base/layout.h"
[email protected]ad2a3ded2010-08-27 13:19:0511
[email protected]31662202013-03-23 19:10:5412#if defined(OS_CHROMEOS)
[email protected]83d2c392013-03-06 16:26:5613#include "chrome/browser/chromeos/settings/device_settings_service.h"
14#endif
15
[email protected]b1de2c72013-02-06 02:45:4716class PrefRegistrySimple;
[email protected]83d2c392013-03-06 16:26:5617class Profile;
[email protected]68c7630b2012-05-02 22:37:4218
19namespace base {
[email protected]ad2a3ded2010-08-27 13:19:0520class RefCountedMemory;
[email protected]68c7630b2012-05-02 22:37:4221}
[email protected]ad2a3ded2010-08-27 13:19:0522
[email protected]443e9312013-05-06 06:17:3423namespace user_prefs {
24class PrefRegistrySyncable;
25}
26
[email protected]c63cedf22012-01-17 18:42:2227class FlagsUI : public content::WebUIController {
[email protected]ad2a3ded2010-08-27 13:19:0528 public:
[email protected]01ec4ec2012-01-18 04:13:4729 explicit FlagsUI(content::WebUI* web_ui);
[email protected]83d2c392013-03-06 16:26:5630 virtual ~FlagsUI();
[email protected]ad2a3ded2010-08-27 13:19:0531
[email protected]5e009692012-09-05 15:50:0532 static base::RefCountedMemory* GetFaviconResourceBytes(
33 ui::ScaleFactor scale_factor);
[email protected]b1de2c72013-02-06 02:45:4734 static void RegisterPrefs(PrefRegistrySimple* registry);
[email protected]31662202013-03-23 19:10:5435#if defined(OS_CHROMEOS)
[email protected]443e9312013-05-06 06:17:3436 static void RegisterUserPrefs(user_prefs::PrefRegistrySyncable* registry);
[email protected]83d2c392013-03-06 16:26:5637#endif
[email protected]ad2a3ded2010-08-27 13:19:0538
39 private:
[email protected]31662202013-03-23 19:10:5440#if defined(OS_CHROMEOS)
[email protected]83d2c392013-03-06 16:26:5641 // 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
43 // callback for whether the owner is signed in. It will respectively pick the
44 // proper PrefService for the flags interface.
45 void FinishInitialization(
46 Profile* profile,
47 chromeos::DeviceSettingsService::OwnershipStatus status,
48 bool current_user_is_owner);
49#endif
50 base::WeakPtrFactory<FlagsUI> weak_factory_;
51
[email protected]1a47d7e2010-10-15 00:37:2452 DISALLOW_COPY_AND_ASSIGN(FlagsUI);
[email protected]ad2a3ded2010-08-27 13:19:0553};
54
[email protected]265a1492011-02-27 05:58:0755#endif // CHROME_BROWSER_UI_WEBUI_FLAGS_UI_H_