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 CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ |
6 #define CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ | 6 #define CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/files/file_path.h" | |
11 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
12 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
13 #include "content/public/common/resource_type.h" | 14 #include "content/public/common/resource_type.h" |
14 | 15 |
15 class GURL; | 16 class GURL; |
16 template <class T> class ScopedVector; | 17 template <class T> class ScopedVector; |
17 | 18 |
18 namespace IPC { | 19 namespace IPC { |
19 class Sender; | 20 class Sender; |
20 } | 21 } |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
85 // resource. | 86 // resource. |
86 // If true is returned, a new Stream will be created and OnStreamCreated() | 87 // If true is returned, a new Stream will be created and OnStreamCreated() |
87 // will be called with | 88 // will be called with |
88 // - a StreamHandle instance for the Stream. The handle contains the URL for | 89 // - a StreamHandle instance for the Stream. The handle contains the URL for |
89 // reading the Stream etc. | 90 // reading the Stream etc. |
90 // The Stream's origin will be set to |origin|. | 91 // The Stream's origin will be set to |origin|. |
91 // | 92 // |
92 // If the stream will be rendered in a BrowserPlugin, |payload| will contain | 93 // If the stream will be rendered in a BrowserPlugin, |payload| will contain |
93 // the data that should be given to the old ResourceHandler to forward to the | 94 // the data that should be given to the old ResourceHandler to forward to the |
94 // renderer process. | 95 // renderer process. |
95 virtual bool ShouldInterceptResourceAsStream(net::URLRequest* request, | 96 virtual bool ShouldInterceptResourceAsStream(const base::FilePath& file_path, |
raymes
2015/03/12 05:21:04
plugin_path
Deepak
2015/03/12 12:33:18
Done.
| |
97 net::URLRequest* request, | |
96 const std::string& mime_type, | 98 const std::string& mime_type, |
97 GURL* origin, | 99 GURL* origin, |
98 std::string* payload); | 100 std::string* payload); |
99 | 101 |
100 // Informs the delegate that a Stream was created. The Stream can be read from | 102 // Informs the delegate that a Stream was created. The Stream can be read from |
101 // the blob URL of the Stream, but can only be read once. | 103 // the blob URL of the Stream, but can only be read once. |
102 virtual void OnStreamCreated(net::URLRequest* request, | 104 virtual void OnStreamCreated(net::URLRequest* request, |
103 scoped_ptr<content::StreamInfo> stream); | 105 scoped_ptr<content::StreamInfo> stream); |
104 | 106 |
105 // Informs the delegate that a response has started. | 107 // Informs the delegate that a response has started. |
(...skipping 12 matching lines...) Expand all Loading... | |
118 virtual void RequestComplete(net::URLRequest* url_request); | 120 virtual void RequestComplete(net::URLRequest* url_request); |
119 | 121 |
120 protected: | 122 protected: |
121 ResourceDispatcherHostDelegate(); | 123 ResourceDispatcherHostDelegate(); |
122 virtual ~ResourceDispatcherHostDelegate(); | 124 virtual ~ResourceDispatcherHostDelegate(); |
123 }; | 125 }; |
124 | 126 |
125 } // namespace content | 127 } // namespace content |
126 | 128 |
127 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ | 129 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ |
OLD | NEW |