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

Side by Side Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 15745031: Restyle omnibox popup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Go back to 3 max search suggestions for now Created 7 years, 6 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) 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 "chrome/browser/ui/views/location_bar/location_bar_view.h" 5 #include "chrome/browser/ui/views/location_bar/location_bar_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1099 matching lines...) Expand 10 before | Expand all | Expand 10 after
1110 } 1110 }
1111 1111
1112 InstantController* LocationBarView::GetInstant() { 1112 InstantController* LocationBarView::GetInstant() {
1113 return delegate_->GetInstant(); 1113 return delegate_->GetInstant();
1114 } 1114 }
1115 1115
1116 WebContents* LocationBarView::GetWebContents() const { 1116 WebContents* LocationBarView::GetWebContents() const {
1117 return delegate_->GetWebContents(); 1117 return delegate_->GetWebContents();
1118 } 1118 }
1119 1119
1120 void LocationBarView::GetPopupPositioningInfo(
1121 gfx::Point* top_left_screen_coord,
1122 int* popup_width,
1123 int* left_margin,
1124 int* right_margin) {
1125 return delegate_->GetOmniboxPopupPositioningInfo(
1126 top_left_screen_coord, popup_width, left_margin, right_margin);
1127 }
1128
1129 ui::ThemeProvider* LocationBarView::GetThemeProviderForPopup() {
1130 return GetThemeProvider();
1131 }
1132
1133 gfx::NativeView LocationBarView::GetPopupParent() {
1134 return GetWidget()->GetNativeView();
1135 }
1136
1120 int LocationBarView::GetHorizontalEdgeThickness() const { 1137 int LocationBarView::GetHorizontalEdgeThickness() const {
1121 if (!is_popup_mode_) 1138 if (!is_popup_mode_)
1122 return kNormalHorizontalEdgeThickness; 1139 return kNormalHorizontalEdgeThickness;
1123 1140
1124 // In maximized popup mode, there isn't any edge. 1141 // In maximized popup mode, there isn't any edge.
1125 return (browser_ && browser_->window() && browser_->window()->IsMaximized()) ? 1142 return (browser_ && browser_->window() && browser_->window()->IsMaximized()) ?
1126 0 : kPopupEdgeThickness; 1143 0 : kPopupEdgeThickness;
1127 } 1144 }
1128 1145
1129 void LocationBarView::RefreshContentSettingViews() { 1146 void LocationBarView::RefreshContentSettingViews() {
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
1540 int LocationBarView::GetInternalHeight(bool use_preferred_size) { 1557 int LocationBarView::GetInternalHeight(bool use_preferred_size) {
1541 int total_height = 1558 int total_height =
1542 use_preferred_size ? GetPreferredSize().height() : height(); 1559 use_preferred_size ? GetPreferredSize().height() : height();
1543 return std::max(total_height - (vertical_edge_thickness() * 2), 0); 1560 return std::max(total_height - (vertical_edge_thickness() * 2), 0);
1544 } 1561 }
1545 1562
1546 bool LocationBarView::HasValidSuggestText() const { 1563 bool LocationBarView::HasValidSuggestText() const {
1547 return suggested_text_view_->visible() && 1564 return suggested_text_view_->visible() &&
1548 !suggested_text_view_->size().IsEmpty(); 1565 !suggested_text_view_->size().IsEmpty();
1549 } 1566 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698