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 <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 3850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3861 | 3861 |
3862 // If we have a title, that's a pretty good indication that we've started | 3862 // If we have a title, that's a pretty good indication that we've started |
3863 // getting useful data. | 3863 // getting useful data. |
3864 SetNotWaitingForResponse(); | 3864 SetNotWaitingForResponse(); |
3865 | 3865 |
3866 // Try to find the navigation entry, which might not be the current one. | 3866 // Try to find the navigation entry, which might not be the current one. |
3867 // For example, it might be from a pending RVH for the pending entry. | 3867 // For example, it might be from a pending RVH for the pending entry. |
3868 NavigationEntryImpl* entry = controller_.GetEntryWithPageID( | 3868 NavigationEntryImpl* entry = controller_.GetEntryWithPageID( |
3869 rvh->GetSiteInstance(), page_id); | 3869 rvh->GetSiteInstance(), page_id); |
3870 | 3870 |
3871 // Re http://crbug.com/369661, page id is going away. This function should | |
3872 // only ever be called for the current entry. When this is verified, this | |
3873 // function can be greatly simplified. | |
3874 CHECK_EQ(entry, controller_.GetEntryAtOffset(0)); | |
Charlie Reis
2015/05/11 20:32:38
Interesting that this passed. Would it fail if we
Avi (use Gerrit)
2015/05/11 20:52:46
Dunno! Let's find out.
| |
3875 | |
3871 // We can handle title updates when we don't have an entry in | 3876 // We can handle title updates when we don't have an entry in |
3872 // UpdateTitleForEntry, but only if the update is from the current RVH. | 3877 // UpdateTitleForEntry, but only if the update is from the current RVH. |
3873 // TODO(avi): Change to make decisions based on the RenderFrameHost. | 3878 // TODO(avi): Change to make decisions based on the RenderFrameHost. |
3874 if (!entry && rvh != GetRenderViewHost()) | 3879 if (!entry && rvh != GetRenderViewHost()) |
3875 return; | 3880 return; |
3876 | 3881 |
3877 // TODO(evan): make use of title_direction. | 3882 // TODO(evan): make use of title_direction. |
3878 // http://code.google.com/p/chromium/issues/detail?id=27094 | 3883 // http://code.google.com/p/chromium/issues/detail?id=27094 |
3879 if (!UpdateTitleForEntry(entry, title)) | 3884 if (!UpdateTitleForEntry(entry, title)) |
3880 return; | 3885 return; |
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4429 node->render_manager()->ResumeResponseDeferredAtStart(); | 4434 node->render_manager()->ResumeResponseDeferredAtStart(); |
4430 } | 4435 } |
4431 | 4436 |
4432 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { | 4437 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { |
4433 force_disable_overscroll_content_ = force_disable; | 4438 force_disable_overscroll_content_ = force_disable; |
4434 if (view_) | 4439 if (view_) |
4435 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); | 4440 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); |
4436 } | 4441 } |
4437 | 4442 |
4438 } // namespace content | 4443 } // namespace content |
OLD | NEW |