OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_CUSTOM_HANDLERS_PROTOCOL_HANDLER_REGISTRY_H_ | 5 #ifndef CHROME_BROWSER_CUSTOM_HANDLERS_PROTOCOL_HANDLER_REGISTRY_H_ |
6 #define CHROME_BROWSER_CUSTOM_HANDLERS_PROTOCOL_HANDLER_REGISTRY_H_ | 6 #define CHROME_BROWSER_CUSTOM_HANDLERS_PROTOCOL_HANDLER_REGISTRY_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 | 228 |
229 // Puts this registry in the disabled state - registered protocol handlers | 229 // Puts this registry in the disabled state - registered protocol handlers |
230 // will not handle requests. | 230 // will not handle requests. |
231 void Disable(); | 231 void Disable(); |
232 | 232 |
233 // This is called by the UI thread when the system is shutting down. This | 233 // This is called by the UI thread when the system is shutting down. This |
234 // does finalization which must be done on the UI thread. | 234 // does finalization which must be done on the UI thread. |
235 virtual void Shutdown() OVERRIDE; | 235 virtual void Shutdown() OVERRIDE; |
236 | 236 |
237 // Registers the preferences that we store registered protocol handlers in. | 237 // Registers the preferences that we store registered protocol handlers in. |
238 static void RegisterUserPrefs(user_prefs::PrefRegistrySyncable* registry); | 238 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
239 | 239 |
240 bool enabled() const { return enabled_; } | 240 bool enabled() const { return enabled_; } |
241 | 241 |
242 // Add a predefined protocol handler. This has to be called before the first | 242 // Add a predefined protocol handler. This has to be called before the first |
243 // load command was issued, otherwise the command will be ignored. | 243 // load command was issued, otherwise the command will be ignored. |
244 void AddPredefinedHandler(const ProtocolHandler& handler); | 244 void AddPredefinedHandler(const ProtocolHandler& handler); |
245 | 245 |
246 private: | 246 private: |
247 friend class base::DeleteHelper<ProtocolHandlerRegistry>; | 247 friend class base::DeleteHelper<ProtocolHandlerRegistry>; |
248 friend struct content::BrowserThread::DeleteOnThread< | 248 friend struct content::BrowserThread::DeleteOnThread< |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 | 325 |
326 // Copy of registry data for use on the IO thread. Changes to the registry | 326 // Copy of registry data for use on the IO thread. Changes to the registry |
327 // are posted to the IO thread where updates are applied to this object. | 327 // are posted to the IO thread where updates are applied to this object. |
328 scoped_refptr<IOThreadDelegate> io_thread_delegate_; | 328 scoped_refptr<IOThreadDelegate> io_thread_delegate_; |
329 | 329 |
330 DefaultClientObserverList default_client_observers_; | 330 DefaultClientObserverList default_client_observers_; |
331 | 331 |
332 DISALLOW_COPY_AND_ASSIGN(ProtocolHandlerRegistry); | 332 DISALLOW_COPY_AND_ASSIGN(ProtocolHandlerRegistry); |
333 }; | 333 }; |
334 #endif // CHROME_BROWSER_CUSTOM_HANDLERS_PROTOCOL_HANDLER_REGISTRY_H_ | 334 #endif // CHROME_BROWSER_CUSTOM_HANDLERS_PROTOCOL_HANDLER_REGISTRY_H_ |
OLD | NEW |