| 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 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1044 void RenderFrameHostImpl::OnDidAssignPageId(int32 page_id) { | 1044 void RenderFrameHostImpl::OnDidAssignPageId(int32 page_id) { |
| 1045 // Update the RVH's current page ID so that future IPCs from the renderer | 1045 // Update the RVH's current page ID so that future IPCs from the renderer |
| 1046 // correspond to the new page. | 1046 // correspond to the new page. |
| 1047 render_view_host_->page_id_ = page_id; | 1047 render_view_host_->page_id_ = page_id; |
| 1048 } | 1048 } |
| 1049 | 1049 |
| 1050 void RenderFrameHostImpl::OnUpdateTitle( | 1050 void RenderFrameHostImpl::OnUpdateTitle( |
| 1051 int32 page_id, | 1051 int32 page_id, |
| 1052 const base::string16& title, | 1052 const base::string16& title, |
| 1053 blink::WebTextDirection title_direction) { | 1053 blink::WebTextDirection title_direction) { |
| 1054 CHECK_EQ(render_view_host_->page_id_, page_id); |
| 1054 // This message is only sent for top-level frames. TODO(avi): when frame tree | 1055 // This message is only sent for top-level frames. TODO(avi): when frame tree |
| 1055 // mirroring works correctly, add a check here to enforce it. | 1056 // mirroring works correctly, add a check here to enforce it. |
| 1056 if (title.length() > kMaxTitleChars) { | 1057 if (title.length() > kMaxTitleChars) { |
| 1057 NOTREACHED() << "Renderer sent too many characters in title."; | 1058 NOTREACHED() << "Renderer sent too many characters in title."; |
| 1058 return; | 1059 return; |
| 1059 } | 1060 } |
| 1060 | 1061 |
| 1061 delegate_->UpdateTitle(this, page_id, title, | 1062 delegate_->UpdateTitle(this, page_id, title, |
| 1062 WebTextDirectionToChromeTextDirection( | 1063 WebTextDirectionToChromeTextDirection( |
| 1063 title_direction)); | 1064 title_direction)); |
| (...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1562 // Clear any state if a pending navigation is canceled or preempted. | 1563 // Clear any state if a pending navigation is canceled or preempted. |
| 1563 if (suspended_nav_params_) | 1564 if (suspended_nav_params_) |
| 1564 suspended_nav_params_.reset(); | 1565 suspended_nav_params_.reset(); |
| 1565 | 1566 |
| 1566 TRACE_EVENT_ASYNC_END0("navigation", | 1567 TRACE_EVENT_ASYNC_END0("navigation", |
| 1567 "RenderFrameHostImpl navigation suspended", this); | 1568 "RenderFrameHostImpl navigation suspended", this); |
| 1568 navigations_suspended_ = false; | 1569 navigations_suspended_ = false; |
| 1569 } | 1570 } |
| 1570 | 1571 |
| 1571 } // namespace content | 1572 } // namespace content |
| OLD | NEW |