Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1016)

Side by Side Diff: chrome/browser/ui/webui/settings/chromeos/easy_unlock_settings_handler.h

Issue 1799913003: Settings People Revamp: Easy Unlock: Add basic UI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_SETTINGS_CHROMEOS_EASY_UNLOCK_SETTINGS_HANDLER_H _ 5 #ifndef CHROME_BROWSER_UI_WEBUI_SETTINGS_CHROMEOS_EASY_UNLOCK_SETTINGS_HANDLER_H _
6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_CHROMEOS_EASY_UNLOCK_SETTINGS_HANDLER_H _ 6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_CHROMEOS_EASY_UNLOCK_SETTINGS_HANDLER_H _
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "chrome/browser/signin/easy_unlock_service_observer.h" 9 #include "chrome/browser/signin/easy_unlock_service_observer.h"
10 #include "chrome/browser/ui/webui/settings/settings_page_ui_handler.h" 10 #include "chrome/browser/ui/webui/settings/settings_page_ui_handler.h"
11 #include "components/prefs/pref_change_registrar.h"
11 12
12 namespace content { 13 namespace content {
13 class WebUIDataSource; 14 class WebUIDataSource;
14 } 15 }
15 16
16 class Profile; 17 class Profile;
17 18
18 namespace chromeos { 19 namespace chromeos {
19 namespace settings { 20 namespace settings {
20 21
(...skipping 10 matching lines...) Expand all
31 // SettingsPageUIHandler: 32 // SettingsPageUIHandler:
32 void RegisterMessages() override; 33 void RegisterMessages() override;
33 34
34 // EasyUnlockServiceObserver: 35 // EasyUnlockServiceObserver:
35 void OnTurnOffOperationStatusChanged() override; 36 void OnTurnOffOperationStatusChanged() override;
36 37
37 protected: 38 protected:
38 explicit EasyUnlockSettingsHandler(Profile* profile); 39 explicit EasyUnlockSettingsHandler(Profile* profile);
39 40
40 private: 41 private:
42 FRIEND_TEST_ALL_PREFIXES(EasyUnlockSettingsHandlerTest, EnabledStatus);
41 FRIEND_TEST_ALL_PREFIXES(EasyUnlockSettingsHandlerTest, TurnOffStatus); 43 FRIEND_TEST_ALL_PREFIXES(EasyUnlockSettingsHandlerTest, TurnOffStatus);
42 44
45 void SendEnabledStatus();
43 void SendTurnOffOperationStatus(); 46 void SendTurnOffOperationStatus();
44 47
45 // JS callbacks. 48 // JS callbacks.
49 void HandleGetEnabledStatus(const base::ListValue* args);
46 void HandleGetTurnOffFlowStatus(const base::ListValue* args); 50 void HandleGetTurnOffFlowStatus(const base::ListValue* args);
47 void HandleRequestTurnOff(const base::ListValue* args); 51 void HandleRequestTurnOff(const base::ListValue* args);
48 void HandlePageDismissed(const base::ListValue* args); 52 void HandlePageDismissed(const base::ListValue* args);
49 53
50 Profile* const profile_; 54 Profile* const profile_;
51 55
56 PrefChangeRegistrar profile_pref_registrar_;
57
52 DISALLOW_COPY_AND_ASSIGN(EasyUnlockSettingsHandler); 58 DISALLOW_COPY_AND_ASSIGN(EasyUnlockSettingsHandler);
53 }; 59 };
54 60
55 } // namespace settings 61 } // namespace settings
56 } // namespace chromeos 62 } // namespace chromeos
57 63
58 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_CHROMEOS_EASY_UNLOCK_SETTINGS_HANDLE R_H_ 64 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_CHROMEOS_EASY_UNLOCK_SETTINGS_HANDLE R_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698