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

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

Issue 9150016: Move creation and ownership of ResourceDispatcherHost and PluginService to content. This gives a ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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"
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 562
563 if (action == CANCEL || action == RESUME) { 563 if (action == CANCEL || action == RESUME) {
564 if (resource_dispatcher_host_notified_) 564 if (resource_dispatcher_host_notified_)
565 return; 565 return;
566 resource_dispatcher_host_notified_ = true; 566 resource_dispatcher_host_notified_ = true;
567 } 567 }
568 568
569 // The tab might not have a render_view_host if it was closed (in which case, 569 // The tab might not have a render_view_host if it was closed (in which case,
570 // we have taken care of the blocked requests when processing 570 // we have taken care of the blocked requests when processing
571 // NOTIFY_RENDER_WIDGET_HOST_DESTROYED. 571 // NOTIFY_RENDER_WIDGET_HOST_DESTROYED.
572 // Also we need to test there is a ResourceDispatcherHost, as when unit-tests
573 // we don't have one.
574 RenderViewHost* rvh = RenderViewHost::FromID(original_child_id_, 572 RenderViewHost* rvh = RenderViewHost::FromID(original_child_id_,
575 original_rvh_id_); 573 original_rvh_id_);
576 if (!rvh || 574 if (!rvh)
577 !content::GetContentClient()->browser()->GetResourceDispatcherHost()) {
578 return; 575 return;
579 }
580 576
581 BrowserThread::PostTask( 577 BrowserThread::PostTask(
582 BrowserThread::IO, 578 BrowserThread::IO,
583 FROM_HERE, 579 FROM_HERE,
584 base::Bind( 580 base::Bind(
585 &ResourceRequestHelper, 581 &ResourceRequestHelper,
586 content::GetContentClient()->browser()->GetResourceDispatcherHost(), 582 ResourceDispatcherHost::Get(),
587 original_child_id_, 583 original_child_id_,
588 original_rvh_id_, 584 original_rvh_id_,
589 action)); 585 action));
590 } 586 }
591 587
592 // static 588 // static
593 void InterstitialPage::InitInterstitialPageMap() { 589 void InterstitialPage::InitInterstitialPageMap() {
594 if (!tab_to_interstitial_page_) 590 if (!tab_to_interstitial_page_)
595 tab_to_interstitial_page_ = new InterstitialPageMap; 591 tab_to_interstitial_page_ = new InterstitialPageMap;
596 } 592 }
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
686 if (!tab->GetViewDelegate()) 682 if (!tab->GetViewDelegate())
687 return; 683 return;
688 684
689 tab->GetViewDelegate()->TakeFocus(reverse); 685 tab->GetViewDelegate()->TakeFocus(reverse);
690 } 686 }
691 687
692 void InterstitialPage::InterstitialPageRVHViewDelegate::OnFindReply( 688 void InterstitialPage::InterstitialPageRVHViewDelegate::OnFindReply(
693 int request_id, int number_of_matches, const gfx::Rect& selection_rect, 689 int request_id, int number_of_matches, const gfx::Rect& selection_rect,
694 int active_match_ordinal, bool final_update) { 690 int active_match_ordinal, bool final_update) {
695 } 691 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698