Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(156)

Side by Side Diff: chrome/browser/tab_contents/interstitial_page.cc

Issue 126137: Part 1 of merging Extensions and DOMUI (Closed)
Patch Set: add test and rebase Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "chrome/browser/tab_contents/interstitial_page.h" 5 #include "chrome/browser/tab_contents/interstitial_page.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/thread.h" 9 #include "base/thread.h"
10 #include "chrome/browser/browser_list.h" 10 #include "chrome/browser/browser_list.h"
11 #include "chrome/browser/browser_process.h" 11 #include "chrome/browser/browser_process.h"
12 #include "chrome/browser/dom_operation_notification_details.h" 12 #include "chrome/browser/dom_operation_notification_details.h"
13 #include "chrome/browser/renderer_host/render_widget_host_view.h" 13 #include "chrome/browser/renderer_host/render_widget_host_view.h"
14 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" 14 #include "chrome/browser/renderer_host/resource_dispatcher_host.h"
15 #include "chrome/browser/tab_contents/navigation_controller.h" 15 #include "chrome/browser/tab_contents/navigation_controller.h"
16 #include "chrome/browser/tab_contents/navigation_entry.h" 16 #include "chrome/browser/tab_contents/navigation_entry.h"
17 #include "chrome/browser/tab_contents/tab_contents.h" 17 #include "chrome/browser/tab_contents/tab_contents.h"
18 #include "chrome/browser/tab_contents/tab_contents_view.h" 18 #include "chrome/browser/tab_contents/tab_contents_view.h"
19 #include "chrome/common/bindings_policy.h"
19 #include "chrome/common/notification_service.h" 20 #include "chrome/common/notification_service.h"
20 #include "grit/browser_resources.h" 21 #include "grit/browser_resources.h"
21 #include "net/base/escape.h" 22 #include "net/base/escape.h"
22 #include "views/window/window_delegate.h" 23 #include "views/window/window_delegate.h"
23 24
24 namespace { 25 namespace {
25 26
26 class ResourceRequestTask : public Task { 27 class ResourceRequestTask : public Task {
27 public: 28 public:
28 ResourceRequestTask(int process_id, 29 ResourceRequestTask(int process_id,
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 SiteInstance::CreateSiteInstance(tab()->profile()), 286 SiteInstance::CreateSiteInstance(tab()->profile()),
286 this, MSG_ROUTING_NONE, NULL); 287 this, MSG_ROUTING_NONE, NULL);
287 return render_view_host; 288 return render_view_host;
288 } 289 }
289 290
290 TabContentsView* InterstitialPage::CreateTabContentsView() { 291 TabContentsView* InterstitialPage::CreateTabContentsView() {
291 TabContentsView* tab_contents_view = tab()->view(); 292 TabContentsView* tab_contents_view = tab()->view();
292 RenderWidgetHostView* view = 293 RenderWidgetHostView* view =
293 tab_contents_view->CreateViewForWidget(render_view_host_); 294 tab_contents_view->CreateViewForWidget(render_view_host_);
294 render_view_host_->set_view(view); 295 render_view_host_->set_view(view);
295 render_view_host_->AllowDomAutomationBindings(); 296 render_view_host_->AllowBindings(BindingsPolicy::DOM_AUTOMATION);
296 render_view_host_->CreateRenderView(); 297 render_view_host_->CreateRenderView();
297 view->SetSize(tab_contents_view->GetContainerSize()); 298 view->SetSize(tab_contents_view->GetContainerSize());
298 // Don't show the interstitial until we have navigated to it. 299 // Don't show the interstitial until we have navigated to it.
299 view->Hide(); 300 view->Hide();
300 return tab_contents_view; 301 return tab_contents_view;
301 } 302 }
302 303
303 void InterstitialPage::Proceed() { 304 void InterstitialPage::Proceed() {
304 if (action_taken_) { 305 if (action_taken_) {
305 NOTREACHED(); 306 NOTREACHED();
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 560
560 void InterstitialPage::InterstitialPageRVHViewDelegate::HandleMouseLeave() { 561 void InterstitialPage::InterstitialPageRVHViewDelegate::HandleMouseLeave() {
561 if (interstitial_page_->tab() && interstitial_page_->tab()->GetViewDelegate()) 562 if (interstitial_page_->tab() && interstitial_page_->tab()->GetViewDelegate())
562 interstitial_page_->tab()->GetViewDelegate()->HandleMouseLeave(); 563 interstitial_page_->tab()->GetViewDelegate()->HandleMouseLeave();
563 } 564 }
564 565
565 void InterstitialPage::InterstitialPageRVHViewDelegate::OnFindReply( 566 void InterstitialPage::InterstitialPageRVHViewDelegate::OnFindReply(
566 int request_id, int number_of_matches, const gfx::Rect& selection_rect, 567 int request_id, int number_of_matches, const gfx::Rect& selection_rect,
567 int active_match_ordinal, bool final_update) { 568 int active_match_ordinal, bool final_update) {
568 } 569 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/render_view_host_manager.cc ('k') | chrome/browser/tab_contents/tab_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698