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

Side by Side Diff: content/browser/frame_host/interstitial_page_impl.cc

Issue 104833006: Switch ContentSettingsObserver to be a RenderFrameObserver instead of a RenderViewObserver (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/frame_host/interstitial_page_impl.h" 5 #include "content/browser/frame_host/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 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 358
359 void InterstitialPageImpl::NavigationEntryCommitted( 359 void InterstitialPageImpl::NavigationEntryCommitted(
360 const LoadCommittedDetails& load_details) { 360 const LoadCommittedDetails& load_details) {
361 OnNavigatingAwayOrTabClosing(); 361 OnNavigatingAwayOrTabClosing();
362 } 362 }
363 363
364 void InterstitialPageImpl::WebContentsDestroyed(WebContents* web_contents) { 364 void InterstitialPageImpl::WebContentsDestroyed(WebContents* web_contents) {
365 OnNavigatingAwayOrTabClosing(); 365 OnNavigatingAwayOrTabClosing();
366 } 366 }
367 367
368 void InterstitialPageImpl::RenderFrameCreated(
369 RenderFrameHost* render_frame_host) {
370 // Note this is only for subframes in the interstitial, the notification for
371 // the main frame happens in RenderViewCreated.
372 controller_->delegate()->RenderFrameForInterstitialPageCreated(
373 render_frame_host);
374 }
375
368 RenderViewHostDelegateView* InterstitialPageImpl::GetDelegateView() { 376 RenderViewHostDelegateView* InterstitialPageImpl::GetDelegateView() {
369 return rvh_delegate_view_.get(); 377 return rvh_delegate_view_.get();
370 } 378 }
371 379
372 const GURL& InterstitialPageImpl::GetURL() const { 380 const GURL& InterstitialPageImpl::GetURL() const {
373 return url_; 381 return url_;
374 } 382 }
375 383
376 void InterstitialPageImpl::RenderViewTerminated( 384 void InterstitialPageImpl::RenderViewTerminated(
377 RenderViewHost* render_view_host, 385 RenderViewHost* render_view_host,
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 RenderWidgetHostView* view = 551 RenderWidgetHostView* view =
544 web_contents_view_port->CreateViewForWidget(render_view_host_); 552 web_contents_view_port->CreateViewForWidget(render_view_host_);
545 render_view_host_->SetView(view); 553 render_view_host_->SetView(view);
546 render_view_host_->AllowBindings(BINDINGS_POLICY_DOM_AUTOMATION); 554 render_view_host_->AllowBindings(BINDINGS_POLICY_DOM_AUTOMATION);
547 555
548 int32 max_page_id = web_contents()-> 556 int32 max_page_id = web_contents()->
549 GetMaxPageIDForSiteInstance(render_view_host_->GetSiteInstance()); 557 GetMaxPageIDForSiteInstance(render_view_host_->GetSiteInstance());
550 render_view_host_->CreateRenderView(base::string16(), 558 render_view_host_->CreateRenderView(base::string16(),
551 MSG_ROUTING_NONE, 559 MSG_ROUTING_NONE,
552 max_page_id); 560 max_page_id);
553 controller_->delegate()->RenderViewForInterstitialPageCreated( 561 controller_->delegate()->RenderFrameForInterstitialPageCreated(
554 render_view_host_); 562 frame_tree_.root()->render_frame_host());
555 view->SetSize(web_contents_view->GetContainerSize()); 563 view->SetSize(web_contents_view->GetContainerSize());
556 // Don't show the interstitial until we have navigated to it. 564 // Don't show the interstitial until we have navigated to it.
557 view->Hide(); 565 view->Hide();
558 return web_contents_view; 566 return web_contents_view;
559 } 567 }
560 568
561 void InterstitialPageImpl::Proceed() { 569 void InterstitialPageImpl::Proceed() {
562 // Don't repeat this if we are already shutting down. We cannot check for 570 // Don't repeat this if we are already shutting down. We cannot check for
563 // enabled() here, because we may have called Disable without calling Hide. 571 // enabled() here, because we may have called Disable without calling Hide.
564 if (!render_view_host_) 572 if (!render_view_host_)
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
847 855
848 web_contents->GetDelegateView()->TakeFocus(reverse); 856 web_contents->GetDelegateView()->TakeFocus(reverse);
849 } 857 }
850 858
851 void InterstitialPageImpl::InterstitialPageRVHDelegateView::OnFindReply( 859 void InterstitialPageImpl::InterstitialPageRVHDelegateView::OnFindReply(
852 int request_id, int number_of_matches, const gfx::Rect& selection_rect, 860 int request_id, int number_of_matches, const gfx::Rect& selection_rect,
853 int active_match_ordinal, bool final_update) { 861 int active_match_ordinal, bool final_update) {
854 } 862 }
855 863
856 } // namespace content 864 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698