| 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 if (ds->replacesCurrentHistoryItem()) { |
| 3563 // Take note of AUTO_SUBFRAME loads here, so that we can know how to | 3563 // Subframe navigations that don't add session history items must be |
| 3564 // load an error page. See didFailProvisionalLoad. | 3564 // marked with AUTO_SUBFRAME. See also didFailProvisionalLoad for how we |
| 3565 // handle loading of error pages. |
| 3565 document_state->navigation_state()->set_transition_type( | 3566 document_state->navigation_state()->set_transition_type( |
| 3566 PAGE_TRANSITION_AUTO_SUBFRAME); | 3567 PAGE_TRANSITION_AUTO_SUBFRAME); |
| 3567 } | 3568 } |
| 3568 | 3569 |
| 3569 FOR_EACH_OBSERVER( | 3570 FOR_EACH_OBSERVER( |
| 3570 RenderViewObserver, observers_, DidStartProvisionalLoad(frame)); | 3571 RenderViewObserver, observers_, DidStartProvisionalLoad(frame)); |
| 3571 | 3572 |
| 3572 Send(new ViewHostMsg_DidStartProvisionalLoadForFrame( | 3573 Send(new ViewHostMsg_DidStartProvisionalLoadForFrame( |
| 3573 routing_id_, frame->identifier(), | 3574 routing_id_, frame->identifier(), |
| 3574 frame->parent() ? frame->parent()->identifier() : -1, | 3575 frame->parent() ? frame->parent()->identifier() : -1, |
| (...skipping 2930 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6505 for (size_t i = 0; i < icon_urls.size(); i++) { | 6506 for (size_t i = 0; i < icon_urls.size(); i++) { |
| 6506 WebURL url = icon_urls[i].iconURL(); | 6507 WebURL url = icon_urls[i].iconURL(); |
| 6507 if (!url.isEmpty()) | 6508 if (!url.isEmpty()) |
| 6508 urls.push_back(FaviconURL(url, | 6509 urls.push_back(FaviconURL(url, |
| 6509 ToFaviconType(icon_urls[i].iconType()))); | 6510 ToFaviconType(icon_urls[i].iconType()))); |
| 6510 } | 6511 } |
| 6511 SendUpdateFaviconURL(urls); | 6512 SendUpdateFaviconURL(urls); |
| 6512 } | 6513 } |
| 6513 | 6514 |
| 6514 } // namespace content | 6515 } // namespace content |
| OLD | NEW |