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

Side by Side Diff: chrome/browser/autocomplete/autocomplete_popup.cc

Issue 20011: Improved OTR avatar and popup window rendering. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/views/frame/aero_glass_frame.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/autocomplete/autocomplete_popup.h" 5 #include "chrome/browser/autocomplete/autocomplete_popup.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/scoped_ptr.h" 9 #include "base/scoped_ptr.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 gfx::Point top_left(-rc.TopLeft()); 115 gfx::Point top_left(-rc.TopLeft());
116 views::View::ConvertPointToScreen(edit_view_->parent_view(), &top_left); 116 views::View::ConvertPointToScreen(edit_view_->parent_view(), &top_left);
117 rc.OffsetRect(top_left.ToPOINT()); 117 rc.OffsetRect(top_left.ToPOINT());
118 // Expand by one pixel on each side since that's the amount the location bar 118 // Expand by one pixel on each side since that's the amount the location bar
119 // view is inset from the divider line that edges the adjacent buttons. 119 // view is inset from the divider line that edges the adjacent buttons.
120 // Deflate the top and bottom by the height of the extra graphics around the 120 // Deflate the top and bottom by the height of the extra graphics around the
121 // edit. 121 // edit.
122 // TODO(pkasting): http://b/972786 This shouldn't be hardcoded to rely on 122 // TODO(pkasting): http://b/972786 This shouldn't be hardcoded to rely on
123 // LocationBarView constants. Instead we should just make the edit be "at the 123 // LocationBarView constants. Instead we should just make the edit be "at the
124 // right coordinates", or something else generic. 124 // right coordinates", or something else generic.
125 rc.InflateRect(1, -LocationBarView::kTextVertMargin); 125 rc.InflateRect(1, -LocationBarView::kVertMargin);
126 // Now rc is the exact width we want and is positioned like the edit would 126 // Now rc is the exact width we want and is positioned like the edit would
127 // be, so shift the top and bottom downwards so the new top is where the old 127 // be, so shift the top and bottom downwards so the new top is where the old
128 // bottom is and the rect has the height we need for all our entries, plus a 128 // bottom is and the rect has the height we need for all our entries, plus a
129 // one-pixel border on top and bottom. 129 // one-pixel border on top and bottom.
130 rc.top = rc.bottom; 130 rc.top = rc.bottom;
131 rc.bottom += static_cast<int>(result.size()) * line_info_.line_height + 2; 131 rc.bottom += static_cast<int>(result.size()) * line_info_.line_height + 2;
132 132
133 if (!m_hWnd) { 133 if (!m_hWnd) {
134 // To prevent this window from being activated, we create an invisible 134 // To prevent this window from being activated, we create an invisible
135 // window and manually show it without activating it. 135 // window and manually show it without activating it.
(...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after
975 } 975 }
976 edit_model_->OnPopupDataChanged(inline_autocomplete_text, false, keyword, 976 edit_model_->OnPopupDataChanged(inline_autocomplete_text, false, keyword,
977 is_keyword_hint, type); 977 is_keyword_hint, type);
978 return; 978 return;
979 } 979 }
980 980
981 default: 981 default:
982 NOTREACHED(); 982 NOTREACHED();
983 } 983 }
984 } 984 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/views/frame/aero_glass_frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698