| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |