| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/bookmarks/bookmark_bar_view_cocoa.h" | 5 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_view_cocoa.h" |
| 6 | 6 |
| 7 #include "base/metrics/user_metrics.h" | 7 #include "base/metrics/user_metrics.h" |
| 8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
| 9 #import "chrome/browser/themes/theme_properties.h" | 9 #import "chrome/browser/themes/theme_properties.h" |
| 10 #import "chrome/browser/themes/theme_service.h" | 10 #import "chrome/browser/themes/theme_service.h" |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 DCHECK(controller) << "Controller shouldn't be nil"; | 77 DCHECK(controller) << "Controller shouldn't be nil"; |
| 78 if (self = [super initWithFrame:frame]) { | 78 if (self = [super initWithFrame:frame]) { |
| 79 controller_ = controller; | 79 controller_ = controller; |
| 80 | 80 |
| 81 NSFont* smallSystemFont = | 81 NSFont* smallSystemFont = |
| 82 [NSFont systemFontOfSize:[NSFont smallSystemFontSize]]; | 82 [NSFont systemFontOfSize:[NSFont smallSystemFontSize]]; |
| 83 noItemContainer_.reset( | 83 noItemContainer_.reset( |
| 84 [[NSView alloc] initWithFrame:NSMakeRect(0, 0, kInitialContainerWidth, | 84 [[NSView alloc] initWithFrame:NSMakeRect(0, 0, kInitialContainerWidth, |
| 85 kInitialContainerHeight)]); | 85 kInitialContainerHeight)]); |
| 86 [noItemContainer_ setAutoresizingMask:NSViewMaxXMargin]; | 86 [noItemContainer_ setAutoresizingMask:NSViewMaxXMargin]; |
| 87 [noItemContainer_ setAutoresizingMask:NSViewWidthSizable]; |
| 87 | 88 |
| 88 noItemTextfield_.reset([[NSTextField alloc] | 89 noItemTextfield_.reset([[NSTextField alloc] |
| 89 initWithFrame:NSMakeRect(kInitialTextFieldXOrigin, | 90 initWithFrame:NSMakeRect(kInitialTextFieldXOrigin, |
| 90 kInitialElementYOrigin, CGFLOAT_MAX, | 91 kInitialElementYOrigin, CGFLOAT_MAX, |
| 91 kInitialElementHeight)]); | 92 kInitialElementHeight)]); |
| 92 [noItemTextfield_ setAutoresizingMask:NSViewWidthSizable]; | 93 [noItemTextfield_ setAutoresizingMask:NSViewWidthSizable]; |
| 93 [noItemTextfield_ setFont:smallSystemFont]; | 94 [noItemTextfield_ setFont:smallSystemFont]; |
| 94 [noItemTextfield_ | 95 [noItemTextfield_ |
| 95 setStringValue:l10n_util::GetNSString(IDS_BOOKMARKS_NO_ITEMS)]; | 96 setStringValue:l10n_util::GetNSString(IDS_BOOKMARKS_NO_ITEMS)]; |
| 96 [noItemTextfield_ setEditable:NO]; | 97 [noItemTextfield_ setEditable:NO]; |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 | 349 |
| 349 - (NSMenu*)menu { | 350 - (NSMenu*)menu { |
| 350 return [[controller_ menuController] menuForBookmarkBar]; | 351 return [[controller_ menuController] menuForBookmarkBar]; |
| 351 } | 352 } |
| 352 | 353 |
| 353 - (ViewID)viewID { | 354 - (ViewID)viewID { |
| 354 return VIEW_ID_BOOKMARK_BAR; | 355 return VIEW_ID_BOOKMARK_BAR; |
| 355 } | 356 } |
| 356 | 357 |
| 357 @end // @implementation BookmarkBarView | 358 @end // @implementation BookmarkBarView |
| OLD | NEW |