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

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

Issue 1988463002: MD Settings: Convert C++ handlers to be JavaScript-lifecycle aware. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_SETTINGS_MANAGE_PROFILE_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_MANAGE_PROFILE_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_MANAGE_PROFILE_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_MANAGE_PROFILE_HANDLER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 12 matching lines...) Expand all
23 23
24 // Chrome personal stuff profiles manage overlay UI handler. 24 // Chrome personal stuff profiles manage overlay UI handler.
25 class ManageProfileHandler : public settings::SettingsPageUIHandler, 25 class ManageProfileHandler : public settings::SettingsPageUIHandler,
26 public ProfileAttributesStorage::Observer { 26 public ProfileAttributesStorage::Observer {
27 public: 27 public:
28 explicit ManageProfileHandler(Profile* profile); 28 explicit ManageProfileHandler(Profile* profile);
29 ~ManageProfileHandler() override; 29 ~ManageProfileHandler() override;
30 30
31 // settings::SettingsPageUIHandler: 31 // settings::SettingsPageUIHandler:
32 void RegisterMessages() override; 32 void RegisterMessages() override;
33 void OnJavascriptAllowed() override;
34 void OnJavascriptDisallowed() override;
33 35
34 // ProfileAttributesStorage::Observer: 36 // ProfileAttributesStorage::Observer:
35 void OnProfileAvatarChanged(const base::FilePath& profile_path) override; 37 void OnProfileAvatarChanged(const base::FilePath& profile_path) override;
36 38
37 private: 39 private:
38 FRIEND_TEST_ALL_PREFIXES(ManageProfileHandlerTest, 40 FRIEND_TEST_ALL_PREFIXES(ManageProfileHandlerTest,
39 HandleSetProfileIconAndName); 41 HandleSetProfileIconAndName);
40 FRIEND_TEST_ALL_PREFIXES(ManageProfileHandlerTest, HandleGetAvailableIcons); 42 FRIEND_TEST_ALL_PREFIXES(ManageProfileHandlerTest, HandleGetAvailableIcons);
41 43
42 // Callback for the "getAvailableIcons" message. 44 // Callback for the "getAvailableIcons" message.
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 87
86 // For generating weak pointers to itself for callbacks. 88 // For generating weak pointers to itself for callbacks.
87 base::WeakPtrFactory<ManageProfileHandler> weak_factory_; 89 base::WeakPtrFactory<ManageProfileHandler> weak_factory_;
88 90
89 DISALLOW_COPY_AND_ASSIGN(ManageProfileHandler); 91 DISALLOW_COPY_AND_ASSIGN(ManageProfileHandler);
90 }; 92 };
91 93
92 } // namespace settings 94 } // namespace settings
93 95
94 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_MANAGE_PROFILE_HANDLER_H_ 96 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_MANAGE_PROFILE_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698