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

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

Issue 7057014: Variety of tweaks to View API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/ui/views/autocomplete/autocomplete_popup_contents_view. h" 5 #include "chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view. h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/autocomplete/autocomplete_popup_model.h" 9 #include "chrome/browser/autocomplete/autocomplete_popup_model.h"
10 #include "chrome/browser/instant/instant_confirm_dialog.h" 10 #include "chrome/browser/instant/instant_confirm_dialog.h"
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 current_frame_bounds.set_height( 270 current_frame_bounds.set_height(
271 current_frame_bounds.height() + current_height_delta); 271 current_frame_bounds.height() + current_height_delta);
272 return current_frame_bounds; 272 return current_frame_bounds;
273 } 273 }
274 274
275 void AutocompletePopupContentsView::LayoutChildren() { 275 void AutocompletePopupContentsView::LayoutChildren() {
276 gfx::Rect contents_rect = GetContentsBounds(); 276 gfx::Rect contents_rect = GetContentsBounds();
277 int top = contents_rect.y(); 277 int top = contents_rect.y();
278 for (int i = 0; i < child_count(); ++i) { 278 for (int i = 0; i < child_count(); ++i) {
279 View* v = GetChildViewAt(i); 279 View* v = GetChildViewAt(i);
280 if (v->IsVisible()) { 280 if (v->visible()) {
281 v->SetBounds(contents_rect.x(), top, contents_rect.width(), 281 v->SetBounds(contents_rect.x(), top, contents_rect.width(),
282 v->GetPreferredSize().height()); 282 v->GetPreferredSize().height());
283 top = v->bounds().bottom(); 283 top = v->bounds().bottom();
284 } 284 }
285 } 285 }
286 } 286 }
287 287
288 //////////////////////////////////////////////////////////////////////////////// 288 ////////////////////////////////////////////////////////////////////////////////
289 // AutocompletePopupContentsView, AutocompletePopupView overrides: 289 // AutocompletePopupContentsView, AutocompletePopupView overrides:
290 290
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
702 opt_in_view_ = NULL; 702 opt_in_view_ = NULL;
703 PromoCounter* counter = model_->profile()->GetInstantPromoCounter(); 703 PromoCounter* counter = model_->profile()->GetInstantPromoCounter();
704 DCHECK(counter); 704 DCHECK(counter);
705 counter->Hide(); 705 counter->Hide();
706 if (opt_in) { 706 if (opt_in) {
707 browser::ShowInstantConfirmDialogIfNecessary( 707 browser::ShowInstantConfirmDialogIfNecessary(
708 location_bar_->GetWindow()->GetNativeWindow(), model_->profile()); 708 location_bar_->GetWindow()->GetNativeWindow(), model_->profile());
709 } 709 }
710 UpdatePopupAppearance(); 710 UpdatePopupAppearance();
711 } 711 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698