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

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

Issue 519533002: Initial PlzNavigate RDH-side logic. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tests Created 6 years, 2 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_STREAM_HANDLE_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_STREAM_HANDLE_H_
6 #define CONTENT_PUBLIC_BROWSER_STREAM_HANDLE_H_ 6 #define CONTENT_PUBLIC_BROWSER_STREAM_HANDLE_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback_forward.h"
9 #include "base/memory/ref_counted.h"
10 #include "content/common/content_export.h" 9 #include "content/common/content_export.h"
11 #include "url/gurl.h" 10 #include "url/gurl.h"
12 11
13 namespace net {
14 class HttpResponseHeaders;
15 }
16
17 namespace content { 12 namespace content {
18 13
14 // A handle to a Stream. When the handle is destroyed, the stream is released
15 // and the URL is invalidated.
19 class CONTENT_EXPORT StreamHandle { 16 class CONTENT_EXPORT StreamHandle {
20 public: 17 public:
21 virtual ~StreamHandle() {} 18 virtual ~StreamHandle() {}
22 19
23 // Gets the URL the stream can be read from. 20 // Gets the URL the stream can be read from.
24 virtual const GURL& GetURL() = 0; 21 virtual const GURL& GetURL() = 0;
25 22
26 // Gets the original URL being redirected to this Stream.
27 virtual const GURL& GetOriginalURL() = 0;
28
29 // Get the MIME type associated with this Stream.
30 virtual const std::string& GetMimeType() = 0;
31
32 // Get the HTTP response headers associated with this Stream.
33 virtual scoped_refptr<net::HttpResponseHeaders> GetResponseHeaders() = 0;
34
35 // Add a callback which will be called when the Stream is closed. 23 // Add a callback which will be called when the Stream is closed.
36 virtual void AddCloseListener(const base::Closure& callback) = 0; 24 virtual void AddCloseListener(const base::Closure& callback) = 0;
37 }; 25 };
38 26
39 } // namespace content 27 } // namespace content
40 28
41 #endif // CONTENT_PUBLIC_BROWSER_STREAM_HANDLE_H_ 29 #endif // CONTENT_PUBLIC_BROWSER_STREAM_HANDLE_H_
OLDNEW
« no previous file with comments | « content/public/browser/resource_dispatcher_host_delegate.cc ('k') | content/public/browser/stream_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698