| OLD | NEW |
| 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 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h" | 5 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #import "base/mac/bundle_locations.h" | 9 #import "base/mac/bundle_locations.h" |
| 10 #import "base/mac/foundation_util.h" | 10 #import "base/mac/foundation_util.h" |
| (...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 BookmarkButtonCell* offTheSideCell = [offTheSideButton_ cell]; | 486 BookmarkButtonCell* offTheSideCell = [offTheSideButton_ cell]; |
| 487 [offTheSideCell setTag:kMaterialStandardButtonTypeWithLimitedClickFeedback]; | 487 [offTheSideCell setTag:kMaterialStandardButtonTypeWithLimitedClickFeedback]; |
| 488 [offTheSideCell setImagePosition:NSImageOnly]; | 488 [offTheSideCell setImagePosition:NSImageOnly]; |
| 489 | 489 |
| 490 // The cell is configured in the nib to draw a white highlight when clicked. | 490 // The cell is configured in the nib to draw a white highlight when clicked. |
| 491 [offTheSideCell setHighlightsBy:NSNoCellMask]; | 491 [offTheSideCell setHighlightsBy:NSNoCellMask]; |
| 492 } else { | 492 } else { |
| 493 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 493 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
| 494 [offTheSideButton_ setImage: | 494 [offTheSideButton_ setImage: |
| 495 rb.GetNativeImageNamed(IDR_BOOKMARK_BAR_CHEVRONS).ToNSImage()]; | 495 rb.GetNativeImageNamed(IDR_BOOKMARK_BAR_CHEVRONS).ToNSImage()]; |
| 496 [offTheSideButton_.draggableButton setDraggable:NO]; | |
| 497 [offTheSideButton_.draggableButton setActsOnMouseDown:YES]; | |
| 498 } | 496 } |
| 497 [offTheSideButton_.draggableButton setDraggable:NO]; |
| 498 [offTheSideButton_.draggableButton setActsOnMouseDown:YES]; |
| 499 | 499 |
| 500 // We are enabled by default. | 500 // We are enabled by default. |
| 501 barIsEnabled_ = YES; | 501 barIsEnabled_ = YES; |
| 502 | 502 |
| 503 // Remember the original sizes of the 'no items' and 'import bookmarks' | 503 // Remember the original sizes of the 'no items' and 'import bookmarks' |
| 504 // fields to aid in resizing when the window frame changes. | 504 // fields to aid in resizing when the window frame changes. |
| 505 originalNoItemsRect_ = [[buttonView_ noItemTextfield] frame]; | 505 originalNoItemsRect_ = [[buttonView_ noItemTextfield] frame]; |
| 506 originalImportBookmarksRect_ = [[buttonView_ importBookmarksButton] frame]; | 506 originalImportBookmarksRect_ = [[buttonView_ importBookmarksButton] frame]; |
| 507 if (isModeMaterial) { | 507 if (isModeMaterial) { |
| 508 // Bookmark buttons start farther from the bookmark bar's left edge so | 508 // Bookmark buttons start farther from the bookmark bar's left edge so |
| (...skipping 2581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3090 - (id<BookmarkButtonControllerProtocol>)controllerForNode: | 3090 - (id<BookmarkButtonControllerProtocol>)controllerForNode: |
| 3091 (const BookmarkNode*)node { | 3091 (const BookmarkNode*)node { |
| 3092 // See if it's in the bar, then if it is in the hierarchy of visible | 3092 // See if it's in the bar, then if it is in the hierarchy of visible |
| 3093 // folder menus. | 3093 // folder menus. |
| 3094 if (bookmarkModel_->bookmark_bar_node() == node) | 3094 if (bookmarkModel_->bookmark_bar_node() == node) |
| 3095 return self; | 3095 return self; |
| 3096 return [folderController_ controllerForNode:node]; | 3096 return [folderController_ controllerForNode:node]; |
| 3097 } | 3097 } |
| 3098 | 3098 |
| 3099 @end | 3099 @end |
| OLD | NEW |