OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/tab_contents/interstitial_page.h" | 5 #include "content/browser/tab_contents/interstitial_page.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 // If this interstitial is shown on an existing navigation entry, we'll need | 394 // If this interstitial is shown on an existing navigation entry, we'll need |
395 // to remember its title so we can revert to it when hidden. | 395 // to remember its title so we can revert to it when hidden. |
396 if (!new_navigation_ && !should_revert_tab_title_) { | 396 if (!new_navigation_ && !should_revert_tab_title_) { |
397 original_tab_title_ = entry->title(); | 397 original_tab_title_ = entry->title(); |
398 should_revert_tab_title_ = true; | 398 should_revert_tab_title_ = true; |
399 } | 399 } |
400 entry->set_title(title); | 400 entry->set_title(title); |
401 tab_->NotifyNavigationStateChanged(TabContents::INVALIDATE_TITLE); | 401 tab_->NotifyNavigationStateChanged(TabContents::INVALIDATE_TITLE); |
402 } | 402 } |
403 | 403 |
404 RendererPreferences InterstitialPage::GetRendererPrefs(Profile* profile) const { | 404 RendererPreferences InterstitialPage::GetRendererPrefs( |
| 405 content::BrowserContext* browser_context) const { |
405 return renderer_preferences_; | 406 return renderer_preferences_; |
406 } | 407 } |
407 | 408 |
408 RenderViewHost* InterstitialPage::CreateRenderViewHost() { | 409 RenderViewHost* InterstitialPage::CreateRenderViewHost() { |
409 RenderViewHost* render_view_host = new RenderViewHost( | 410 RenderViewHost* render_view_host = new RenderViewHost( |
410 SiteInstance::CreateSiteInstance(tab()->profile()), | 411 SiteInstance::CreateSiteInstance(tab()->profile()), |
411 this, MSG_ROUTING_NONE, kInvalidSessionStorageNamespaceId); | 412 this, MSG_ROUTING_NONE, kInvalidSessionStorageNamespaceId); |
412 return render_view_host; | 413 return render_view_host; |
413 } | 414 } |
414 | 415 |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
656 void InterstitialPage::InterstitialPageRVHViewDelegate::TakeFocus( | 657 void InterstitialPage::InterstitialPageRVHViewDelegate::TakeFocus( |
657 bool reverse) { | 658 bool reverse) { |
658 if (interstitial_page_->tab() && interstitial_page_->tab()->GetViewDelegate()) | 659 if (interstitial_page_->tab() && interstitial_page_->tab()->GetViewDelegate()) |
659 interstitial_page_->tab()->GetViewDelegate()->TakeFocus(reverse); | 660 interstitial_page_->tab()->GetViewDelegate()->TakeFocus(reverse); |
660 } | 661 } |
661 | 662 |
662 void InterstitialPage::InterstitialPageRVHViewDelegate::OnFindReply( | 663 void InterstitialPage::InterstitialPageRVHViewDelegate::OnFindReply( |
663 int request_id, int number_of_matches, const gfx::Rect& selection_rect, | 664 int request_id, int number_of_matches, const gfx::Rect& selection_rect, |
664 int active_match_ordinal, bool final_update) { | 665 int active_match_ordinal, bool final_update) { |
665 } | 666 } |
OLD | NEW |