| 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/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 tab_->controller().AddTransientEntry(entry); | 196 tab_->controller().AddTransientEntry(entry); |
| 197 } | 197 } |
| 198 | 198 |
| 199 DCHECK(!render_view_host_); | 199 DCHECK(!render_view_host_); |
| 200 render_view_host_ = CreateRenderViewHost(); | 200 render_view_host_ = CreateRenderViewHost(); |
| 201 CreateTabContentsView(); | 201 CreateTabContentsView(); |
| 202 | 202 |
| 203 std::string data_url = "data:text/html;charset=utf-8," + | 203 std::string data_url = "data:text/html;charset=utf-8," + |
| 204 net::EscapePath(GetHTMLContents()); | 204 net::EscapePath(GetHTMLContents()); |
| 205 render_view_host_->NavigateToURL(GURL(data_url)); | 205 render_view_host_->NavigateToURL(GURL(data_url)); |
| 206 render_view_host_->Send( |
| 207 new ViewMsg_SetAsInterstitial(render_view_host_->routing_id())); |
| 206 | 208 |
| 207 notification_registrar_.Add(this, | 209 notification_registrar_.Add(this, |
| 208 content::NOTIFICATION_TAB_CONTENTS_DESTROYED, | 210 content::NOTIFICATION_TAB_CONTENTS_DESTROYED, |
| 209 content::Source<TabContents>(tab_)); | 211 content::Source<TabContents>(tab_)); |
| 210 notification_registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED, | 212 notification_registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED, |
| 211 content::Source<NavigationController>(&tab_->controller())); | 213 content::Source<NavigationController>(&tab_->controller())); |
| 212 notification_registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_PENDING, | 214 notification_registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_PENDING, |
| 213 content::Source<NavigationController>(&tab_->controller())); | 215 content::Source<NavigationController>(&tab_->controller())); |
| 214 } | 216 } |
| 215 | 217 |
| (...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 void InterstitialPage::InterstitialPageRVHViewDelegate::TakeFocus( | 648 void InterstitialPage::InterstitialPageRVHViewDelegate::TakeFocus( |
| 647 bool reverse) { | 649 bool reverse) { |
| 648 if (interstitial_page_->tab() && interstitial_page_->tab()->GetViewDelegate()) | 650 if (interstitial_page_->tab() && interstitial_page_->tab()->GetViewDelegate()) |
| 649 interstitial_page_->tab()->GetViewDelegate()->TakeFocus(reverse); | 651 interstitial_page_->tab()->GetViewDelegate()->TakeFocus(reverse); |
| 650 } | 652 } |
| 651 | 653 |
| 652 void InterstitialPage::InterstitialPageRVHViewDelegate::OnFindReply( | 654 void InterstitialPage::InterstitialPageRVHViewDelegate::OnFindReply( |
| 653 int request_id, int number_of_matches, const gfx::Rect& selection_rect, | 655 int request_id, int number_of_matches, const gfx::Rect& selection_rect, |
| 654 int active_match_ordinal, bool final_update) { | 656 int active_match_ordinal, bool final_update) { |
| 655 } | 657 } |
| OLD | NEW |