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

Side by Side Diff: chrome/browser/ui/cocoa/location_bar/location_bar_decoration.mm

Issue 1819753003: Allow various font weights in gfx. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a lost comment and modify a render text unittest to not test black because of test env font con… Created 4 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
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 #import "chrome/browser/ui/cocoa/location_bar/location_bar_decoration.h" 5 #import "chrome/browser/ui/cocoa/location_bar/location_bar_decoration.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/mac/scoped_nsobject.h" 8 #include "base/mac/scoped_nsobject.h"
9 #include "chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h" 9 #include "chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h"
10 #include "ui/gfx/color_palette.h" 10 #include "ui/gfx/color_palette.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 bool LocationBarDecoration::OnMousePressed(NSRect frame, NSPoint location) { 76 bool LocationBarDecoration::OnMousePressed(NSRect frame, NSPoint location) {
77 return false; 77 return false;
78 } 78 }
79 79
80 NSMenu* LocationBarDecoration::GetMenu() { 80 NSMenu* LocationBarDecoration::GetMenu() {
81 return nil; 81 return nil;
82 } 82 }
83 83
84 NSFont* LocationBarDecoration::GetFont() const { 84 NSFont* LocationBarDecoration::GetFont() const {
85 return OmniboxViewMac::GetFieldFont(gfx::Font::NORMAL); 85 return OmniboxViewMac::GetNormalFieldFont();
86 } 86 }
87 87
88 NSPoint LocationBarDecoration::GetBubblePointInFrame(NSRect frame) { 88 NSPoint LocationBarDecoration::GetBubblePointInFrame(NSRect frame) {
89 // Clients that use a bubble should implement this. Can't be abstract 89 // Clients that use a bubble should implement this. Can't be abstract
90 // because too many LocationBarDecoration subclasses don't use a bubble. 90 // because too many LocationBarDecoration subclasses don't use a bubble.
91 // Can't live on subclasses only because it needs to be on a shared API. 91 // Can't live on subclasses only because it needs to be on a shared API.
92 NOTREACHED(); 92 NOTREACHED();
93 return frame.origin; 93 return frame.origin;
94 } 94 }
95 95
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 CGFloat gray_scale = location_bar_is_dark ? kMaterialDividerIncognitoGrayScale 145 CGFloat gray_scale = location_bar_is_dark ? kMaterialDividerIncognitoGrayScale
146 : kMaterialDividerGrayScale; 146 : kMaterialDividerGrayScale;
147 return [NSColor colorWithCalibratedWhite:gray_scale 147 return [NSColor colorWithCalibratedWhite:gray_scale
148 alpha:kMaterialDividerAlpha / 255.0]; 148 alpha:kMaterialDividerAlpha / 255.0];
149 } 149 }
150 150
151 gfx::VectorIconId LocationBarDecoration::GetMaterialVectorIconId() const { 151 gfx::VectorIconId LocationBarDecoration::GetMaterialVectorIconId() const {
152 NOTREACHED(); 152 NOTREACHED();
153 return gfx::VectorIconId::VECTOR_ICON_NONE; 153 return gfx::VectorIconId::VECTOR_ICON_NONE;
154 } 154 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/autofill/autofill_popup_controller_impl.cc ('k') | chrome/browser/ui/cocoa/omnibox/omnibox_popup_cell.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698