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

Side by Side Diff: chrome/browser/cocoa/bookmark_bar_controller.mm

Issue 342103: Make bookmark folder look Mac-y (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 #include "app/l10n_util_mac.h" 5 #include "app/l10n_util_mac.h"
6 #include "app/resource_bundle.h" 6 #include "app/resource_bundle.h"
7 #include "base/mac_util.h" 7 #include "base/mac_util.h"
8 #include "base/sys_string_conversions.h" 8 #include "base/sys_string_conversions.h"
9 #include "chrome/browser/bookmarks/bookmark_editor.h" 9 #include "chrome/browser/bookmarks/bookmark_editor.h"
10 #include "chrome/browser/bookmarks/bookmark_model.h" 10 #include "chrome/browser/bookmarks/bookmark_model.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 initialWidth_ = initialWidth; 73 initialWidth_ = initialWidth;
74 bookmarkModel_ = browser_->profile()->GetBookmarkModel(); 74 bookmarkModel_ = browser_->profile()->GetBookmarkModel();
75 buttons_.reset([[NSMutableArray alloc] init]); 75 buttons_.reset([[NSMutableArray alloc] init]);
76 compressDelegate_ = compressDelegate; 76 compressDelegate_ = compressDelegate;
77 resizeDelegate_ = resizeDelegate; 77 resizeDelegate_ = resizeDelegate;
78 urlDelegate_ = urlDelegate; 78 urlDelegate_ = urlDelegate;
79 tabObserver_.reset( 79 tabObserver_.reset(
80 new TabStripModelObserverBridge(browser_->tabstrip_model(), self)); 80 new TabStripModelObserverBridge(browser_->tabstrip_model(), self));
81 81
82 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 82 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
83 folderImage_.reset([rb.GetNSImageNamed(IDR_BOOKMARK_BAR_FOLDER) retain]); 83 NSImage* folder =
84 [[NSWorkspace sharedWorkspace] iconForFileType:
85 NSFileTypeForHFSTypeCode(kGenericFolderIcon)];
86 [folder setSize:NSMakeSize(16, 16)];
87 folderImage_.reset([folder retain]);
84 defaultImage_.reset([rb.GetNSImageNamed(IDR_DEFAULT_FAVICON) retain]); 88 defaultImage_.reset([rb.GetNSImageNamed(IDR_DEFAULT_FAVICON) retain]);
85 } 89 }
86 return self; 90 return self;
87 } 91 }
88 92
89 - (void)dealloc { 93 - (void)dealloc {
90 // Remove our view from its superview so it doesn't attempt to reference 94 // Remove our view from its superview so it doesn't attempt to reference
91 // it when the controller is gone. 95 // it when the controller is gone.
92 //TODO(dmaclach): Remove -- http://crbug.com/25845 96 //TODO(dmaclach): Remove -- http://crbug.com/25845
93 [[self view] removeFromSuperview]; 97 [[self view] removeFromSuperview];
(...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after
896 return folderImage_; 900 return folderImage_;
897 901
898 const SkBitmap& favIcon = bookmarkModel_->GetFavIcon(node); 902 const SkBitmap& favIcon = bookmarkModel_->GetFavIcon(node);
899 if (!favIcon.isNull()) 903 if (!favIcon.isNull())
900 return gfx::SkBitmapToNSImage(favIcon); 904 return gfx::SkBitmapToNSImage(favIcon);
901 905
902 return defaultImage_; 906 return defaultImage_;
903 } 907 }
904 908
905 @end 909 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698