Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(205)

Side by Side Diff: chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm

Issue 1471003005: Show tooltips for nested folders in the bookmark bar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove obsolete unit test fragment Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller_unittest.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_folder_controller.h" 5 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.h"
6 6
7 #include "base/mac/bundle_locations.h" 7 #include "base/mac/bundle_locations.h"
8 #include "base/strings/sys_string_conversions.h" 8 #include "base/strings/sys_string_conversions.h"
9 #import "chrome/browser/bookmarks/bookmark_model_factory.h" 9 #import "chrome/browser/bookmarks/bookmark_model_factory.h"
10 #import "chrome/browser/bookmarks/managed_bookmark_service_factory.h" 10 #import "chrome/browser/bookmarks/managed_bookmark_service_factory.h"
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 [button setCell:cell]; 411 [button setCell:cell];
412 [button setDelegate:self]; 412 [button setDelegate:self];
413 if (node) { 413 if (node) {
414 if (node->is_folder()) { 414 if (node->is_folder()) {
415 [button setTarget:self]; 415 [button setTarget:self];
416 [button setAction:@selector(openBookmarkFolderFromButton:)]; 416 [button setAction:@selector(openBookmarkFolderFromButton:)];
417 } else { 417 } else {
418 // Make the button do something. 418 // Make the button do something.
419 [button setTarget:barController_]; 419 [button setTarget:barController_];
420 [button setAction:@selector(openBookmark:)]; 420 [button setAction:@selector(openBookmark:)];
421 // Add a tooltip.
422 [button setToolTip:[BookmarkMenuCocoaController tooltipForNode:node]];
423 [button setAcceptsTrackIn:YES]; 421 [button setAcceptsTrackIn:YES];
424 } 422 }
423 // Add a tooltip.
424 [button setToolTip:[BookmarkMenuCocoaController tooltipForNode:node]];
425 } else { 425 } else {
426 [button setEnabled:NO]; 426 [button setEnabled:NO];
427 [button setBordered:NO]; 427 [button setBordered:NO];
428 } 428 }
429 return button; 429 return button;
430 } 430 }
431 431
432 - (id)folderTarget { 432 - (id)folderTarget {
433 return folderTarget_.get(); 433 return folderTarget_.get();
434 } 434 }
(...skipping 1608 matching lines...) Expand 10 before | Expand all | Expand 10 after
2043 2043
2044 - (void)setIgnoreAnimations:(BOOL)ignore { 2044 - (void)setIgnoreAnimations:(BOOL)ignore {
2045 ignoreAnimations_ = ignore; 2045 ignoreAnimations_ = ignore;
2046 } 2046 }
2047 2047
2048 - (BookmarkButton*)buttonThatMouseIsIn { 2048 - (BookmarkButton*)buttonThatMouseIsIn {
2049 return buttonThatMouseIsIn_; 2049 return buttonThatMouseIsIn_;
2050 } 2050 }
2051 2051
2052 @end // BookmarkBarFolderController 2052 @end // BookmarkBarFolderController
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698