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/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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 virtual void ShowPopupMenu(const gfx::Rect& bounds, | 75 virtual void ShowPopupMenu(const gfx::Rect& bounds, |
76 int item_height, | 76 int item_height, |
77 double item_font_size, | 77 double item_font_size, |
78 int selected_item, | 78 int selected_item, |
79 const std::vector<WebMenuItem>& items, | 79 const std::vector<WebMenuItem>& items, |
80 bool right_aligned, | 80 bool right_aligned, |
81 bool allow_multiple_selection) OVERRIDE; | 81 bool allow_multiple_selection) OVERRIDE; |
82 virtual void StartDragging(const WebDropData& drop_data, | 82 virtual void StartDragging(const WebDropData& drop_data, |
83 WebDragOperationsMask operations_allowed, | 83 WebDragOperationsMask operations_allowed, |
84 const gfx::ImageSkia& image, | 84 const gfx::ImageSkia& image, |
85 const gfx::Point& image_offset) OVERRIDE; | 85 const gfx::Vector2d& image_offset) OVERRIDE; |
86 virtual void UpdateDragCursor(WebDragOperation operation) OVERRIDE; | 86 virtual void UpdateDragCursor(WebDragOperation operation) OVERRIDE; |
87 virtual void GotFocus() OVERRIDE; | 87 virtual void GotFocus() OVERRIDE; |
88 virtual void TakeFocus(bool reverse) OVERRIDE; | 88 virtual void TakeFocus(bool reverse) OVERRIDE; |
89 virtual void OnFindReply(int request_id, | 89 virtual void OnFindReply(int request_id, |
90 int number_of_matches, | 90 int number_of_matches, |
91 const gfx::Rect& selection_rect, | 91 const gfx::Rect& selection_rect, |
92 int active_match_ordinal, | 92 int active_match_ordinal, |
93 bool final_update); | 93 bool final_update); |
94 | 94 |
95 private: | 95 private: |
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
704 const std::vector<WebMenuItem>& items, | 704 const std::vector<WebMenuItem>& items, |
705 bool right_aligned, | 705 bool right_aligned, |
706 bool allow_multiple_selection) { | 706 bool allow_multiple_selection) { |
707 NOTREACHED() << "InterstitialPage does not support showing popup menus."; | 707 NOTREACHED() << "InterstitialPage does not support showing popup menus."; |
708 } | 708 } |
709 | 709 |
710 void InterstitialPageImpl::InterstitialPageRVHDelegateView::StartDragging( | 710 void InterstitialPageImpl::InterstitialPageRVHDelegateView::StartDragging( |
711 const WebDropData& drop_data, | 711 const WebDropData& drop_data, |
712 WebDragOperationsMask allowed_operations, | 712 WebDragOperationsMask allowed_operations, |
713 const gfx::ImageSkia& image, | 713 const gfx::ImageSkia& image, |
714 const gfx::Point& image_offset) { | 714 const gfx::Vector2d& image_offset) { |
715 NOTREACHED() << "InterstitialPage does not support dragging yet."; | 715 NOTREACHED() << "InterstitialPage does not support dragging yet."; |
716 } | 716 } |
717 | 717 |
718 void InterstitialPageImpl::InterstitialPageRVHDelegateView::UpdateDragCursor( | 718 void InterstitialPageImpl::InterstitialPageRVHDelegateView::UpdateDragCursor( |
719 WebDragOperation) { | 719 WebDragOperation) { |
720 NOTREACHED() << "InterstitialPage does not support dragging yet."; | 720 NOTREACHED() << "InterstitialPage does not support dragging yet."; |
721 } | 721 } |
722 | 722 |
723 void InterstitialPageImpl::InterstitialPageRVHDelegateView::GotFocus() { | 723 void InterstitialPageImpl::InterstitialPageRVHDelegateView::GotFocus() { |
724 } | 724 } |
725 | 725 |
726 void InterstitialPageImpl::InterstitialPageRVHDelegateView::TakeFocus( | 726 void InterstitialPageImpl::InterstitialPageRVHDelegateView::TakeFocus( |
727 bool reverse) { | 727 bool reverse) { |
728 if (!interstitial_page_->web_contents()) | 728 if (!interstitial_page_->web_contents()) |
729 return; | 729 return; |
730 WebContentsImpl* web_contents = | 730 WebContentsImpl* web_contents = |
731 static_cast<WebContentsImpl*>(interstitial_page_->web_contents()); | 731 static_cast<WebContentsImpl*>(interstitial_page_->web_contents()); |
732 if (!web_contents->GetDelegateView()) | 732 if (!web_contents->GetDelegateView()) |
733 return; | 733 return; |
734 | 734 |
735 web_contents->GetDelegateView()->TakeFocus(reverse); | 735 web_contents->GetDelegateView()->TakeFocus(reverse); |
736 } | 736 } |
737 | 737 |
738 void InterstitialPageImpl::InterstitialPageRVHDelegateView::OnFindReply( | 738 void InterstitialPageImpl::InterstitialPageRVHDelegateView::OnFindReply( |
739 int request_id, int number_of_matches, const gfx::Rect& selection_rect, | 739 int request_id, int number_of_matches, const gfx::Rect& selection_rect, |
740 int active_match_ordinal, bool final_update) { | 740 int active_match_ordinal, bool final_update) { |
741 } | 741 } |
742 | 742 |
743 } // namespace content | 743 } // namespace content |
OLD | NEW |