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 3541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3552 document_state->set_request_time(Time::FromDoubleT(event_time)); | 3552 document_state->set_request_time(Time::FromDoubleT(event_time)); |
3553 } | 3553 } |
3554 | 3554 |
3555 // Start time is only set after request time. | 3555 // Start time is only set after request time. |
3556 document_state->set_start_load_time(Time::Now()); | 3556 document_state->set_start_load_time(Time::Now()); |
3557 | 3557 |
3558 bool is_top_most = !frame->parent(); | 3558 bool is_top_most = !frame->parent(); |
3559 if (is_top_most) { | 3559 if (is_top_most) { |
3560 navigation_gesture_ = WebUserGestureIndicator::isProcessingUserGesture() ? | 3560 navigation_gesture_ = WebUserGestureIndicator::isProcessingUserGesture() ? |
3561 NavigationGestureUser : NavigationGestureAuto; | 3561 NavigationGestureUser : NavigationGestureAuto; |
3562 } else if (frame->parent()->isLoading()) { | 3562 } else { |
Charlie Reis
2013/10/02 15:45:49
Style nit: Why move away from "else if"?
nasko
2013/10/02 23:06:46
Intermediate steps where I had more statements. Fi
| |
3563 // Take note of AUTO_SUBFRAME loads here, so that we can know how to | 3563 if (ds->replacesCurrentHistoryItem()) { |
3564 // load an error page. See didFailProvisionalLoad. | 3564 // Subframe navigations, which don't add session history items must be |
Charlie Reis
2013/10/02 15:45:49
nit: "navigations, which" -> "navigations that" (n
nasko
2013/10/02 23:06:46
Done.
| |
3565 document_state->navigation_state()->set_transition_type( | 3565 // marked with AUTO_SUBFRAME. See also didFailProvisionalLoad for how we |
3566 PAGE_TRANSITION_AUTO_SUBFRAME); | 3566 // handle loading of error pages. |
3567 document_state->navigation_state()->set_transition_type( | |
3568 PAGE_TRANSITION_AUTO_SUBFRAME); | |
3569 } | |
3567 } | 3570 } |
3568 | 3571 |
3569 FOR_EACH_OBSERVER( | 3572 FOR_EACH_OBSERVER( |
3570 RenderViewObserver, observers_, DidStartProvisionalLoad(frame)); | 3573 RenderViewObserver, observers_, DidStartProvisionalLoad(frame)); |
3571 | 3574 |
3572 Send(new ViewHostMsg_DidStartProvisionalLoadForFrame( | 3575 Send(new ViewHostMsg_DidStartProvisionalLoadForFrame( |
3573 routing_id_, frame->identifier(), | 3576 routing_id_, frame->identifier(), |
3574 frame->parent() ? frame->parent()->identifier() : -1, | 3577 frame->parent() ? frame->parent()->identifier() : -1, |
3575 is_top_most, ds->request().url())); | 3578 is_top_most, ds->request().url())); |
3576 } | 3579 } |
(...skipping 2928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6505 for (size_t i = 0; i < icon_urls.size(); i++) { | 6508 for (size_t i = 0; i < icon_urls.size(); i++) { |
6506 WebURL url = icon_urls[i].iconURL(); | 6509 WebURL url = icon_urls[i].iconURL(); |
6507 if (!url.isEmpty()) | 6510 if (!url.isEmpty()) |
6508 urls.push_back(FaviconURL(url, | 6511 urls.push_back(FaviconURL(url, |
6509 ToFaviconType(icon_urls[i].iconType()))); | 6512 ToFaviconType(icon_urls[i].iconType()))); |
6510 } | 6513 } |
6511 SendUpdateFaviconURL(urls); | 6514 SendUpdateFaviconURL(urls); |
6512 } | 6515 } |
6513 | 6516 |
6514 } // namespace content | 6517 } // namespace content |
OLD | NEW |