| 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 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 482 const NativeWebKeyboardEvent& event) { | 482 const NativeWebKeyboardEvent& event) { |
| 483 return web_contents_->HandleKeyboardEvent(event); | 483 return web_contents_->HandleKeyboardEvent(event); |
| 484 } | 484 } |
| 485 | 485 |
| 486 WebContents* InterstitialPageImpl::web_contents() const { | 486 WebContents* InterstitialPageImpl::web_contents() const { |
| 487 return web_contents_; | 487 return web_contents_; |
| 488 } | 488 } |
| 489 | 489 |
| 490 RenderViewHost* InterstitialPageImpl::CreateRenderViewHost() { | 490 RenderViewHost* InterstitialPageImpl::CreateRenderViewHost() { |
| 491 RenderViewHostImpl* render_view_host = new RenderViewHostImpl( | 491 RenderViewHostImpl* render_view_host = new RenderViewHostImpl( |
| 492 SiteInstance::Create(web_contents()->GetBrowserContext()), | 492 SiteInstance::Create(web_contents()->GetBrowserContext()), this, |
| 493 this, MSG_ROUTING_NONE, dom_storage::kInvalidSessionStorageNamespaceId); | 493 MSG_ROUTING_NONE, false, dom_storage::kInvalidSessionStorageNamespaceId); |
| 494 return render_view_host; | 494 return render_view_host; |
| 495 } | 495 } |
| 496 | 496 |
| 497 WebContentsView* InterstitialPageImpl::CreateWebContentsView() { | 497 WebContentsView* InterstitialPageImpl::CreateWebContentsView() { |
| 498 if (!create_view_) | 498 if (!create_view_) |
| 499 return NULL; | 499 return NULL; |
| 500 WebContentsView* web_contents_view = web_contents()->GetView(); | 500 WebContentsView* web_contents_view = web_contents()->GetView(); |
| 501 RenderWidgetHostView* view = | 501 RenderWidgetHostView* view = |
| 502 web_contents_view->CreateViewForWidget(render_view_host_); | 502 web_contents_view->CreateViewForWidget(render_view_host_); |
| 503 render_view_host_->SetView(view); | 503 render_view_host_->SetView(view); |
| 504 render_view_host_->AllowBindings(content::BINDINGS_POLICY_DOM_AUTOMATION); | 504 render_view_host_->AllowBindings(content::BINDINGS_POLICY_DOM_AUTOMATION); |
| 505 | 505 |
| 506 int32 max_page_id = web_contents()-> | 506 int32 max_page_id = web_contents()-> |
| 507 GetMaxPageIDForSiteInstance(render_view_host_->GetSiteInstance()); | 507 GetMaxPageIDForSiteInstance(render_view_host_->GetSiteInstance()); |
| 508 render_view_host_->CreateRenderView(string16(), max_page_id); | 508 render_view_host_->CreateRenderView(string16(), MSG_ROUTING_NONE, |
| 509 max_page_id); |
| 509 view->SetSize(web_contents_view->GetContainerSize()); | 510 view->SetSize(web_contents_view->GetContainerSize()); |
| 510 // Don't show the interstitial until we have navigated to it. | 511 // Don't show the interstitial until we have navigated to it. |
| 511 view->Hide(); | 512 view->Hide(); |
| 512 return web_contents_view; | 513 return web_contents_view; |
| 513 } | 514 } |
| 514 | 515 |
| 515 void InterstitialPageImpl::Proceed() { | 516 void InterstitialPageImpl::Proceed() { |
| 516 if (action_taken_ != NO_ACTION) { | 517 if (action_taken_ != NO_ACTION) { |
| 517 NOTREACHED(); | 518 NOTREACHED(); |
| 518 return; | 519 return; |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 745 if (!web_contents->GetViewDelegate()) | 746 if (!web_contents->GetViewDelegate()) |
| 746 return; | 747 return; |
| 747 | 748 |
| 748 web_contents->GetViewDelegate()->TakeFocus(reverse); | 749 web_contents->GetViewDelegate()->TakeFocus(reverse); |
| 749 } | 750 } |
| 750 | 751 |
| 751 void InterstitialPageImpl::InterstitialPageRVHViewDelegate::OnFindReply( | 752 void InterstitialPageImpl::InterstitialPageRVHViewDelegate::OnFindReply( |
| 752 int request_id, int number_of_matches, const gfx::Rect& selection_rect, | 753 int request_id, int number_of_matches, const gfx::Rect& selection_rect, |
| 753 int active_match_ordinal, bool final_update) { | 754 int active_match_ordinal, bool final_update) { |
| 754 } | 755 } |
| OLD | NEW |