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 12 matching lines...) Expand all Loading... |
23 #include "content/port/browser/render_widget_host_view_port.h" | 23 #include "content/port/browser/render_widget_host_view_port.h" |
24 #include "content/public/browser/browser_thread.h" | 24 #include "content/public/browser/browser_thread.h" |
25 #include "content/public/browser/dom_operation_notification_details.h" | 25 #include "content/public/browser/dom_operation_notification_details.h" |
26 #include "content/public/browser/interstitial_page_delegate.h" | 26 #include "content/public/browser/interstitial_page_delegate.h" |
27 #include "content/public/browser/invalidate_type.h" | 27 #include "content/public/browser/invalidate_type.h" |
28 #include "content/public/browser/notification_service.h" | 28 #include "content/public/browser/notification_service.h" |
29 #include "content/public/browser/notification_source.h" | 29 #include "content/public/browser/notification_source.h" |
30 #include "content/public/browser/web_contents_view.h" | 30 #include "content/public/browser/web_contents_view.h" |
31 #include "content/public/common/bindings_policy.h" | 31 #include "content/public/common/bindings_policy.h" |
32 #include "content/public/common/page_transition_types.h" | 32 #include "content/public/common/page_transition_types.h" |
33 #include "content/public/common/view_type.h" | |
34 #include "net/base/escape.h" | 33 #include "net/base/escape.h" |
35 #include "net/url_request/url_request_context_getter.h" | 34 #include "net/url_request/url_request_context_getter.h" |
36 #include "webkit/dom_storage/dom_storage_types.h" | 35 #include "webkit/dom_storage/dom_storage_types.h" |
37 | 36 |
38 using content::BrowserThread; | 37 using content::BrowserThread; |
39 using content::DomOperationNotificationDetails; | 38 using content::DomOperationNotificationDetails; |
40 using content::InterstitialPageDelegate; | 39 using content::InterstitialPageDelegate; |
41 using content::NativeWebKeyboardEvent; | 40 using content::NativeWebKeyboardEvent; |
42 using content::NavigationController; | 41 using content::NavigationController; |
43 using content::NavigationEntry; | 42 using content::NavigationEntry; |
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
485 } | 484 } |
486 | 485 |
487 WebContents* InterstitialPageImpl::web_contents() const { | 486 WebContents* InterstitialPageImpl::web_contents() const { |
488 return web_contents_; | 487 return web_contents_; |
489 } | 488 } |
490 | 489 |
491 RenderViewHost* InterstitialPageImpl::CreateRenderViewHost() { | 490 RenderViewHost* InterstitialPageImpl::CreateRenderViewHost() { |
492 RenderViewHostImpl* render_view_host = new RenderViewHostImpl( | 491 RenderViewHostImpl* render_view_host = new RenderViewHostImpl( |
493 SiteInstance::Create(web_contents()->GetBrowserContext()), this, this, | 492 SiteInstance::Create(web_contents()->GetBrowserContext()), this, this, |
494 MSG_ROUTING_NONE, false, dom_storage::kInvalidSessionStorageNamespaceId); | 493 MSG_ROUTING_NONE, false, dom_storage::kInvalidSessionStorageNamespaceId); |
| 494 web_contents_->RenderViewForInterstitialPageCreated(render_view_host); |
495 return render_view_host; | 495 return render_view_host; |
496 } | 496 } |
497 | 497 |
498 WebContentsView* InterstitialPageImpl::CreateWebContentsView() { | 498 WebContentsView* InterstitialPageImpl::CreateWebContentsView() { |
499 if (!create_view_) | 499 if (!create_view_) |
500 return NULL; | 500 return NULL; |
501 WebContentsView* web_contents_view = web_contents()->GetView(); | 501 WebContentsView* web_contents_view = web_contents()->GetView(); |
502 RenderWidgetHostView* view = | 502 RenderWidgetHostView* view = |
503 web_contents_view->CreateViewForWidget(render_view_host_); | 503 web_contents_view->CreateViewForWidget(render_view_host_); |
504 render_view_host_->SetView(view); | 504 render_view_host_->SetView(view); |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
749 if (!web_contents->GetViewDelegate()) | 749 if (!web_contents->GetViewDelegate()) |
750 return; | 750 return; |
751 | 751 |
752 web_contents->GetViewDelegate()->TakeFocus(reverse); | 752 web_contents->GetViewDelegate()->TakeFocus(reverse); |
753 } | 753 } |
754 | 754 |
755 void InterstitialPageImpl::InterstitialPageRVHViewDelegate::OnFindReply( | 755 void InterstitialPageImpl::InterstitialPageRVHViewDelegate::OnFindReply( |
756 int request_id, int number_of_matches, const gfx::Rect& selection_rect, | 756 int request_id, int number_of_matches, const gfx::Rect& selection_rect, |
757 int active_match_ordinal, bool final_update) { | 757 int active_match_ordinal, bool final_update) { |
758 } | 758 } |
OLD | NEW |