OLD | NEW |
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/browser/frame_host/render_frame_host_impl.h" | 5 #include "content/browser/frame_host/render_frame_host_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/containers/hash_tables.h" | 9 #include "base/containers/hash_tables.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 1028 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1039 void RenderFrameHostImpl::OnDidAssignPageId(int32 page_id) { | 1039 void RenderFrameHostImpl::OnDidAssignPageId(int32 page_id) { |
1040 // Update the RVH's current page ID so that future IPCs from the renderer | 1040 // Update the RVH's current page ID so that future IPCs from the renderer |
1041 // correspond to the new page. | 1041 // correspond to the new page. |
1042 render_view_host_->page_id_ = page_id; | 1042 render_view_host_->page_id_ = page_id; |
1043 } | 1043 } |
1044 | 1044 |
1045 void RenderFrameHostImpl::OnUpdateTitle( | 1045 void RenderFrameHostImpl::OnUpdateTitle( |
1046 int32 page_id, | 1046 int32 page_id, |
1047 const base::string16& title, | 1047 const base::string16& title, |
1048 blink::WebTextDirection title_direction) { | 1048 blink::WebTextDirection title_direction) { |
1049 CHECK_EQ(render_view_host_->page_id_, page_id); | |
1050 // This message is only sent for top-level frames. TODO(avi): when frame tree | 1049 // This message is only sent for top-level frames. TODO(avi): when frame tree |
1051 // mirroring works correctly, add a check here to enforce it. | 1050 // mirroring works correctly, add a check here to enforce it. |
1052 if (title.length() > kMaxTitleChars) { | 1051 if (title.length() > kMaxTitleChars) { |
1053 NOTREACHED() << "Renderer sent too many characters in title."; | 1052 NOTREACHED() << "Renderer sent too many characters in title."; |
1054 return; | 1053 return; |
1055 } | 1054 } |
1056 | 1055 |
1057 delegate_->UpdateTitle(this, page_id, title, | 1056 delegate_->UpdateTitle(this, page_id, title, |
1058 WebTextDirectionToChromeTextDirection( | 1057 WebTextDirectionToChromeTextDirection( |
1059 title_direction)); | 1058 title_direction)); |
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1558 // Clear any state if a pending navigation is canceled or preempted. | 1557 // Clear any state if a pending navigation is canceled or preempted. |
1559 if (suspended_nav_params_) | 1558 if (suspended_nav_params_) |
1560 suspended_nav_params_.reset(); | 1559 suspended_nav_params_.reset(); |
1561 | 1560 |
1562 TRACE_EVENT_ASYNC_END0("navigation", | 1561 TRACE_EVENT_ASYNC_END0("navigation", |
1563 "RenderFrameHostImpl navigation suspended", this); | 1562 "RenderFrameHostImpl navigation suspended", this); |
1564 navigations_suspended_ = false; | 1563 navigations_suspended_ = false; |
1565 } | 1564 } |
1566 | 1565 |
1567 } // namespace content | 1566 } // namespace content |
OLD | NEW |