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

Side by Side Diff: components/web_view/navigation_entry.h

Issue 1326443006: mandoline: Add back/forward support and UI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix comment Created 5 years, 3 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
(Empty)
1 // Copyright 2015 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 COMPONENTS_WEB_VIEW_NAVIGATION_ENTRY_H_
6 #define COMPONENTS_WEB_VIEW_NAVIGATION_ENTRY_H_
7
msw 2015/09/04 22:05:00 nit: include <vector> and <string>
8 #include "base/basictypes.h"
9 #include "mojo/services/network/public/interfaces/url_loader.mojom.h"
10
11 namespace web_view {
12
13 // The WebView system takes incoming mojo::URLRequests and then needs to hand
14 // them off to other processes. However, moving back and forward requires
msw 2015/09/04 22:05:00 Do you mean "moving back and then forward" (ie. to
15 // resending the same url request multiple times. However, the URLRequest
16 // struct uses handles to transfer large amounts of data between processes,
17 // which makes it not copyable. This class takes the data, stores it, and then
18 // vends new URLRequests on demand.
19 class NavigationEntry {
msw 2015/09/04 22:05:00 As we discussed, I'm surprised we don't have a mor
20 public:
21 NavigationEntry(mojo::URLRequestPtr incoming_mojo_request);
msw 2015/09/04 22:05:00 Explicit
msw 2015/09/04 22:05:00 optional nit: rename incoming_mojo_request to requ
22 ~NavigationEntry();
23
24 // Creates a new URLRequest.
25 mojo::URLRequestPtr AsURLRequest();
msw 2015/09/04 22:05:00 Const function
msw 2015/09/04 22:05:00 nit: rename Clone or Copy?
26
27 private:
28 // All of these are straight from mojo::URLRequest.
29 mojo::String url_;
30 mojo::String method_;
31 mojo::Array<mojo::HttpHeaderPtr> headers_;
32 uint32_t response_body_buffer_size_;
33 bool auto_follow_redirects_;
34 bool bypass_cache_;
35
36 // This is a serialized version of the data from mojo::URLRequest. We copy
37 // this data straight out of the data pipes, and then serve it any time that
38 // AsURLRequest() is called.
39 std::vector<std::string> body_;
40
41 DISALLOW_COPY_AND_ASSIGN(NavigationEntry);
42 };
43
44 } // namespace web_view
45
46 #endif // COMPONENTS_WEB_VIEW_NAVIGATION_ENTRY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698