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

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

Issue 2359723007: PlzNavigate: update navigation only if it took place. (Closed)
Patch Set: Addressed comments. 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
« no previous file with comments | « no previous file | testing/buildbot/filters/browser-side-navigation.linux.browser_tests.filter » ('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 #include "content/renderer/render_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 3160 matching lines...) Expand 10 before | Expand all | Expand 10 after
3171 } 3171 }
3172 } 3172 }
3173 3173
3174 NavigationStateImpl* navigation_state = static_cast<NavigationStateImpl*>( 3174 NavigationStateImpl* navigation_state = static_cast<NavigationStateImpl*>(
3175 document_state->navigation_state()); 3175 document_state->navigation_state());
3176 3176
3177 // Set the navigation start time in blink. 3177 // Set the navigation start time in blink.
3178 datasource->setNavigationStartTime( 3178 datasource->setNavigationStartTime(
3179 ConvertToBlinkTime(navigation_state->common_params().navigation_start)); 3179 ConvertToBlinkTime(navigation_state->common_params().navigation_start));
3180 3180
3181 if (IsBrowserSideNavigationEnabled()) { 3181 // PlzNavigate: if an actual navigation took place, inform the datasource of
3182 // what happened in the browser.
3183 if (IsBrowserSideNavigationEnabled() &&
3184 !navigation_state->request_params()
3185 .navigation_timing.fetch_start.is_null()) {
3182 // Set timing of several events that happened during navigation. 3186 // Set timing of several events that happened during navigation.
3183 // They will be used in blink for the Navigation Timing API. 3187 // They will be used in blink for the Navigation Timing API.
3184 double redirect_start = ConvertToBlinkTime( 3188 double redirect_start = ConvertToBlinkTime(
3185 navigation_state->request_params().navigation_timing.redirect_start); 3189 navigation_state->request_params().navigation_timing.redirect_start);
3186 double redirect_end = ConvertToBlinkTime( 3190 double redirect_end = ConvertToBlinkTime(
3187 navigation_state->request_params().navigation_timing.redirect_end); 3191 navigation_state->request_params().navigation_timing.redirect_end);
3188 double fetch_start = ConvertToBlinkTime( 3192 double fetch_start = ConvertToBlinkTime(
3189 navigation_state->request_params().navigation_timing.fetch_start); 3193 navigation_state->request_params().navigation_timing.fetch_start);
3190 std::vector<GURL> redirectChain = 3194 std::vector<GURL> redirectChain =
3191 navigation_state->request_params().redirects; 3195 navigation_state->request_params().redirects;
(...skipping 3218 matching lines...) Expand 10 before | Expand all | Expand 10 after
6410 // event target. Potentially a Pepper plugin will receive the event. 6414 // event target. Potentially a Pepper plugin will receive the event.
6411 // In order to tell whether a plugin gets the last mouse event and which it 6415 // In order to tell whether a plugin gets the last mouse event and which it
6412 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6416 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6413 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6417 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6414 // |pepper_last_mouse_event_target_|. 6418 // |pepper_last_mouse_event_target_|.
6415 pepper_last_mouse_event_target_ = nullptr; 6419 pepper_last_mouse_event_target_ = nullptr;
6416 #endif 6420 #endif
6417 } 6421 }
6418 6422
6419 } // namespace content 6423 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | testing/buildbot/filters/browser-side-navigation.linux.browser_tests.filter » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698