OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
15 #include "base/values.h" | 15 #include "base/values.h" |
16 #include "chrome/browser/profiles/profile.h" | 16 #include "chrome/browser/profiles/profile.h" |
17 #include "chrome/browser/shell_integration.h" | 17 #include "chrome/browser/shell_integration.h" |
18 #include "chrome/common/custom_handlers/protocol_handler.h" | 18 #include "chrome/common/custom_handlers/protocol_handler.h" |
19 #include "content/browser/browser_thread.h" | 19 #include "content/browser/browser_thread.h" |
20 #include "content/common/notification_service.h" | 20 #include "content/public/browser/notification_service.h" |
21 #include "net/url_request/url_request.h" | 21 #include "net/url_request/url_request.h" |
22 #include "net/url_request/url_request_job.h" | 22 #include "net/url_request/url_request_job.h" |
23 | 23 |
24 // This is where handlers for protocols registered with | 24 // This is where handlers for protocols registered with |
25 // navigator.registerProtocolHandler() are registered. Each Profile owns an | 25 // navigator.registerProtocolHandler() are registered. Each Profile owns an |
26 // instance of this class, which is initialized on browser start through | 26 // instance of this class, which is initialized on browser start through |
27 // Profile::InitRegisteredProtocolHandlers(), and they should be the only | 27 // Profile::InitRegisteredProtocolHandlers(), and they should be the only |
28 // instances of this class. | 28 // instances of this class. |
29 | 29 |
30 class ProtocolHandlerRegistry | 30 class ProtocolHandlerRegistry |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 DefaultClientObserverList default_client_observers_; | 274 DefaultClientObserverList default_client_observers_; |
275 | 275 |
276 // Copy of default_handlers_ that is only accessed on the IO thread. | 276 // Copy of default_handlers_ that is only accessed on the IO thread. |
277 ProtocolHandlerMap default_handlers_io_; | 277 ProtocolHandlerMap default_handlers_io_; |
278 | 278 |
279 friend class ProtocolHandlerRegistryTest; | 279 friend class ProtocolHandlerRegistryTest; |
280 | 280 |
281 DISALLOW_COPY_AND_ASSIGN(ProtocolHandlerRegistry); | 281 DISALLOW_COPY_AND_ASSIGN(ProtocolHandlerRegistry); |
282 }; | 282 }; |
283 #endif // CHROME_BROWSER_CUSTOM_HANDLERS_PROTOCOL_HANDLER_REGISTRY_H_ | 283 #endif // CHROME_BROWSER_CUSTOM_HANDLERS_PROTOCOL_HANDLER_REGISTRY_H_ |
OLD | NEW |