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

Side by Side Diff: content/public/browser/resource_dispatcher_host_delegate.h

Issue 1081013002: Revert of Ensuring interception of stream get determined by plugin path before checking mime type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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
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 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"
12 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
13 #include "content/common/content_export.h" 12 #include "content/common/content_export.h"
14 #include "content/public/common/resource_type.h" 13 #include "content/public/common/resource_type.h"
15 14
16 class GURL; 15 class GURL;
17 template <class T> class ScopedVector; 16 template <class T> class ScopedVector;
18 17
19 namespace IPC { 18 namespace IPC {
20 class Sender; 19 class Sender;
21 } 20 }
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 // resource. 85 // resource.
87 // If true is returned, a new Stream will be created and OnStreamCreated() 86 // If true is returned, a new Stream will be created and OnStreamCreated()
88 // will be called with 87 // will be called with
89 // - a StreamHandle instance for the Stream. The handle contains the URL for 88 // - a StreamHandle instance for the Stream. The handle contains the URL for
90 // reading the Stream etc. 89 // reading the Stream etc.
91 // The Stream's origin will be set to |origin|. 90 // The Stream's origin will be set to |origin|.
92 // 91 //
93 // If the stream will be rendered in a BrowserPlugin, |payload| will contain 92 // If the stream will be rendered in a BrowserPlugin, |payload| will contain
94 // the data that should be given to the old ResourceHandler to forward to the 93 // the data that should be given to the old ResourceHandler to forward to the
95 // renderer process. 94 // renderer process.
96 virtual bool ShouldInterceptResourceAsStream( 95 virtual bool ShouldInterceptResourceAsStream(net::URLRequest* request,
97 net::URLRequest* request, 96 const std::string& mime_type,
98 const base::FilePath& plugin_path, 97 GURL* origin,
99 const std::string& mime_type, 98 std::string* payload);
100 GURL* origin,
101 std::string* payload);
102 99
103 // Informs the delegate that a Stream was created. The Stream can be read from 100 // Informs the delegate that a Stream was created. The Stream can be read from
104 // the blob URL of the Stream, but can only be read once. 101 // the blob URL of the Stream, but can only be read once.
105 virtual void OnStreamCreated(net::URLRequest* request, 102 virtual void OnStreamCreated(net::URLRequest* request,
106 scoped_ptr<content::StreamInfo> stream); 103 scoped_ptr<content::StreamInfo> stream);
107 104
108 // Informs the delegate that a response has started. 105 // Informs the delegate that a response has started.
109 virtual void OnResponseStarted(net::URLRequest* request, 106 virtual void OnResponseStarted(net::URLRequest* request,
110 ResourceContext* resource_context, 107 ResourceContext* resource_context,
111 ResourceResponse* response, 108 ResourceResponse* response,
112 IPC::Sender* sender); 109 IPC::Sender* sender);
113 110
114 // Informs the delegate that a request has been redirected. 111 // Informs the delegate that a request has been redirected.
115 virtual void OnRequestRedirected(const GURL& redirect_url, 112 virtual void OnRequestRedirected(const GURL& redirect_url,
116 net::URLRequest* request, 113 net::URLRequest* request,
117 ResourceContext* resource_context, 114 ResourceContext* resource_context,
118 ResourceResponse* response); 115 ResourceResponse* response);
119 116
120 // Notification that a request has completed. 117 // Notification that a request has completed.
121 virtual void RequestComplete(net::URLRequest* url_request); 118 virtual void RequestComplete(net::URLRequest* url_request);
122 119
123 protected: 120 protected:
124 ResourceDispatcherHostDelegate(); 121 ResourceDispatcherHostDelegate();
125 virtual ~ResourceDispatcherHostDelegate(); 122 virtual ~ResourceDispatcherHostDelegate();
126 }; 123 };
127 124
128 } // namespace content 125 } // namespace content
129 126
130 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ 127 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_
OLDNEW
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_impl.cc ('k') | content/public/browser/resource_dispatcher_host_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698