| 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 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 namespace user_prefs { | 27 namespace user_prefs { |
| 28 class PrefRegistrySyncable; | 28 class PrefRegistrySyncable; |
| 29 } | 29 } |
| 30 | 30 |
| 31 // This is where handlers for protocols registered with | 31 // This is where handlers for protocols registered with |
| 32 // navigator.registerProtocolHandler() are registered. Each Profile owns an | 32 // navigator.registerProtocolHandler() are registered. Each Profile owns an |
| 33 // instance of this class, which is initialized on browser start through | 33 // instance of this class, which is initialized on browser start through |
| 34 // Profile::InitRegisteredProtocolHandlers(), and they should be the only | 34 // Profile::InitRegisteredProtocolHandlers(), and they should be the only |
| 35 // instances of this class. | 35 // instances of this class. |
| 36 class ProtocolHandlerRegistry : public ProfileKeyedService { | 36 class ProtocolHandlerRegistry : public BrowserContextKeyedService { |
| 37 | 37 |
| 38 public: | 38 public: |
| 39 // Provides notification of when the OS level user agent settings | 39 // Provides notification of when the OS level user agent settings |
| 40 // are changed. | 40 // are changed. |
| 41 class DefaultClientObserver | 41 class DefaultClientObserver |
| 42 : public ShellIntegration::DefaultWebClientObserver { | 42 : public ShellIntegration::DefaultWebClientObserver { |
| 43 public: | 43 public: |
| 44 explicit DefaultClientObserver(ProtocolHandlerRegistry* registry); | 44 explicit DefaultClientObserver(ProtocolHandlerRegistry* registry); |
| 45 virtual ~DefaultClientObserver(); | 45 virtual ~DefaultClientObserver(); |
| 46 | 46 |
| (...skipping 278 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 |