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 984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
995 void RenderFrameHostImpl::OnDidAssignPageId(int32 page_id) { | 995 void RenderFrameHostImpl::OnDidAssignPageId(int32 page_id) { |
996 // Update the RVH's current page ID so that future IPCs from the renderer | 996 // Update the RVH's current page ID so that future IPCs from the renderer |
997 // correspond to the new page. | 997 // correspond to the new page. |
998 render_view_host_->page_id_ = page_id; | 998 render_view_host_->page_id_ = page_id; |
999 } | 999 } |
1000 | 1000 |
1001 void RenderFrameHostImpl::OnUpdateTitle( | 1001 void RenderFrameHostImpl::OnUpdateTitle( |
1002 int32 page_id, | 1002 int32 page_id, |
1003 const base::string16& title, | 1003 const base::string16& title, |
1004 blink::WebTextDirection title_direction) { | 1004 blink::WebTextDirection title_direction) { |
1005 CHECK_EQ(render_view_host_->page_id_, page_id); | |
1006 // This message is only sent for top-level frames. TODO(avi): when frame tree | 1005 // This message is only sent for top-level frames. TODO(avi): when frame tree |
1007 // mirroring works correctly, add a check here to enforce it. | 1006 // mirroring works correctly, add a check here to enforce it. |
1008 if (title.length() > kMaxTitleChars) { | 1007 if (title.length() > kMaxTitleChars) { |
1009 NOTREACHED() << "Renderer sent too many characters in title."; | 1008 NOTREACHED() << "Renderer sent too many characters in title."; |
1010 return; | 1009 return; |
1011 } | 1010 } |
1012 | 1011 |
1013 delegate_->UpdateTitle(this, page_id, title, | 1012 delegate_->UpdateTitle(this, page_id, title, |
1014 WebTextDirectionToChromeTextDirection( | 1013 WebTextDirectionToChromeTextDirection( |
1015 title_direction)); | 1014 title_direction)); |
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1465 // Clear any state if a pending navigation is canceled or preempted. | 1464 // Clear any state if a pending navigation is canceled or preempted. |
1466 if (suspended_nav_params_) | 1465 if (suspended_nav_params_) |
1467 suspended_nav_params_.reset(); | 1466 suspended_nav_params_.reset(); |
1468 | 1467 |
1469 TRACE_EVENT_ASYNC_END0("navigation", | 1468 TRACE_EVENT_ASYNC_END0("navigation", |
1470 "RenderFrameHostImpl navigation suspended", this); | 1469 "RenderFrameHostImpl navigation suspended", this); |
1471 navigations_suspended_ = false; | 1470 navigations_suspended_ = false; |
1472 } | 1471 } |
1473 | 1472 |
1474 } // namespace content | 1473 } // namespace content |
OLD | NEW |