OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2016 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 NET_SPDY_PUSH_DELEGATE_H_ | |
6 #define NET_SPDY_PUSH_DELEGATE_H_ | |
7 | |
8 #include "net/base/net_export.h" | |
9 #include "url/gurl.h" | |
10 | |
11 namespace net { | |
12 | |
13 // An interface to a class that reflects information on the pushed request. | |
14 class NET_EXPORT PushPromiseHelper { | |
Ryan Hamilton
2016/10/28 00:32:22
This class exists to be used by the delegate, righ
Zhongyi Shi
2016/11/07 22:07:03
Done.
| |
15 public: | |
16 virtual ~PushPromiseHelper() {} | |
17 | |
18 // Cancels the push if it is not claimed yet. | |
19 virtual void Cancel() = 0; | |
20 | |
21 // Gets the URL of the pushed request. | |
22 virtual const GURL& GetURL() = 0; | |
23 }; | |
24 | |
25 class NET_EXPORT PushDelegate { | |
26 public: | |
27 virtual ~PushDelegate() {} | |
28 | |
29 // Invoked by session when a push promise has been received. | |
30 virtual void OnPush(std::unique_ptr<PushPromiseHelper> push_promise) = 0; | |
Ryan Hamilton
2016/10/28 00:32:22
Instead of putting the URL into the Helper and the
Zhongyi Shi
2016/11/07 22:07:03
There would be only one implementation of PushDele
Ryan Hamilton
2016/11/08 22:27:01
But both places OnPush() is called, the URL is sit
| |
31 }; | |
32 | |
33 } // namespace net | |
34 | |
35 #endif // NET_SPDY_PUSH_DELEGATE_H_ | |
OLD | NEW |