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

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

Issue 8949061: Move a bunch of methods from TabContents into the WebContents interface. This change either moves... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 12 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/browser_window_controller.h" 5 #import "chrome/browser/ui/cocoa/browser_window_controller.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <numeric> 8 #include <numeric>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 943 matching lines...) Expand 10 before | Expand all | Expand 10 after
954 // browser/ui/views/toolbar_view.h. 954 // browser/ui/views/toolbar_view.h.
955 EncodingMenuController encoding_controller; 955 EncodingMenuController encoding_controller;
956 if (encoding_controller.DoesCommandBelongToEncodingMenu(tag)) { 956 if (encoding_controller.DoesCommandBelongToEncodingMenu(tag)) {
957 DCHECK(browser_.get()); 957 DCHECK(browser_.get());
958 Profile* profile = browser_->profile(); 958 Profile* profile = browser_->profile();
959 DCHECK(profile); 959 DCHECK(profile);
960 TabContents* current_tab = browser_->GetSelectedTabContents(); 960 TabContents* current_tab = browser_->GetSelectedTabContents();
961 if (!current_tab) { 961 if (!current_tab) {
962 return; 962 return;
963 } 963 }
964 const std::string encoding = current_tab->encoding(); 964 const std::string encoding = current_tab->GetEncoding();
965 965
966 bool toggled = encoding_controller.IsItemChecked(profile, encoding, tag); 966 bool toggled = encoding_controller.IsItemChecked(profile, encoding, tag);
967 NSInteger oldState = [item state]; 967 NSInteger oldState = [item state];
968 NSInteger newState = toggled ? NSOnState : NSOffState; 968 NSInteger newState = toggled ? NSOnState : NSOffState;
969 if (oldState != newState) 969 if (oldState != newState)
970 [item setState:newState]; 970 [item setState:newState];
971 } 971 }
972 } 972 }
973 973
974 - (BOOL)supportsFullscreen { 974 - (BOOL)supportsFullscreen {
(...skipping 1202 matching lines...) Expand 10 before | Expand all | Expand 10 after
2177 2177
2178 - (BOOL)supportsBookmarkBar { 2178 - (BOOL)supportsBookmarkBar {
2179 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; 2179 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR];
2180 } 2180 }
2181 2181
2182 - (BOOL)isTabbedWindow { 2182 - (BOOL)isTabbedWindow {
2183 return browser_->is_type_tabbed(); 2183 return browser_->is_type_tabbed();
2184 } 2184 }
2185 2185
2186 @end // @implementation BrowserWindowController(WindowType) 2186 @end // @implementation BrowserWindowController(WindowType)
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/applescript/window_applescript.mm ('k') | chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698