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/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" |
11 #include "base/message_loop.h" | 11 #include "base/message_loop.h" |
12 #include "base/string_util.h" | 12 #include "base/string_util.h" |
13 #include "base/threading/thread.h" | 13 #include "base/threading/thread.h" |
14 #include "base/utf_string_conversions.h" | 14 #include "base/utf_string_conversions.h" |
15 #include "content/browser/renderer_host/render_process_host_impl.h" | 15 #include "content/browser/renderer_host/render_process_host_impl.h" |
16 #include "content/browser/renderer_host/render_view_host.h" | 16 #include "content/browser/renderer_host/render_view_host.h" |
17 #include "content/browser/renderer_host/render_widget_host_view.h" | 17 #include "content/browser/renderer_host/render_widget_host_view.h" |
18 #include "content/browser/renderer_host/resource_dispatcher_host.h" | 18 #include "content/browser/renderer_host/resource_dispatcher_host.h" |
19 #include "content/browser/site_instance.h" | 19 #include "content/browser/site_instance_impl.h" |
20 #include "content/browser/tab_contents/navigation_controller_impl.h" | 20 #include "content/browser/tab_contents/navigation_controller_impl.h" |
21 #include "content/browser/tab_contents/navigation_entry_impl.h" | 21 #include "content/browser/tab_contents/navigation_entry_impl.h" |
22 #include "content/browser/tab_contents/tab_contents.h" | 22 #include "content/browser/tab_contents/tab_contents.h" |
23 #include "content/common/dom_storage_common.h" | 23 #include "content/common/dom_storage_common.h" |
24 #include "content/common/view_messages.h" | 24 #include "content/common/view_messages.h" |
25 #include "content/public/browser/browser_thread.h" | 25 #include "content/public/browser/browser_thread.h" |
26 #include "content/public/browser/content_browser_client.h" | 26 #include "content/public/browser/content_browser_client.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" |
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
422 const NativeWebKeyboardEvent& event) { | 422 const NativeWebKeyboardEvent& event) { |
423 return tab_->HandleKeyboardEvent(event); | 423 return tab_->HandleKeyboardEvent(event); |
424 } | 424 } |
425 | 425 |
426 WebContents* InterstitialPage::tab() const { | 426 WebContents* InterstitialPage::tab() const { |
427 return tab_; | 427 return tab_; |
428 } | 428 } |
429 | 429 |
430 RenderViewHost* InterstitialPage::CreateRenderViewHost() { | 430 RenderViewHost* InterstitialPage::CreateRenderViewHost() { |
431 RenderViewHost* render_view_host = new RenderViewHost( | 431 RenderViewHost* render_view_host = new RenderViewHost( |
432 SiteInstance::CreateSiteInstance(tab()->GetBrowserContext()), | 432 content::SiteInstance::CreateSiteInstance(tab()->GetBrowserContext()), |
433 this, MSG_ROUTING_NONE, kInvalidSessionStorageNamespaceId); | 433 this, MSG_ROUTING_NONE, kInvalidSessionStorageNamespaceId); |
434 return render_view_host; | 434 return render_view_host; |
435 } | 435 } |
436 | 436 |
437 WebContentsView* InterstitialPage::CreateWebContentsView() { | 437 WebContentsView* InterstitialPage::CreateWebContentsView() { |
438 WebContentsView* web_contents_view = tab()->GetView(); | 438 WebContentsView* web_contents_view = tab()->GetView(); |
439 RenderWidgetHostView* view = | 439 RenderWidgetHostView* view = |
440 web_contents_view->CreateViewForWidget(render_view_host_); | 440 web_contents_view->CreateViewForWidget(render_view_host_); |
441 render_view_host_->SetView(view); | 441 render_view_host_->SetView(view); |
442 render_view_host_->AllowBindings(content::BINDINGS_POLICY_DOM_AUTOMATION); | 442 render_view_host_->AllowBindings(content::BINDINGS_POLICY_DOM_AUTOMATION); |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
690 if (!tab->GetViewDelegate()) | 690 if (!tab->GetViewDelegate()) |
691 return; | 691 return; |
692 | 692 |
693 tab->GetViewDelegate()->TakeFocus(reverse); | 693 tab->GetViewDelegate()->TakeFocus(reverse); |
694 } | 694 } |
695 | 695 |
696 void InterstitialPage::InterstitialPageRVHViewDelegate::OnFindReply( | 696 void InterstitialPage::InterstitialPageRVHViewDelegate::OnFindReply( |
697 int request_id, int number_of_matches, const gfx::Rect& selection_rect, | 697 int request_id, int number_of_matches, const gfx::Rect& selection_rect, |
698 int active_match_ordinal, bool final_update) { | 698 int active_match_ordinal, bool final_update) { |
699 } | 699 } |
OLD | NEW |