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

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

Issue 152343006: Clean-up: Replaces obsolete Font/FontList methods. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Synced. Created 6 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
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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 // the entire font ascent from GetCapHeight(). Centering the ascent makes 139 // the entire font ascent from GetCapHeight(). Centering the ascent makes
140 // the font look too low, so if GetCapHeight() returns the ascent, center 140 // the font look too low, so if GetCapHeight() returns the ascent, center
141 // the entire font height instead. 141 // the entire font height instead.
142 const int space = 142 const int space =
143 height - ((internal_leading != 0) ? 143 height - ((internal_leading != 0) ?
144 font_list.GetCapHeight() : font_list.GetHeight()); 144 font_list.GetCapHeight() : font_list.GetHeight());
145 const int y_offset = space / 2 - internal_leading; 145 const int y_offset = space / 2 - internal_leading;
146 const int space_at_bottom = height - (y_offset + font_list.GetHeight()); 146 const int space_at_bottom = height - (y_offset + font_list.GetHeight());
147 if ((y_offset >= 0) && (space_at_bottom >= 0)) 147 if ((y_offset >= 0) && (space_at_bottom >= 0))
148 break; 148 break;
149 font_list = font_list.DeriveFontListWithSizeDelta(-1); 149 font_list = font_list.DeriveWithSizeDelta(-1);
150 } 150 }
151 return font_list; 151 return font_list;
152 } 152 }
153 153
154 // Functor for moving BookmarkManagerPrivate page actions to the right via 154 // Functor for moving BookmarkManagerPrivate page actions to the right via
155 // stable_partition. 155 // stable_partition.
156 class IsPageActionViewRightAligned { 156 class IsPageActionViewRightAligned {
157 public: 157 public:
158 explicit IsPageActionViewRightAligned(ExtensionService* extension_service) 158 explicit IsPageActionViewRightAligned(ExtensionService* extension_service)
159 : extension_service_(extension_service) {} 159 : extension_service_(extension_service) {}
(...skipping 1384 matching lines...) Expand 10 before | Expand all | Expand 10 after
1544 bounds.Inset(-(horizontal_padding + 1) / 2, 0); 1544 bounds.Inset(-(horizontal_padding + 1) / 2, 0);
1545 location_bar_util::PaintExtensionActionBackground( 1545 location_bar_util::PaintExtensionActionBackground(
1546 *(*page_action_view)->image_view()->page_action(), 1546 *(*page_action_view)->image_view()->page_action(),
1547 tab_id, canvas, bounds, text_color, background_color); 1547 tab_id, canvas, bounds, text_color, background_color);
1548 } 1548 }
1549 } 1549 }
1550 1550
1551 void LocationBarView::AccessibilitySetValue(const base::string16& new_value) { 1551 void LocationBarView::AccessibilitySetValue(const base::string16& new_value) {
1552 omnibox_view_->SetUserText(new_value, new_value, true); 1552 omnibox_view_->SetUserText(new_value, new_value, true);
1553 } 1553 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/first_run_bubble.cc ('k') | chrome/browser/ui/views/omnibox/omnibox_result_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698