| 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/memory/scoped_nsobject.h" | 8 #include "base/memory/scoped_nsobject.h" |
| 9 #include "chrome/browser/search/search.h" | 9 #include "chrome/browser/search/search.h" |
| 10 #include "ui/base/resource/resource_bundle.h" | 10 #include "ui/base/resource/resource_bundle.h" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 bool LocationBarDecoration::OnMousePressed(NSRect frame) { | 64 bool LocationBarDecoration::OnMousePressed(NSRect frame) { |
| 65 return false; | 65 return false; |
| 66 } | 66 } |
| 67 | 67 |
| 68 NSMenu* LocationBarDecoration::GetMenu() { | 68 NSMenu* LocationBarDecoration::GetMenu() { |
| 69 return nil; | 69 return nil; |
| 70 } | 70 } |
| 71 | 71 |
| 72 NSFont* LocationBarDecoration::GetFont() const { | 72 NSFont* LocationBarDecoration::GetFont() const { |
| 73 if (chrome::IsInstantExtendedAPIEnabled()) | 73 if (chrome::IsInstantExtendedAPIEnabled()) |
| 74 return [NSFont fontWithName:@"Helvetica" size:15]; | 74 return [NSFont fontWithName:@"Helvetica Neue" size:15]; |
| 75 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 75 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
| 76 return rb.GetFont(ResourceBundle::BaseFont).GetNativeFont(); | 76 return rb.GetFont(ResourceBundle::BaseFont).GetNativeFont(); |
| 77 } | 77 } |
| 78 | 78 |
| 79 // static | 79 // static |
| 80 void LocationBarDecoration::DrawLabel(NSString* label, | 80 void LocationBarDecoration::DrawLabel(NSString* label, |
| 81 NSDictionary* attributes, | 81 NSDictionary* attributes, |
| 82 const NSRect& frame) { | 82 const NSRect& frame) { |
| 83 scoped_nsobject<NSAttributedString> str( | 83 scoped_nsobject<NSAttributedString> str( |
| 84 [[NSAttributedString alloc] initWithString:label attributes:attributes]); | 84 [[NSAttributedString alloc] initWithString:label attributes:attributes]); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 100 return [label sizeWithAttributes:attributes]; | 100 return [label sizeWithAttributes:attributes]; |
| 101 } | 101 } |
| 102 | 102 |
| 103 ButtonDecoration* LocationBarDecoration::AsButtonDecoration() { | 103 ButtonDecoration* LocationBarDecoration::AsButtonDecoration() { |
| 104 return NULL; | 104 return NULL; |
| 105 } | 105 } |
| 106 | 106 |
| 107 bool LocationBarDecoration::IsSeparator() const { | 107 bool LocationBarDecoration::IsSeparator() const { |
| 108 return false; | 108 return false; |
| 109 } | 109 } |
| OLD | NEW |