OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 3531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3542 document_state->set_request_time(Time::FromDoubleT(event_time)); | 3542 document_state->set_request_time(Time::FromDoubleT(event_time)); |
3543 } | 3543 } |
3544 | 3544 |
3545 // Start time is only set after request time. | 3545 // Start time is only set after request time. |
3546 document_state->set_start_load_time(Time::Now()); | 3546 document_state->set_start_load_time(Time::Now()); |
3547 | 3547 |
3548 bool is_top_most = !frame->parent(); | 3548 bool is_top_most = !frame->parent(); |
3549 if (is_top_most) { | 3549 if (is_top_most) { |
3550 navigation_gesture_ = WebUserGestureIndicator::isProcessingUserGesture() ? | 3550 navigation_gesture_ = WebUserGestureIndicator::isProcessingUserGesture() ? |
3551 NavigationGestureUser : NavigationGestureAuto; | 3551 NavigationGestureUser : NavigationGestureAuto; |
3552 } else if (frame->parent()->isLoading()) { | 3552 } else if (ds->replacesCurrentHistoryItem() || |
3553 // Take note of AUTO_SUBFRAME loads here, so that we can know how to | 3553 !frame->hasCommittedRealDocument()) { |
darin (slow to review)
2013/09/20 22:09:38
I'm having a hard time understanding what the hasC
nasko
2013/09/20 22:30:00
The problem with solely relying on replacesCurrent
| |
3554 // load an error page. See didFailProvisionalLoad. | 3554 // Subframe navigations, which don't add session history items must be |
3555 // marked with AUTO_SUBFRAME. See also didFailProvisionalLoad for how we | |
3556 // handle loading of error pages. | |
3555 document_state->navigation_state()->set_transition_type( | 3557 document_state->navigation_state()->set_transition_type( |
3556 PAGE_TRANSITION_AUTO_SUBFRAME); | 3558 PAGE_TRANSITION_AUTO_SUBFRAME); |
3557 } | 3559 } |
3558 | 3560 |
3559 FOR_EACH_OBSERVER( | 3561 FOR_EACH_OBSERVER( |
3560 RenderViewObserver, observers_, DidStartProvisionalLoad(frame)); | 3562 RenderViewObserver, observers_, DidStartProvisionalLoad(frame)); |
3561 | 3563 |
3562 Send(new ViewHostMsg_DidStartProvisionalLoadForFrame( | 3564 Send(new ViewHostMsg_DidStartProvisionalLoadForFrame( |
3563 routing_id_, frame->identifier(), | 3565 routing_id_, frame->identifier(), |
3564 frame->parent() ? frame->parent()->identifier() : -1, | 3566 frame->parent() ? frame->parent()->identifier() : -1, |
(...skipping 2935 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6500 for (size_t i = 0; i < icon_urls.size(); i++) { | 6502 for (size_t i = 0; i < icon_urls.size(); i++) { |
6501 WebURL url = icon_urls[i].iconURL(); | 6503 WebURL url = icon_urls[i].iconURL(); |
6502 if (!url.isEmpty()) | 6504 if (!url.isEmpty()) |
6503 urls.push_back(FaviconURL(url, | 6505 urls.push_back(FaviconURL(url, |
6504 ToFaviconType(icon_urls[i].iconType()))); | 6506 ToFaviconType(icon_urls[i].iconType()))); |
6505 } | 6507 } |
6506 SendUpdateFaviconURL(urls); | 6508 SendUpdateFaviconURL(urls); |
6507 } | 6509 } |
6508 | 6510 |
6509 } // namespace content | 6511 } // namespace content |
OLD | NEW |