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

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

Issue 1693353002: Reland #2 Remove the is_loading_ field from WebContentsImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Checking whether the frame is loading on history navigations Created 4 years, 10 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 /* 5 /*
6 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 6 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
8 * (http://www.torchmobile.com/) 8 * (http://www.torchmobile.com/)
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 // 110 //
111 class CONTENT_EXPORT HistoryController { 111 class CONTENT_EXPORT HistoryController {
112 public: 112 public:
113 explicit HistoryController(RenderViewImpl* render_view); 113 explicit HistoryController(RenderViewImpl* render_view);
114 ~HistoryController(); 114 ~HistoryController();
115 115
116 void set_provisional_entry(scoped_ptr<HistoryEntry> entry) { 116 void set_provisional_entry(scoped_ptr<HistoryEntry> entry) {
117 provisional_entry_ = std::move(entry); 117 provisional_entry_ = std::move(entry);
118 } 118 }
119 119
120 void GoToEntry(blink::WebLocalFrame* main_frame, 120 // Return true if the main frame ended up loading a request as part of the
121 // history navigation.
122 bool GoToEntry(blink::WebLocalFrame* main_frame,
Charlie Reis 2016/02/17 05:15:28 Hmm, I'm not thrilled with this change, partly bec
clamy 2016/02/17 14:42:06 With the change, we set is_loading_ to true at the
Charlie Reis 2016/02/17 23:34:26 I see, so it's just a consequence of the old desig
clamy 2016/02/18 17:20:27 That's what I did initially and that caused the re
Charlie Reis 2016/02/19 05:24:54 Sigh. I would say that we should understand why t
121 scoped_ptr<HistoryEntry> entry, 123 scoped_ptr<HistoryEntry> entry,
122 scoped_ptr<NavigationParams> navigation_params, 124 scoped_ptr<NavigationParams> navigation_params,
123 blink::WebURLRequest::CachePolicy cache_policy); 125 blink::WebURLRequest::CachePolicy cache_policy);
124 126
125 void UpdateForCommit(RenderFrameImpl* frame, 127 void UpdateForCommit(RenderFrameImpl* frame,
126 const blink::WebHistoryItem& item, 128 const blink::WebHistoryItem& item,
127 blink::WebHistoryCommitType commit_type, 129 blink::WebHistoryCommitType commit_type,
128 bool navigation_within_page); 130 bool navigation_within_page);
129 131
130 HistoryEntry* GetCurrentEntry(); 132 HistoryEntry* GetCurrentEntry();
(...skipping 26 matching lines...) Expand all
157 // passed into frames created after the commit that resulted from the 159 // passed into frames created after the commit that resulted from the
158 // navigation in GetItemForNewChildFrame(). 160 // navigation in GetItemForNewChildFrame().
159 scoped_ptr<NavigationParams> navigation_params_; 161 scoped_ptr<NavigationParams> navigation_params_;
160 162
161 DISALLOW_COPY_AND_ASSIGN(HistoryController); 163 DISALLOW_COPY_AND_ASSIGN(HistoryController);
162 }; 164 };
163 165
164 } // namespace content 166 } // namespace content
165 167
166 #endif // CONTENT_RENDERER_HISTORY_CONTROLLER_H_ 168 #endif // CONTENT_RENDERER_HISTORY_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698