OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |