| 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/navigation_controller_impl.h" | 5 #include "content/browser/web_contents/navigation_controller_impl.h" |
| 6 | 6 |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/string_number_conversions.h" // Temporary | 9 #include "base/string_number_conversions.h" // Temporary |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 DCHECK(browser_context_); | 187 DCHECK(browser_context_); |
| 188 if (!session_storage_namespace_) { | 188 if (!session_storage_namespace_) { |
| 189 session_storage_namespace_ = new SessionStorageNamespaceImpl( | 189 session_storage_namespace_ = new SessionStorageNamespaceImpl( |
| 190 static_cast<DOMStorageContextImpl*>( | 190 static_cast<DOMStorageContextImpl*>( |
| 191 BrowserContext::GetDOMStorageContext(browser_context_))); | 191 BrowserContext::GetDOMStorageContext(browser_context_))); |
| 192 } | 192 } |
| 193 } | 193 } |
| 194 | 194 |
| 195 NavigationControllerImpl::~NavigationControllerImpl() { | 195 NavigationControllerImpl::~NavigationControllerImpl() { |
| 196 DiscardNonCommittedEntriesInternal(); | 196 DiscardNonCommittedEntriesInternal(); |
| 197 | |
| 198 content::NotificationService::current()->Notify( | |
| 199 content::NOTIFICATION_TAB_CLOSED, | |
| 200 content::Source<NavigationController>(this), | |
| 201 content::NotificationService::NoDetails()); | |
| 202 } | 197 } |
| 203 | 198 |
| 204 WebContents* NavigationControllerImpl::GetWebContents() const { | 199 WebContents* NavigationControllerImpl::GetWebContents() const { |
| 205 return web_contents_; | 200 return web_contents_; |
| 206 } | 201 } |
| 207 | 202 |
| 208 BrowserContext* NavigationControllerImpl::GetBrowserContext() const { | 203 BrowserContext* NavigationControllerImpl::GetBrowserContext() const { |
| 209 return browser_context_; | 204 return browser_context_; |
| 210 } | 205 } |
| 211 | 206 |
| (...skipping 1220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1432 for (int i = 0; i < max_index; i++) { | 1427 for (int i = 0; i < max_index; i++) { |
| 1433 // When cloning a tab, copy all entries except interstitial pages | 1428 // When cloning a tab, copy all entries except interstitial pages |
| 1434 if (source.entries_[i].get()->GetPageType() != | 1429 if (source.entries_[i].get()->GetPageType() != |
| 1435 content::PAGE_TYPE_INTERSTITIAL) { | 1430 content::PAGE_TYPE_INTERSTITIAL) { |
| 1436 entries_.insert(entries_.begin() + insert_index++, | 1431 entries_.insert(entries_.begin() + insert_index++, |
| 1437 linked_ptr<NavigationEntryImpl>( | 1432 linked_ptr<NavigationEntryImpl>( |
| 1438 new NavigationEntryImpl(*source.entries_[i]))); | 1433 new NavigationEntryImpl(*source.entries_[i]))); |
| 1439 } | 1434 } |
| 1440 } | 1435 } |
| 1441 } | 1436 } |
| OLD | NEW |