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

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

Issue 11366118: Add support for interstitial pages on android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments addressed Created 8 years, 1 month 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) 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 609 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 void InterstitialPageImpl::FocusThroughTabTraversal(bool reverse) { 620 void InterstitialPageImpl::FocusThroughTabTraversal(bool reverse) {
621 if (!enabled()) 621 if (!enabled())
622 return; 622 return;
623 render_view_host_->SetInitialFocus(reverse); 623 render_view_host_->SetInitialFocus(reverse);
624 } 624 }
625 625
626 RenderViewHost* InterstitialPageImpl::GetRenderViewHostForTesting() const { 626 RenderViewHost* InterstitialPageImpl::GetRenderViewHostForTesting() const {
627 return render_view_host_; 627 return render_view_host_;
628 } 628 }
629 629
630 #if defined(OS_ANDROID)
631 RenderViewHost* InterstitialPageImpl::GetRenderViewHost() const {
632 return render_view_host_;
633 }
634 #endif
635
630 InterstitialPageDelegate* InterstitialPageImpl::GetDelegateForTesting() { 636 InterstitialPageDelegate* InterstitialPageImpl::GetDelegateForTesting() {
631 return delegate_.get(); 637 return delegate_.get();
632 } 638 }
633 639
634 void InterstitialPageImpl::DontCreateViewForTesting() { 640 void InterstitialPageImpl::DontCreateViewForTesting() {
635 create_view_ = false; 641 create_view_ = false;
636 } 642 }
637 643
638 gfx::Rect InterstitialPageImpl::GetRootWindowResizerRect() const { 644 gfx::Rect InterstitialPageImpl::GetRootWindowResizerRect() const {
639 return gfx::Rect(); 645 return gfx::Rect();
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 void InterstitialPageImpl::ShowCreatedFullscreenWidget(int route_id) { 677 void InterstitialPageImpl::ShowCreatedFullscreenWidget(int route_id) {
672 NOTREACHED() 678 NOTREACHED()
673 << "InterstitialPage does not support showing full screen popups."; 679 << "InterstitialPage does not support showing full screen popups.";
674 } 680 }
675 681
676 void InterstitialPageImpl::ShowContextMenu( 682 void InterstitialPageImpl::ShowContextMenu(
677 const ContextMenuParams& params, 683 const ContextMenuParams& params,
678 ContextMenuSourceType type) { 684 ContextMenuSourceType type) {
679 } 685 }
680 686
687 #if defined(OS_ANDROID)
688 void InterstitialPageImpl::AttachLayer(WebKit::WebLayer* layer) {
689 web_contents_->AttachLayer(layer);
690 }
691
692 void InterstitialPageImpl::RemoveLayer(WebKit::WebLayer* layer) {
693 web_contents_->RemoveLayer(layer);
694 }
695 #endif
696
681 void InterstitialPageImpl::Disable() { 697 void InterstitialPageImpl::Disable() {
682 enabled_ = false; 698 enabled_ = false;
683 } 699 }
684 700
685 void InterstitialPageImpl::Shutdown(RenderViewHostImpl* render_view_host) { 701 void InterstitialPageImpl::Shutdown(RenderViewHostImpl* render_view_host) {
686 render_view_host->Shutdown(); 702 render_view_host->Shutdown();
687 // We are deleted now. 703 // We are deleted now.
688 } 704 }
689 705
690 void InterstitialPageImpl::TakeActionOnResourceDispatcher( 706 void InterstitialPageImpl::TakeActionOnResourceDispatcher(
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
762 778
763 web_contents->GetDelegateView()->TakeFocus(reverse); 779 web_contents->GetDelegateView()->TakeFocus(reverse);
764 } 780 }
765 781
766 void InterstitialPageImpl::InterstitialPageRVHDelegateView::OnFindReply( 782 void InterstitialPageImpl::InterstitialPageRVHDelegateView::OnFindReply(
767 int request_id, int number_of_matches, const gfx::Rect& selection_rect, 783 int request_id, int number_of_matches, const gfx::Rect& selection_rect,
768 int active_match_ordinal, bool final_update) { 784 int active_match_ordinal, bool final_update) {
769 } 785 }
770 786
771 } // namespace content 787 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698