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/browser/web_contents/web_contents_impl.h" | 5 #include "content/browser/web_contents/web_contents_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <cmath> | 9 #include <cmath> |
10 #include <utility> | 10 #include <utility> |
(...skipping 4603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4614 NavigationEntryImpl* entry = controller_.GetEntryWithPageID( | 4614 NavigationEntryImpl* entry = controller_.GetEntryWithPageID( |
4615 render_frame_host->GetSiteInstance(), page_id); | 4615 render_frame_host->GetSiteInstance(), page_id); |
4616 | 4616 |
4617 NavigationEntryImpl* new_entry = controller_.GetEntryWithUniqueID( | 4617 NavigationEntryImpl* new_entry = controller_.GetEntryWithUniqueID( |
4618 static_cast<RenderFrameHostImpl*>(render_frame_host)->nav_entry_id()); | 4618 static_cast<RenderFrameHostImpl*>(render_frame_host)->nav_entry_id()); |
4619 if (SiteIsolationPolicy::AreCrossProcessFramesPossible()) { | 4619 if (SiteIsolationPolicy::AreCrossProcessFramesPossible()) { |
4620 // In out-of-process iframe enabled modes, page_id can't keep track of | 4620 // In out-of-process iframe enabled modes, page_id can't keep track of |
4621 // navigations in other processes, so we must use nav_entry_id. | 4621 // navigations in other processes, so we must use nav_entry_id. |
4622 // TODO(creis): Switch to use this as the default. | 4622 // TODO(creis): Switch to use this as the default. |
4623 entry = new_entry; | 4623 entry = new_entry; |
4624 } else { | |
4625 // In modes that have no out-of-process iframes, nav_entry_id and page_id | |
4626 // should agree on which entry to update. | |
4627 DCHECK_EQ(entry, new_entry); | |
4628 } | 4624 } |
| 4625 // (In modes that have no out-of-process iframes, nav_entry_id and page_id |
| 4626 // will usually agree on which entry to update, but may disagree if commits |
| 4627 // from a previous RFH have been ignored, resetting the RFH's nav_entry_id.) |
4629 | 4628 |
4630 // We can handle title updates when we don't have an entry in | 4629 // We can handle title updates when we don't have an entry in |
4631 // UpdateTitleForEntry, but only if the update is from the current RVH. | 4630 // UpdateTitleForEntry, but only if the update is from the current RVH. |
4632 // TODO(avi): Change to make decisions based on the RenderFrameHost. | 4631 // TODO(avi): Change to make decisions based on the RenderFrameHost. |
4633 if (!entry && render_frame_host != GetMainFrame()) | 4632 if (!entry && render_frame_host != GetMainFrame()) |
4634 return; | 4633 return; |
4635 | 4634 |
4636 // TODO(evan): make use of title_direction. | 4635 // TODO(evan): make use of title_direction. |
4637 // http://code.google.com/p/chromium/issues/detail?id=27094 | 4636 // http://code.google.com/p/chromium/issues/detail?id=27094 |
4638 UpdateTitleForEntry(entry, title); | 4637 UpdateTitleForEntry(entry, title); |
(...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5267 dialog_manager_ = dialog_manager; | 5266 dialog_manager_ = dialog_manager; |
5268 } | 5267 } |
5269 | 5268 |
5270 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) { | 5269 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) { |
5271 auto it = binding_sets_.find(interface_name); | 5270 auto it = binding_sets_.find(interface_name); |
5272 if (it != binding_sets_.end()) | 5271 if (it != binding_sets_.end()) |
5273 binding_sets_.erase(it); | 5272 binding_sets_.erase(it); |
5274 } | 5273 } |
5275 | 5274 |
5276 } // namespace content | 5275 } // namespace content |
OLD | NEW |