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

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

Issue 1896463003: WebUI: Add JavaScript lifecycle-control to WebUIMessageHandler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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_PROFILE_INFO_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_SETTINGS_PROFILE_INFO_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_PROFILE_INFO_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_PROFILE_INFO_HANDLER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 16 matching lines...) Expand all
27 #endif 27 #endif
28 public ProfileAttributesStorage::Observer { 28 public ProfileAttributesStorage::Observer {
29 public: 29 public:
30 static const char kProfileInfoChangedEventName[]; 30 static const char kProfileInfoChangedEventName[];
31 31
32 explicit ProfileInfoHandler(Profile* profile); 32 explicit ProfileInfoHandler(Profile* profile);
33 ~ProfileInfoHandler() override {} 33 ~ProfileInfoHandler() override {}
34 34
35 // SettingsPageUIHandler implementation. 35 // SettingsPageUIHandler implementation.
36 void RegisterMessages() override; 36 void RegisterMessages() override;
37 void RenderViewReused() override; 37 void OnJavascriptAllowed() override;
38 void OnJavascriptDisallowed() override;
38 39
39 #if defined(OS_CHROMEOS) 40 #if defined(OS_CHROMEOS)
40 // content::NotificationObserver implementation. 41 // content::NotificationObserver implementation.
41 void Observe(int type, 42 void Observe(int type,
42 const content::NotificationSource& source, 43 const content::NotificationSource& source,
43 const content::NotificationDetails& details) override; 44 const content::NotificationDetails& details) override;
44 #endif 45 #endif
45 46
46 // ProfileAttributesStorage::Observer implementation. 47 // ProfileAttributesStorage::Observer implementation.
47 void OnProfileNameChanged(const base::FilePath& profile_path, 48 void OnProfileNameChanged(const base::FilePath& profile_path,
(...skipping 12 matching lines...) Expand all
60 std::unique_ptr<base::DictionaryValue> GetAccountNameAndIcon() const; 61 std::unique_ptr<base::DictionaryValue> GetAccountNameAndIcon() const;
61 62
62 // Weak pointer. 63 // Weak pointer.
63 Profile* profile_; 64 Profile* profile_;
64 65
65 #if defined(OS_CHROMEOS) 66 #if defined(OS_CHROMEOS)
66 // Used to listen to ChromeOS user image changes. 67 // Used to listen to ChromeOS user image changes.
67 content::NotificationRegistrar registrar_; 68 content::NotificationRegistrar registrar_;
68 #endif 69 #endif
69 70
70 bool observers_registered_;
71
72 DISALLOW_COPY_AND_ASSIGN(ProfileInfoHandler); 71 DISALLOW_COPY_AND_ASSIGN(ProfileInfoHandler);
73 }; 72 };
74 73
75 } // namespace settings 74 } // namespace settings
76 75
77 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_PROFILE_INFO_HANDLER_H_ 76 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_PROFILE_INFO_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698