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

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

Issue 192017: Convert std::wstring encoding names to std::string in a bunch of files. (Closed)
Patch Set: mac and linux fixes Created 11 years, 3 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) 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 <Carbon/Carbon.h> 5 #include <Carbon/Carbon.h>
6 6
7 #include "base/mac_util.h" 7 #include "base/mac_util.h"
8 #include "base/scoped_nsdisable_screen_updates.h" 8 #include "base/scoped_nsdisable_screen_updates.h"
9 #import "base/scoped_nsobject.h" 9 #import "base/scoped_nsobject.h"
10 #include "base/sys_string_conversions.h" 10 #include "base/sys_string_conversions.h"
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 // browser/views/toolbar_view.h. 512 // browser/views/toolbar_view.h.
513 EncodingMenuController encoding_controller; 513 EncodingMenuController encoding_controller;
514 if (encoding_controller.DoesCommandBelongToEncodingMenu(tag)) { 514 if (encoding_controller.DoesCommandBelongToEncodingMenu(tag)) {
515 DCHECK(browser_.get()); 515 DCHECK(browser_.get());
516 Profile *profile = browser_->profile(); 516 Profile *profile = browser_->profile();
517 DCHECK(profile); 517 DCHECK(profile);
518 TabContents* current_tab = browser_->GetSelectedTabContents(); 518 TabContents* current_tab = browser_->GetSelectedTabContents();
519 if (!current_tab) { 519 if (!current_tab) {
520 return; 520 return;
521 } 521 }
522 const std::wstring encoding = current_tab->encoding(); 522 const std::string encoding = current_tab->encoding();
523 523
524 bool toggled = encoding_controller.IsItemChecked(profile, encoding, tag); 524 bool toggled = encoding_controller.IsItemChecked(profile, encoding, tag);
525 NSInteger oldState = [item state]; 525 NSInteger oldState = [item state];
526 NSInteger newState = toggled ? NSOnState : NSOffState; 526 NSInteger newState = toggled ? NSOnState : NSOffState;
527 if (oldState != newState) 527 if (oldState != newState)
528 [item setState:newState]; 528 [item setState:newState];
529 } 529 }
530 } 530 }
531 531
532 - (BOOL)supportsFullscreen { 532 - (BOOL)supportsFullscreen {
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after
1375 provider->GetNSColor(BrowserThemeProvider::COLOR_TOOLBAR); 1375 provider->GetNSColor(BrowserThemeProvider::COLOR_TOOLBAR);
1376 [theme setValue:toolbarBackgroundColor 1376 [theme setValue:toolbarBackgroundColor
1377 forAttribute:@"backgroundColor" 1377 forAttribute:@"backgroundColor"
1378 style:GTMThemeStyleToolBar 1378 style:GTMThemeStyleToolBar
1379 state:GTMThemeStateActiveWindow]; 1379 state:GTMThemeStateActiveWindow];
1380 1380
1381 return theme; 1381 return theme;
1382 } 1382 }
1383 @end 1383 @end
1384 1384
OLDNEW
« no previous file with comments | « chrome/browser/character_encoding.cc ('k') | chrome/browser/cocoa/encoding_menu_controller_delegate_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698