| 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/renderer/render_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 2513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2524 if (is_new_navigation) { | 2524 if (is_new_navigation) { |
| 2525 // We bump our Page ID to correspond with the new session history entry. | 2525 // We bump our Page ID to correspond with the new session history entry. |
| 2526 render_view_->page_id_ = render_view_->next_page_id_++; | 2526 render_view_->page_id_ = render_view_->next_page_id_++; |
| 2527 | 2527 |
| 2528 // Don't update history list values for kSwappedOutURL, since | 2528 // Don't update history list values for kSwappedOutURL, since |
| 2529 // we don't want to forget the entry that was there, and since we will | 2529 // we don't want to forget the entry that was there, and since we will |
| 2530 // never come back to kSwappedOutURL. Note that we have to call | 2530 // never come back to kSwappedOutURL. Note that we have to call |
| 2531 // UpdateSessionHistory and update page_id_ even in this case, so that | 2531 // UpdateSessionHistory and update page_id_ even in this case, so that |
| 2532 // the current entry gets a state update and so that we don't send a | 2532 // the current entry gets a state update and so that we don't send a |
| 2533 // state update to the wrong entry when we swap back in. | 2533 // state update to the wrong entry when we swap back in. |
| 2534 if (GetLoadingUrl() != GURL(kSwappedOutURL)) { | 2534 if (GetLoadingUrl() != GURL(kSwappedOutURL) && |
| 2535 !navigation_state->should_replace_current_entry()) { |
| 2535 // Advance our offset in session history, applying the length limit. | 2536 // Advance our offset in session history, applying the length limit. |
| 2536 // There is now no forward history. | 2537 // There is now no forward history. |
| 2537 render_view_->history_list_offset_++; | 2538 render_view_->history_list_offset_++; |
| 2538 if (render_view_->history_list_offset_ >= kMaxSessionHistoryEntries) | 2539 if (render_view_->history_list_offset_ >= kMaxSessionHistoryEntries) |
| 2539 render_view_->history_list_offset_ = kMaxSessionHistoryEntries - 1; | 2540 render_view_->history_list_offset_ = kMaxSessionHistoryEntries - 1; |
| 2540 render_view_->history_list_length_ = | 2541 render_view_->history_list_length_ = |
| 2541 render_view_->history_list_offset_ + 1; | 2542 render_view_->history_list_offset_ + 1; |
| 2542 } | 2543 } |
| 2543 } else { | 2544 } else { |
| 2544 // Inspect the navigation_state on this frame to see if the navigation | 2545 // Inspect the navigation_state on this frame to see if the navigation |
| (...skipping 1929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4474 | 4475 |
| 4475 #if defined(ENABLE_BROWSER_CDMS) | 4476 #if defined(ENABLE_BROWSER_CDMS) |
| 4476 RendererCdmManager* RenderFrameImpl::GetCdmManager() { | 4477 RendererCdmManager* RenderFrameImpl::GetCdmManager() { |
| 4477 if (!cdm_manager_) | 4478 if (!cdm_manager_) |
| 4478 cdm_manager_ = new RendererCdmManager(this); | 4479 cdm_manager_ = new RendererCdmManager(this); |
| 4479 return cdm_manager_; | 4480 return cdm_manager_; |
| 4480 } | 4481 } |
| 4481 #endif // defined(ENABLE_BROWSER_CDMS) | 4482 #endif // defined(ENABLE_BROWSER_CDMS) |
| 4482 | 4483 |
| 4483 } // namespace content | 4484 } // namespace content |
| OLD | NEW |