| 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 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 483 // Complete init of the "off the side" button, as much as we can. | 483 // Complete init of the "off the side" button, as much as we can. |
| 484 if (isModeMaterial) { | 484 if (isModeMaterial) { |
| 485 [offTheSideButton_ setImage:[self offTheSideButtonImage:NO]]; | 485 [offTheSideButton_ setImage:[self offTheSideButtonImage:NO]]; |
| 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 } else { | 489 } else { |
| 490 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 490 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
| 491 [offTheSideButton_ setImage: | 491 [offTheSideButton_ setImage: |
| 492 rb.GetNativeImageNamed(IDR_BOOKMARK_BAR_CHEVRONS).ToNSImage()]; | 492 rb.GetNativeImageNamed(IDR_BOOKMARK_BAR_CHEVRONS).ToNSImage()]; |
| 493 [offTheSideButton_.draggableButton setDraggable:NO]; | |
| 494 [offTheSideButton_.draggableButton setActsOnMouseDown:YES]; | |
| 495 } | 493 } |
| 494 [offTheSideButton_.draggableButton setDraggable:NO]; |
| 495 [offTheSideButton_.draggableButton setActsOnMouseDown:YES]; |
| 496 | 496 |
| 497 // We are enabled by default. | 497 // We are enabled by default. |
| 498 barIsEnabled_ = YES; | 498 barIsEnabled_ = YES; |
| 499 | 499 |
| 500 // Remember the original sizes of the 'no items' and 'import bookmarks' | 500 // Remember the original sizes of the 'no items' and 'import bookmarks' |
| 501 // fields to aid in resizing when the window frame changes. | 501 // fields to aid in resizing when the window frame changes. |
| 502 originalNoItemsRect_ = [[buttonView_ noItemTextfield] frame]; | 502 originalNoItemsRect_ = [[buttonView_ noItemTextfield] frame]; |
| 503 originalImportBookmarksRect_ = [[buttonView_ importBookmarksButton] frame]; | 503 originalImportBookmarksRect_ = [[buttonView_ importBookmarksButton] frame]; |
| 504 if (isModeMaterial) { | 504 if (isModeMaterial) { |
| 505 // Bookmark buttons start farther from the bookmark bar's left edge so | 505 // Bookmark buttons start farther from the bookmark bar's left edge so |
| (...skipping 2576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3082 - (id<BookmarkButtonControllerProtocol>)controllerForNode: | 3082 - (id<BookmarkButtonControllerProtocol>)controllerForNode: |
| 3083 (const BookmarkNode*)node { | 3083 (const BookmarkNode*)node { |
| 3084 // See if it's in the bar, then if it is in the hierarchy of visible | 3084 // See if it's in the bar, then if it is in the hierarchy of visible |
| 3085 // folder menus. | 3085 // folder menus. |
| 3086 if (bookmarkModel_->bookmark_bar_node() == node) | 3086 if (bookmarkModel_->bookmark_bar_node() == node) |
| 3087 return self; | 3087 return self; |
| 3088 return [folderController_ controllerForNode:node]; | 3088 return [folderController_ controllerForNode:node]; |
| 3089 } | 3089 } |
| 3090 | 3090 |
| 3091 @end | 3091 @end |
| OLD | NEW |