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

Side by Side Diff: chrome/browser/views/autocomplete/autocomplete_popup_contents_view.cc

Issue 3417011: Makes match preview send the dimensions of the omnibox to the page. (Closed)
Patch Set: Fix unittest Created 10 years, 3 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/views/autocomplete/autocomplete_popup_contents_view.h" 5 #include "chrome/browser/views/autocomplete/autocomplete_popup_contents_view.h"
6 6
7 #include "unicode/ubidi.h" 7 #include "unicode/ubidi.h"
8 8
9 #include "app/bidi_line_iterator.h" 9 #include "app/bidi_line_iterator.h"
10 #include "app/l10n_util.h" 10 #include "app/l10n_util.h"
(...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 if (target_bounds_.height() < start_bounds_.height()) 723 if (target_bounds_.height() < start_bounds_.height())
724 size_animation_.Show(); 724 size_animation_.Show();
725 else 725 else
726 start_bounds_ = target_bounds_; 726 start_bounds_ = target_bounds_;
727 popup_->SetBounds(GetPopupBounds()); 727 popup_->SetBounds(GetPopupBounds());
728 } 728 }
729 729
730 SchedulePaint(); 730 SchedulePaint();
731 } 731 }
732 732
733 gfx::Rect AutocompletePopupContentsView::GetTargetBounds() {
734 return target_bounds_;
735 }
736
733 void AutocompletePopupContentsView::PaintUpdatesNow() { 737 void AutocompletePopupContentsView::PaintUpdatesNow() {
734 // TODO(beng): remove this from the interface. 738 // TODO(beng): remove this from the interface.
735 } 739 }
736 740
737 void AutocompletePopupContentsView::OnDragCanceled() { 741 void AutocompletePopupContentsView::OnDragCanceled() {
738 ignore_mouse_drag_ = true; 742 ignore_mouse_drag_ = true;
739 } 743 }
740 744
741 AutocompletePopupModel* AutocompletePopupContentsView::GetModel() { 745 AutocompletePopupModel* AutocompletePopupContentsView::GetModel() {
742 return model_.get(); 746 return model_.get();
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
1016 // bubble appear at the same height as the Star bubble. 1020 // bubble appear at the same height as the Star bubble.
1017 location_bar_bounds.Inset(LocationBarView::kNormalHorizontalEdgeThickness, 1021 location_bar_bounds.Inset(LocationBarView::kNormalHorizontalEdgeThickness,
1018 0); 1022 0);
1019 } 1023 }
1020 gfx::Point location_bar_origin(location_bar_bounds.origin()); 1024 gfx::Point location_bar_origin(location_bar_bounds.origin());
1021 views::View::ConvertPointToScreen(location_bar_, &location_bar_origin); 1025 views::View::ConvertPointToScreen(location_bar_, &location_bar_origin);
1022 location_bar_bounds.set_origin(location_bar_origin); 1026 location_bar_bounds.set_origin(location_bar_origin);
1023 return bubble_border_->GetBounds( 1027 return bubble_border_->GetBounds(
1024 location_bar_bounds, gfx::Size(location_bar_bounds.width(), h)); 1028 location_bar_bounds, gfx::Size(location_bar_bounds.width(), h));
1025 } 1029 }
OLDNEW
« no previous file with comments | « chrome/browser/views/autocomplete/autocomplete_popup_contents_view.h ('k') | chrome/browser/views/frame/browser_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698