Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(615)

Side by Side Diff: chrome/browser/custom_handlers/protocol_handler_registry.h

Issue 2896473002: Remove FILE thread dependency in protocol_handler_registry_unittest.cc (Closed)
Patch Set: MakeShared to MakeRefCounted Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/custom_handlers/protocol_handler_registry.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 IsExternalHandlerRegistered(const std::string& protocol);
52 virtual scoped_refptr<shell_integration::DefaultProtocolClientWorker>
53 CreateShellWorker(
54 const shell_integration::DefaultWebClientWorkerCallback& callback,
55 const std::string& protocol);
56 virtual void RegisterWithOSAsDefaultClient( 52 virtual void RegisterWithOSAsDefaultClient(
57 const std::string& protocol, 53 const std::string& protocol,
58 ProtocolHandlerRegistry* registry); 54 ProtocolHandlerRegistry* registry);
59 }; 55 };
60 56
61 // Forward declaration of the internal implementation class. 57 // Forward declaration of the internal implementation class.
62 class IOThreadDelegate; 58 class IOThreadDelegate;
63 59
64 // JobInterceptorFactory intercepts URLRequestJob creation for URLRequests the 60 // JobInterceptorFactory intercepts URLRequestJob creation for URLRequests the
65 // ProtocolHandlerRegistry is registered to handle. When no handler is 61 // ProtocolHandlerRegistry is registered to handle. When no handler is
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 // are posted to the IO thread where updates are applied to this object. 359 // are posted to the IO thread where updates are applied to this object.
364 scoped_refptr<IOThreadDelegate> io_thread_delegate_; 360 scoped_refptr<IOThreadDelegate> io_thread_delegate_;
365 361
366 // Makes it possible to invalidate the callback for the 362 // Makes it possible to invalidate the callback for the
367 // DefaultProtocolClientWorker. 363 // DefaultProtocolClientWorker.
368 base::WeakPtrFactory<ProtocolHandlerRegistry> weak_ptr_factory_; 364 base::WeakPtrFactory<ProtocolHandlerRegistry> weak_ptr_factory_;
369 365
370 DISALLOW_COPY_AND_ASSIGN(ProtocolHandlerRegistry); 366 DISALLOW_COPY_AND_ASSIGN(ProtocolHandlerRegistry);
371 }; 367 };
372 #endif // CHROME_BROWSER_CUSTOM_HANDLERS_PROTOCOL_HANDLER_REGISTRY_H_ 368 #endif // CHROME_BROWSER_CUSTOM_HANDLERS_PROTOCOL_HANDLER_REGISTRY_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/custom_handlers/protocol_handler_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698