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/interstitial_page_impl.h" | 5 #include "content/browser/web_contents/interstitial_page_impl.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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 | 220 |
221 if (new_navigation_) { | 221 if (new_navigation_) { |
222 NavigationEntryImpl* entry = new NavigationEntryImpl; | 222 NavigationEntryImpl* entry = new NavigationEntryImpl; |
223 entry->SetURL(url_); | 223 entry->SetURL(url_); |
224 entry->SetVirtualURL(url_); | 224 entry->SetVirtualURL(url_); |
225 entry->set_page_type(content::PAGE_TYPE_INTERSTITIAL); | 225 entry->set_page_type(content::PAGE_TYPE_INTERSTITIAL); |
226 | 226 |
227 // Give delegates a chance to set some states on the navigation entry. | 227 // Give delegates a chance to set some states on the navigation entry. |
228 delegate_->OverrideEntry(entry); | 228 delegate_->OverrideEntry(entry); |
229 | 229 |
230 web_contents_->GetControllerImpl().AddTransientEntry(entry); | 230 web_contents_->GetController().AddTransientEntry(entry); |
231 } | 231 } |
232 | 232 |
233 DCHECK(!render_view_host_); | 233 DCHECK(!render_view_host_); |
234 render_view_host_ = static_cast<RenderViewHostImpl*>(CreateRenderViewHost()); | 234 render_view_host_ = static_cast<RenderViewHostImpl*>(CreateRenderViewHost()); |
235 CreateWebContentsView(); | 235 CreateWebContentsView(); |
236 | 236 |
237 std::string data_url = "data:text/html;charset=utf-8," + | 237 std::string data_url = "data:text/html;charset=utf-8," + |
238 net::EscapePath(delegate_->GetHTMLContents()); | 238 net::EscapePath(delegate_->GetHTMLContents()); |
239 render_view_host_->NavigateToURL(GURL(data_url)); | 239 render_view_host_->NavigateToURL(GURL(data_url)); |
240 | 240 |
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
737 if (!web_contents->GetDelegateView()) | 737 if (!web_contents->GetDelegateView()) |
738 return; | 738 return; |
739 | 739 |
740 web_contents->GetDelegateView()->TakeFocus(reverse); | 740 web_contents->GetDelegateView()->TakeFocus(reverse); |
741 } | 741 } |
742 | 742 |
743 void InterstitialPageImpl::InterstitialPageRVHDelegateView::OnFindReply( | 743 void InterstitialPageImpl::InterstitialPageRVHDelegateView::OnFindReply( |
744 int request_id, int number_of_matches, const gfx::Rect& selection_rect, | 744 int request_id, int number_of_matches, const gfx::Rect& selection_rect, |
745 int active_match_ordinal, bool final_update) { | 745 int active_match_ordinal, bool final_update) { |
746 } | 746 } |
OLD | NEW |