| 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 <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 }; | 41 }; |
| 42 | 42 |
| 43 // |Delegate| provides an interface for interacting asynchronously | 43 // |Delegate| provides an interface for interacting asynchronously |
| 44 // with the underlying OS for the purposes of registering Chrome | 44 // with the underlying OS for the purposes of registering Chrome |
| 45 // as the default handler for specific protocols. | 45 // as the default handler for specific protocols. |
| 46 class Delegate { | 46 class Delegate { |
| 47 public: | 47 public: |
| 48 virtual ~Delegate(); | 48 virtual ~Delegate(); |
| 49 virtual void RegisterExternalHandler(const std::string& protocol); | 49 virtual void RegisterExternalHandler(const std::string& protocol); |
| 50 virtual void DeregisterExternalHandler(const std::string& protocol); | 50 virtual void DeregisterExternalHandler(const std::string& protocol); |
| 51 virtual bool IsExternalHandlerRegistered(const std::string& protocol); | 51 virtual bool CanSchemeBeOverridden(const std::string& protocol); |
| 52 virtual scoped_refptr<shell_integration::DefaultProtocolClientWorker> | 52 virtual scoped_refptr<shell_integration::DefaultProtocolClientWorker> |
| 53 CreateShellWorker( | 53 CreateShellWorker( |
| 54 const shell_integration::DefaultWebClientWorkerCallback& callback, | 54 const shell_integration::DefaultWebClientWorkerCallback& callback, |
| 55 const std::string& protocol); | 55 const std::string& protocol); |
| 56 virtual void RegisterWithOSAsDefaultClient( | 56 virtual void RegisterWithOSAsDefaultClient( |
| 57 const std::string& protocol, | 57 const std::string& protocol, |
| 58 ProtocolHandlerRegistry* registry); | 58 ProtocolHandlerRegistry* registry); |
| 59 }; | 59 }; |
| 60 | 60 |
| 61 // Forward declaration of the internal implementation class. | 61 // Forward declaration of the internal implementation class. |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 // are posted to the IO thread where updates are applied to this object. | 364 // are posted to the IO thread where updates are applied to this object. |
| 365 scoped_refptr<IOThreadDelegate> io_thread_delegate_; | 365 scoped_refptr<IOThreadDelegate> io_thread_delegate_; |
| 366 | 366 |
| 367 // Makes it possible to invalidate the callback for the | 367 // Makes it possible to invalidate the callback for the |
| 368 // DefaultProtocolClientWorker. | 368 // DefaultProtocolClientWorker. |
| 369 base::WeakPtrFactory<ProtocolHandlerRegistry> weak_ptr_factory_; | 369 base::WeakPtrFactory<ProtocolHandlerRegistry> weak_ptr_factory_; |
| 370 | 370 |
| 371 DISALLOW_COPY_AND_ASSIGN(ProtocolHandlerRegistry); | 371 DISALLOW_COPY_AND_ASSIGN(ProtocolHandlerRegistry); |
| 372 }; | 372 }; |
| 373 #endif // CHROME_BROWSER_CUSTOM_HANDLERS_PROTOCOL_HANDLER_REGISTRY_H_ | 373 #endif // CHROME_BROWSER_CUSTOM_HANDLERS_PROTOCOL_HANDLER_REGISTRY_H_ |
| OLD | NEW |