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

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

Issue 2598893002: [MD settings] lighter weight initializer for protocol handler enabled messages (Closed)
Patch Set: Created 3 years, 12 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_PROTOCOL_HANDLERS_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_SETTINGS_PROTOCOL_HANDLERS_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_PROTOCOL_HANDLERS_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_PROTOCOL_HANDLERS_HANDLER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 26 matching lines...) Expand all
37 void OnJavascriptAllowed() override; 37 void OnJavascriptAllowed() override;
38 void OnJavascriptDisallowed() override; 38 void OnJavascriptDisallowed() override;
39 void RegisterMessages() override; 39 void RegisterMessages() override;
40 40
41 // content::NotificationObserver: 41 // content::NotificationObserver:
42 void Observe(int type, 42 void Observe(int type,
43 const content::NotificationSource& source, 43 const content::NotificationSource& source,
44 const content::NotificationDetails& details) override; 44 const content::NotificationDetails& details) override;
45 45
46 private: 46 private:
47 // Called to fetch the initial list of data to show. 47 // Called to fetch the initial list of data to show. If the full list of
48 // handlers is not needed, consider using HandleInitializeUpdates instead.
48 void HandleInitializeList(const base::ListValue* args); 49 void HandleInitializeList(const base::ListValue* args);
49 50
51 // Called to begin updates to the handlers enabled status. This is a subset
52 // (lighter alternative) of HandleInitializeList. There's no need to call this
53 // function if HandleInitializeList is called.
54 void HandleInitializeUpdates(const base::ListValue* args);
55
50 // Notifies the JS side whether the handlers are enabled or not. 56 // Notifies the JS side whether the handlers are enabled or not.
51 void SendHandlersEnabledValue(); 57 void SendHandlersEnabledValue();
52 58
53 // Called when the user toggles whether custom handlers are enabled. 59 // Called when the user toggles whether custom handlers are enabled.
54 void HandleSetHandlersEnabled(const base::ListValue* args); 60 void HandleSetHandlersEnabled(const base::ListValue* args);
55 61
56 // Called when the user sets a new default handler for a protocol. 62 // Called when the user sets a new default handler for a protocol.
57 void HandleSetDefault(const base::ListValue* args); 63 void HandleSetDefault(const base::ListValue* args);
58 64
59 // Called when the user clears the default handler for a protocol. 65 // Called when the user clears the default handler for a protocol.
(...skipping 26 matching lines...) Expand all
86 ProtocolHandlerRegistry* GetProtocolHandlerRegistry(); 92 ProtocolHandlerRegistry* GetProtocolHandlerRegistry();
87 93
88 content::NotificationRegistrar notification_registrar_; 94 content::NotificationRegistrar notification_registrar_;
89 95
90 DISALLOW_COPY_AND_ASSIGN(ProtocolHandlersHandler); 96 DISALLOW_COPY_AND_ASSIGN(ProtocolHandlersHandler);
91 }; 97 };
92 98
93 } // namespace settings 99 } // namespace settings
94 100
95 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_PROTOCOL_HANDLERS_HANDLER_H_ 101 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_PROTOCOL_HANDLERS_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698