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

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

Issue 2445053002: 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 1080 matching lines...) Expand 10 before | Expand all | Expand 10 after
1101 // layout, etc. A local frame is also a local root iff it does not have a 1102 // layout, etc. A local frame is also a local root iff it does not have a
1102 // parent that is a local frame. 1103 // parent that is a local frame.
1103 scoped_refptr<RenderWidget> render_widget_; 1104 scoped_refptr<RenderWidget> render_widget_;
1104 1105
1105 // Temporarily holds state pertaining to a navigation that has been initiated 1106 // Temporarily holds state pertaining to a navigation that has been initiated
1106 // until the NavigationState corresponding to the new navigation is created in 1107 // until the NavigationState corresponding to the new navigation is created in
1107 // didCreateDataSource(). 1108 // didCreateDataSource().
1108 std::unique_ptr<NavigationParams> pending_navigation_params_; 1109 std::unique_ptr<NavigationParams> pending_navigation_params_;
1109 1110
1110 // Keeps track of which future subframes the browser process has history items 1111 // Keeps track of which future subframes the browser process has history items
1111 // for during a history navigation. The renderer process should ask the 1112 // for during a history navigation, as well as whether those items are for
1112 // browser for history items when subframes with these names are created, and 1113 // about:blank. The renderer process should ask the browser for history items
1113 // directly load the initial URLs for any other subframes. This state is 1114 // when subframes with these names are created (as long as they are not
1114 // incrementally cleared as it is used and then reset in didStopLoading, since 1115 // staying at about:blank), and directly load the initial URLs for any other
1115 // it is not needed after the first load completes and is never used after the 1116 // subframes.
1116 // initial navigation. 1117 //
1118 // This state is incrementally cleared as it is used and then reset in
1119 // didStopLoading, since it is not needed after the first load completes and
1120 // is never used after the initial navigation.
1117 // TODO(creis): Expand this to include any corresponding same-process 1121 // TODO(creis): Expand this to include any corresponding same-process
1118 // PageStates for the whole subtree in https://crbug.com/639842. 1122 // PageStates for the whole subtree in https://crbug.com/639842.
1119 std::set<std::string> history_subframe_unique_names_; 1123 std::map<std::string, bool> history_subframe_unique_names_;
1120 1124
1121 // Stores the current history item for this frame, so that updates to it can 1125 // Stores the current history item for this frame, so that updates to it can
1122 // be reported to the browser process via SendUpdateState. 1126 // be reported to the browser process via SendUpdateState.
1123 blink::WebHistoryItem current_history_item_; 1127 blink::WebHistoryItem current_history_item_;
1124 1128
1125 #if defined(ENABLE_PLUGINS) 1129 #if defined(ENABLE_PLUGINS)
1126 // Current text input composition text. Empty if no composition is in 1130 // Current text input composition text. Empty if no composition is in
1127 // progress. 1131 // progress.
1128 base::string16 pepper_composition_text_; 1132 base::string16 pepper_composition_text_;
1129 1133
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
1309 bool name_changed_before_first_commit_ = false; 1313 bool name_changed_before_first_commit_ = false;
1310 1314
1311 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; 1315 base::WeakPtrFactory<RenderFrameImpl> weak_factory_;
1312 1316
1313 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); 1317 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl);
1314 }; 1318 };
1315 1319
1316 } // namespace content 1320 } // namespace content
1317 1321
1318 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ 1322 #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