droger | 476922e0 | 2015-03-10 17:17:52 | [diff] [blame] | 1 | // Copyright 2012 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef IOS_NET_CRN_HTTP_PROTOCOL_HANDLER_PROXY_H_ |
| 6 | #define IOS_NET_CRN_HTTP_PROTOCOL_HANDLER_PROXY_H_ |
| 7 | |
| 8 | #import <Foundation/Foundation.h> |
| 9 | |
| 10 | #import "ios/net/clients/crn_network_client_protocol.h" |
| 11 | |
| 12 | // HttpProtocolHandlerProxy is responsible for managing access to the |
| 13 | // NSURLProtocol and its client. |
| 14 | @protocol CRNHTTPProtocolHandlerProxy<CRNNetworkClientProtocol> |
| 15 | |
ellyjones | 7d0f7a2 | 2015-06-12 15:30:00 | [diff] [blame] | 16 | // All of the methods defined below must be called on the client thread. Methods |
| 17 | // defined by |CRNNetworkClientProtocol| can be called on any thread. |
| 18 | |
droger | 476922e0 | 2015-03-10 17:17:52 | [diff] [blame] | 19 | // Invalidates any reference to the protocol handler: the handler will never |
| 20 | // be called after this. |
droger | 476922e0 | 2015-03-10 17:17:52 | [diff] [blame] | 21 | - (void)invalidate; |
| 22 | |
ellyjones | 7d0f7a2 | 2015-06-12 15:30:00 | [diff] [blame] | 23 | // Pauses notifications from this protocol handler. |
| 24 | - (void)pause; |
| 25 | |
| 26 | // Resumes notifications from this protocol handler. |
| 27 | - (void)resume; |
| 28 | |
droger | 476922e0 | 2015-03-10 17:17:52 | [diff] [blame] | 29 | @end |
| 30 | |
| 31 | #endif // IOS_NET_CRN_HTTP_PROTOCOL_HANDLER_PROXY_H_ |