| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/tab_contents/interstitial_page.h" | 5 #include "chrome/browser/tab_contents/interstitial_page.h" |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "base/thread.h" | 10 #include "base/thread.h" |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 | 216 |
| 217 // Update the tab_to_interstitial_page_ map. | 217 // Update the tab_to_interstitial_page_ map. |
| 218 iter = tab_to_interstitial_page_->find(tab_); | 218 iter = tab_to_interstitial_page_->find(tab_); |
| 219 DCHECK(iter == tab_to_interstitial_page_->end()); | 219 DCHECK(iter == tab_to_interstitial_page_->end()); |
| 220 (*tab_to_interstitial_page_)[tab_] = this; | 220 (*tab_to_interstitial_page_)[tab_] = this; |
| 221 | 221 |
| 222 if (new_navigation_) { | 222 if (new_navigation_) { |
| 223 NavigationEntry* entry = new NavigationEntry; | 223 NavigationEntry* entry = new NavigationEntry; |
| 224 entry->set_url(url_); | 224 entry->set_url(url_); |
| 225 entry->set_virtual_url(url_); | 225 entry->set_virtual_url(url_); |
| 226 entry->set_page_type(NavigationEntry::INTERSTITIAL_PAGE); | 226 entry->set_page_type(INTERSTITIAL_PAGE); |
| 227 | 227 |
| 228 // Give sub-classes a chance to set some states on the navigation entry. | 228 // Give sub-classes a chance to set some states on the navigation entry. |
| 229 UpdateEntry(entry); | 229 UpdateEntry(entry); |
| 230 | 230 |
| 231 tab_->controller().AddTransientEntry(entry); | 231 tab_->controller().AddTransientEntry(entry); |
| 232 } | 232 } |
| 233 | 233 |
| 234 DCHECK(!render_view_host_); | 234 DCHECK(!render_view_host_); |
| 235 render_view_host_ = CreateRenderViewHost(); | 235 render_view_host_ = CreateRenderViewHost(); |
| 236 CreateTabContentsView(); | 236 CreateTabContentsView(); |
| (...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 715 | 715 |
| 716 void InterstitialPage::UpdateInspectorSetting(const std::string& key, | 716 void InterstitialPage::UpdateInspectorSetting(const std::string& key, |
| 717 const std::string& value) { | 717 const std::string& value) { |
| 718 RenderViewHostDelegateHelper::UpdateInspectorSetting( | 718 RenderViewHostDelegateHelper::UpdateInspectorSetting( |
| 719 tab_->profile(), key, value); | 719 tab_->profile(), key, value); |
| 720 } | 720 } |
| 721 | 721 |
| 722 void InterstitialPage::ClearInspectorSettings() { | 722 void InterstitialPage::ClearInspectorSettings() { |
| 723 RenderViewHostDelegateHelper::ClearInspectorSettings(tab_->profile()); | 723 RenderViewHostDelegateHelper::ClearInspectorSettings(tab_->profile()); |
| 724 } | 724 } |
| OLD | NEW |