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

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

Issue 3113028: Remove wstrings from bookmarks, part 8. (Closed)
Patch Set: Created 10 years, 4 months 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/cocoa/bookmark_bar_folder_controller.h" 5 #import "chrome/browser/cocoa/bookmark_bar_folder_controller.h"
6 #include "base/mac_util.h" 6 #include "base/mac_util.h"
7 #include "base/nsimage_cache_mac.h" 7 #include "base/nsimage_cache_mac.h"
8 #include "base/sys_string_conversions.h" 8 #include "base/sys_string_conversions.h"
9 #include "chrome/browser/bookmarks/bookmark_model.h" 9 #include "chrome/browser/bookmarks/bookmark_model.h"
10 #include "chrome/browser/bookmarks/bookmark_utils.h" 10 #include "chrome/browser/bookmarks/bookmark_utils.h"
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 [button setDelegate:self]; 243 [button setDelegate:self];
244 if (node) { 244 if (node) {
245 if (node->is_folder()) { 245 if (node->is_folder()) {
246 [button setTarget:self]; 246 [button setTarget:self];
247 [button setAction:@selector(openBookmarkFolderFromButton:)]; 247 [button setAction:@selector(openBookmarkFolderFromButton:)];
248 } else { 248 } else {
249 // Make the button do something. 249 // Make the button do something.
250 [button setTarget:self]; 250 [button setTarget:self];
251 [button setAction:@selector(openBookmark:)]; 251 [button setAction:@selector(openBookmark:)];
252 // Add a tooltip. 252 // Add a tooltip.
253 NSString* title = base::SysWideToNSString(node->GetTitle()); 253 NSString* title = base::SysUTF16ToNSString(node->GetTitleAsString16());
254 std::string urlString = node->GetURL().possibly_invalid_spec(); 254 std::string urlString = node->GetURL().possibly_invalid_spec();
255 NSString* tooltip = [NSString stringWithFormat:@"%@\n%s", title, 255 NSString* tooltip = [NSString stringWithFormat:@"%@\n%s", title,
256 urlString.c_str()]; 256 urlString.c_str()];
257 [button setToolTip:tooltip]; 257 [button setToolTip:tooltip];
258 } 258 }
259 } else { 259 } else {
260 [button setEnabled:NO]; 260 [button setEnabled:NO];
261 [button setBordered:NO]; 261 [button setBordered:NO];
262 } 262 }
263 return button; 263 return button;
(...skipping 1144 matching lines...) Expand 10 before | Expand all | Expand 10 after
1408 1408
1409 - (void)setIgnoreAnimations:(BOOL)ignore { 1409 - (void)setIgnoreAnimations:(BOOL)ignore {
1410 ignoreAnimations_ = ignore; 1410 ignoreAnimations_ = ignore;
1411 } 1411 }
1412 1412
1413 - (BookmarkButton*)buttonThatMouseIsIn { 1413 - (BookmarkButton*)buttonThatMouseIsIn {
1414 return buttonThatMouseIsIn_; 1414 return buttonThatMouseIsIn_;
1415 } 1415 }
1416 1416
1417 @end // BookmarkBarFolderController 1417 @end // BookmarkBarFolderController
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698