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/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 2727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2738 } | 2738 } |
2739 } | 2739 } |
2740 DidNavigateAnyFramePostCommit(rvh, details, params); | 2740 DidNavigateAnyFramePostCommit(rvh, details, params); |
2741 } | 2741 } |
2742 | 2742 |
2743 void WebContentsImpl::UpdateState(RenderViewHost* rvh, | 2743 void WebContentsImpl::UpdateState(RenderViewHost* rvh, |
2744 int32 page_id, | 2744 int32 page_id, |
2745 const std::string& state) { | 2745 const std::string& state) { |
2746 // Ensure that this state update comes from either the active RVH or one of | 2746 // Ensure that this state update comes from either the active RVH or one of |
2747 // the swapped out RVHs. We don't expect to hear from any other RVHs. | 2747 // the swapped out RVHs. We don't expect to hear from any other RVHs. |
2748 DCHECK(rvh == GetRenderViewHost() || render_manager_.IsSwappedOut(rvh)); | 2748 DCHECK(rvh == GetRenderViewHost() || render_manager_.IsOnSwappedOutList(rvh)); |
2749 | 2749 |
2750 // We must be prepared to handle state updates for any page, these occur | 2750 // We must be prepared to handle state updates for any page, these occur |
2751 // when the user is scrolling and entering form data, as well as when we're | 2751 // when the user is scrolling and entering form data, as well as when we're |
2752 // leaving a page, in which case our state may have already been moved to | 2752 // leaving a page, in which case our state may have already been moved to |
2753 // the next page. The navigation controller will look up the appropriate | 2753 // the next page. The navigation controller will look up the appropriate |
2754 // NavigationEntry and update it when it is notified via the delegate. | 2754 // NavigationEntry and update it when it is notified via the delegate. |
2755 | 2755 |
2756 int entry_index = controller_.GetEntryIndexWithPageID( | 2756 int entry_index = controller_.GetEntryIndexWithPageID( |
2757 rvh->GetSiteInstance(), page_id); | 2757 rvh->GetSiteInstance(), page_id); |
2758 if (entry_index < 0) | 2758 if (entry_index < 0) |
(...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3404 } | 3404 } |
3405 | 3405 |
3406 BrowserPluginGuestManager* | 3406 BrowserPluginGuestManager* |
3407 WebContentsImpl::GetBrowserPluginGuestManager() const { | 3407 WebContentsImpl::GetBrowserPluginGuestManager() const { |
3408 return static_cast<BrowserPluginGuestManager*>( | 3408 return static_cast<BrowserPluginGuestManager*>( |
3409 GetBrowserContext()->GetUserData( | 3409 GetBrowserContext()->GetUserData( |
3410 browser_plugin::kBrowserPluginGuestManagerKeyName)); | 3410 browser_plugin::kBrowserPluginGuestManagerKeyName)); |
3411 } | 3411 } |
3412 | 3412 |
3413 } // namespace content | 3413 } // namespace content |
OLD | NEW |