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

Side by Side Diff: content/renderer/render_frame_impl.h

Issue 2454233002: Fix history nav to a script-injected about:blank frame. (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « content/common/navigation_params.cc ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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_RENDERER_RENDER_FRAME_IMPL_H_ 5 #ifndef CONTENT_RENDERER_RENDER_FRAME_IMPL_H_
6 #define CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ 6 #define CONTENT_RENDERER_RENDER_FRAME_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <map>
11 #include <memory> 12 #include <memory>
12 #include <string> 13 #include <string>
13 #include <vector> 14 #include <vector>
14 15
15 #include "base/files/file_path.h" 16 #include "base/files/file_path.h"
16 #include "base/gtest_prod_util.h" 17 #include "base/gtest_prod_util.h"
17 #include "base/id_map.h" 18 #include "base/id_map.h"
18 #include "base/macros.h" 19 #include "base/macros.h"
19 #include "base/memory/linked_ptr.h" 20 #include "base/memory/linked_ptr.h"
20 #include "base/memory/ref_counted.h" 21 #include "base/memory/ref_counted.h"
(...skipping 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after
1084 // layout, etc. A local frame is also a local root iff it does not have a 1085 // layout, etc. A local frame is also a local root iff it does not have a
1085 // parent that is a local frame. 1086 // parent that is a local frame.
1086 scoped_refptr<RenderWidget> render_widget_; 1087 scoped_refptr<RenderWidget> render_widget_;
1087 1088
1088 // Temporarily holds state pertaining to a navigation that has been initiated 1089 // Temporarily holds state pertaining to a navigation that has been initiated
1089 // until the NavigationState corresponding to the new navigation is created in 1090 // until the NavigationState corresponding to the new navigation is created in
1090 // didCreateDataSource(). 1091 // didCreateDataSource().
1091 std::unique_ptr<NavigationParams> pending_navigation_params_; 1092 std::unique_ptr<NavigationParams> pending_navigation_params_;
1092 1093
1093 // Keeps track of which future subframes the browser process has history items 1094 // Keeps track of which future subframes the browser process has history items
1094 // for during a history navigation. The renderer process should ask the 1095 // for during a history navigation, as well as whether those items are for
1095 // browser for history items when subframes with these names are created, and 1096 // about:blank. The renderer process should ask the browser for history items
1096 // directly load the initial URLs for any other subframes. This state is 1097 // when subframes with these names are created (as long as they are not
1097 // incrementally cleared as it is used and then reset in didStopLoading, since 1098 // staying at about:blank), and directly load the initial URLs for any other
1098 // it is not needed after the first load completes and is never used after the 1099 // subframes.
1099 // initial navigation. 1100 //
1101 // This state is incrementally cleared as it is used and then reset in
1102 // didStopLoading, since it is not needed after the first load completes and
1103 // is never used after the initial navigation.
1100 // TODO(creis): Expand this to include any corresponding same-process 1104 // TODO(creis): Expand this to include any corresponding same-process
1101 // PageStates for the whole subtree in https://crbug.com/639842. 1105 // PageStates for the whole subtree in https://crbug.com/639842.
1102 std::set<std::string> history_subframe_unique_names_; 1106 std::map<std::string, bool> history_subframe_unique_names_;
1103 1107
1104 // Stores the current history item for this frame, so that updates to it can 1108 // Stores the current history item for this frame, so that updates to it can
1105 // be reported to the browser process via SendUpdateState. 1109 // be reported to the browser process via SendUpdateState.
1106 blink::WebHistoryItem current_history_item_; 1110 blink::WebHistoryItem current_history_item_;
1107 1111
1108 #if defined(ENABLE_PLUGINS) 1112 #if defined(ENABLE_PLUGINS)
1109 // Current text input composition text. Empty if no composition is in 1113 // Current text input composition text. Empty if no composition is in
1110 // progress. 1114 // progress.
1111 base::string16 pepper_composition_text_; 1115 base::string16 pepper_composition_text_;
1112 1116
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
1293 mojom::FrameHostPtr frame_host_; 1297 mojom::FrameHostPtr frame_host_;
1294 1298
1295 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; 1299 base::WeakPtrFactory<RenderFrameImpl> weak_factory_;
1296 1300
1297 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); 1301 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl);
1298 }; 1302 };
1299 1303
1300 } // namespace content 1304 } // namespace content
1301 1305
1302 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ 1306 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_
OLDNEW
« no previous file with comments | « content/common/navigation_params.cc ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698