blob: d0c912fb2007cd935a2b34698ee76844326729fc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_UI_WEBUI_FLAGS_UI_H_
#define CHROME_BROWSER_UI_WEBUI_FLAGS_UI_H_
#include "base/memory/weak_ptr.h"
#include "content/public/browser/web_ui_controller.h"
#include "ui/base/layout.h"
#if defined(OS_CHROMEOS)
#include "chrome/browser/chromeos/settings/device_settings_service.h"
#endif
class PrefRegistrySimple;
class PrefRegistrySyncable;
class Profile;
namespace base {
class RefCountedMemory;
}
class FlagsUI : public content::WebUIController {
public:
explicit FlagsUI(content::WebUI* web_ui);
virtual ~FlagsUI();
static base::RefCountedMemory* GetFaviconResourceBytes(
ui::ScaleFactor scale_factor);
static void RegisterPrefs(PrefRegistrySimple* registry);
#if defined(OS_CHROMEOS)
static void RegisterUserPrefs(PrefRegistrySyncable* registry);
#endif
private:
#if defined(OS_CHROMEOS)
// On ChromeOS verifying if the owner is signed in is async operation and only
// after finishing it the UI can be properly populated. This function is the
// callback for whether the owner is signed in. It will respectively pick the
// proper PrefService for the flags interface.
void FinishInitialization(
Profile* profile,
chromeos::DeviceSettingsService::OwnershipStatus status,
bool current_user_is_owner);
#endif
base::WeakPtrFactory<FlagsUI> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(FlagsUI);
};
#endif // CHROME_BROWSER_UI_WEBUI_FLAGS_UI_H_
|