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

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

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

Powered by Google App Engine
This is Rietveld 408576698