blob: d0c912fb2007cd935a2b34698ee76844326729fc [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 PrefRegistrySyncable;
18class Profile;
[email protected]68c7630b2012-05-02 22:37:4219
20namespace base {
[email protected]ad2a3ded2010-08-27 13:19:0521class RefCountedMemory;
[email protected]68c7630b2012-05-02 22:37:4222}
[email protected]ad2a3ded2010-08-27 13:19:0523
[email protected]c63cedf22012-01-17 18:42:2224class FlagsUI : public content::WebUIController {
[email protected]ad2a3ded2010-08-27 13:19:0525 public:
[email protected]01ec4ec2012-01-18 04:13:4726 explicit FlagsUI(content::WebUI* web_ui);
[email protected]83d2c392013-03-06 16:26:5627 virtual ~FlagsUI();
[email protected]ad2a3ded2010-08-27 13:19:0528
[email protected]5e009692012-09-05 15:50:0529 static base::RefCountedMemory* GetFaviconResourceBytes(
30 ui::ScaleFactor scale_factor);
[email protected]b1de2c72013-02-06 02:45:4731 static void RegisterPrefs(PrefRegistrySimple* registry);
[email protected]31662202013-03-23 19:10:5432#if defined(OS_CHROMEOS)
[email protected]83d2c392013-03-06 16:26:5633 static void RegisterUserPrefs(PrefRegistrySyncable* registry);
34#endif
[email protected]ad2a3ded2010-08-27 13:19:0535
36 private:
[email protected]31662202013-03-23 19:10:5437#if defined(OS_CHROMEOS)
[email protected]83d2c392013-03-06 16:26:5638 // On ChromeOS verifying if the owner is signed in is async operation and only
39 // after finishing it the UI can be properly populated. This function is the
40 // callback for whether the owner is signed in. It will respectively pick the
41 // proper PrefService for the flags interface.
42 void FinishInitialization(
43 Profile* profile,
44 chromeos::DeviceSettingsService::OwnershipStatus status,
45 bool current_user_is_owner);
46#endif
47 base::WeakPtrFactory<FlagsUI> weak_factory_;
48
[email protected]1a47d7e2010-10-15 00:37:2449 DISALLOW_COPY_AND_ASSIGN(FlagsUI);
[email protected]ad2a3ded2010-08-27 13:19:0550};
51
[email protected]265a1492011-02-27 05:58:0752#endif // CHROME_BROWSER_UI_WEBUI_FLAGS_UI_H_