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

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

Issue 11269022: Add Vector2d classes that represent offsets, instead of using Point. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix step one more time 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 637 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 const std::vector<WebMenuItem>& items, 733 const std::vector<WebMenuItem>& items,
734 bool right_aligned, 734 bool right_aligned,
735 bool allow_multiple_selection) { 735 bool allow_multiple_selection) {
736 NOTREACHED() << "InterstitialPage does not support showing popup menus."; 736 NOTREACHED() << "InterstitialPage does not support showing popup menus.";
737 } 737 }
738 738
739 void InterstitialPageImpl::InterstitialPageRVHDelegateView::StartDragging( 739 void InterstitialPageImpl::InterstitialPageRVHDelegateView::StartDragging(
740 const WebDropData& drop_data, 740 const WebDropData& drop_data,
741 WebDragOperationsMask allowed_operations, 741 WebDragOperationsMask allowed_operations,
742 const gfx::ImageSkia& image, 742 const gfx::ImageSkia& image,
743 const gfx::Point& image_offset) { 743 const gfx::Vector2d& image_offset) {
744 NOTREACHED() << "InterstitialPage does not support dragging yet."; 744 NOTREACHED() << "InterstitialPage does not support dragging yet.";
745 } 745 }
746 746
747 void InterstitialPageImpl::InterstitialPageRVHDelegateView::UpdateDragCursor( 747 void InterstitialPageImpl::InterstitialPageRVHDelegateView::UpdateDragCursor(
748 WebDragOperation) { 748 WebDragOperation) {
749 NOTREACHED() << "InterstitialPage does not support dragging yet."; 749 NOTREACHED() << "InterstitialPage does not support dragging yet.";
750 } 750 }
751 751
752 void InterstitialPageImpl::InterstitialPageRVHDelegateView::GotFocus() { 752 void InterstitialPageImpl::InterstitialPageRVHDelegateView::GotFocus() {
753 } 753 }
754 754
755 void InterstitialPageImpl::InterstitialPageRVHDelegateView::TakeFocus( 755 void InterstitialPageImpl::InterstitialPageRVHDelegateView::TakeFocus(
756 bool reverse) { 756 bool reverse) {
757 if (!interstitial_page_->web_contents()) 757 if (!interstitial_page_->web_contents())
758 return; 758 return;
759 WebContentsImpl* web_contents = 759 WebContentsImpl* web_contents =
760 static_cast<WebContentsImpl*>(interstitial_page_->web_contents()); 760 static_cast<WebContentsImpl*>(interstitial_page_->web_contents());
761 if (!web_contents->GetDelegateView()) 761 if (!web_contents->GetDelegateView())
762 return; 762 return;
763 763
764 web_contents->GetDelegateView()->TakeFocus(reverse); 764 web_contents->GetDelegateView()->TakeFocus(reverse);
765 } 765 }
766 766
767 void InterstitialPageImpl::InterstitialPageRVHDelegateView::OnFindReply( 767 void InterstitialPageImpl::InterstitialPageRVHDelegateView::OnFindReply(
768 int request_id, int number_of_matches, const gfx::Rect& selection_rect, 768 int request_id, int number_of_matches, const gfx::Rect& selection_rect,
769 int active_match_ordinal, bool final_update) { 769 int active_match_ordinal, bool final_update) {
770 } 770 }
771 771
772 } // namespace content 772 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698