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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 ShellIntegration::DefaultWebClientUIState state) OVERRIDE; | 44 ShellIntegration::DefaultWebClientUIState state) OVERRIDE; |
45 | 45 |
46 // Give the observer a handle to the worker, so we can find out the protocol | 46 // Give the observer a handle to the worker, so we can find out the protocol |
47 // when we're called and also tell the worker if we get deleted. | 47 // when we're called and also tell the worker if we get deleted. |
48 void SetWorker(ShellIntegration::DefaultProtocolClientWorker* worker); | 48 void SetWorker(ShellIntegration::DefaultProtocolClientWorker* worker); |
49 | 49 |
50 protected: | 50 protected: |
51 ShellIntegration::DefaultProtocolClientWorker* worker_; | 51 ShellIntegration::DefaultProtocolClientWorker* worker_; |
52 | 52 |
53 private: | 53 private: |
54 virtual bool IsOwnedByWorker() OVERRIDE { return true; } | 54 virtual bool IsOwnedByWorker() OVERRIDE; |
| 55 |
55 // This is a raw pointer, not reference counted, intentionally. In general | 56 // This is a raw pointer, not reference counted, intentionally. In general |
56 // subclasses of DefaultWebClientObserver are not able to be refcounted | 57 // subclasses of DefaultWebClientObserver are not able to be refcounted |
57 // e.g. the browser options page | 58 // e.g. the browser options page |
58 ProtocolHandlerRegistry* registry_; | 59 ProtocolHandlerRegistry* registry_; |
59 | 60 |
60 DISALLOW_COPY_AND_ASSIGN(DefaultClientObserver); | 61 DISALLOW_COPY_AND_ASSIGN(DefaultClientObserver); |
61 }; | 62 }; |
62 | 63 |
63 // |Delegate| provides an interface for interacting asynchronously | 64 // |Delegate| provides an interface for interacting asynchronously |
64 // with the underlying OS for the purposes of registering Chrome | 65 // with the underlying OS for the purposes of registering Chrome |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 | 283 |
283 // Copy of registry data for use on the IO thread. Changes to the registry | 284 // Copy of registry data for use on the IO thread. Changes to the registry |
284 // are posted to the IO thread where updates are applied to this object. | 285 // are posted to the IO thread where updates are applied to this object. |
285 scoped_refptr<Core> core_; | 286 scoped_refptr<Core> core_; |
286 | 287 |
287 DefaultClientObserverList default_client_observers_; | 288 DefaultClientObserverList default_client_observers_; |
288 | 289 |
289 DISALLOW_COPY_AND_ASSIGN(ProtocolHandlerRegistry); | 290 DISALLOW_COPY_AND_ASSIGN(ProtocolHandlerRegistry); |
290 }; | 291 }; |
291 #endif // CHROME_BROWSER_CUSTOM_HANDLERS_PROTOCOL_HANDLER_REGISTRY_H_ | 292 #endif // CHROME_BROWSER_CUSTOM_HANDLERS_PROTOCOL_HANDLER_REGISTRY_H_ |
OLD | NEW |