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

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

Issue 6247017: Revert 72153 - Remove user-related data from local_state and add to user_pre... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 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 <Carbon/Carbon.h> 7 #include <Carbon/Carbon.h>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "app/l10n_util_mac.h" 10 #include "app/l10n_util_mac.h"
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 472
473 - (void)removeConstrainedWindow:(ConstrainedWindowMac*)window { 473 - (void)removeConstrainedWindow:(ConstrainedWindowMac*)window {
474 [tabStripController_ removeConstrainedWindow:window]; 474 [tabStripController_ removeConstrainedWindow:window];
475 } 475 }
476 476
477 - (BOOL)canAttachConstrainedWindow { 477 - (BOOL)canAttachConstrainedWindow {
478 return ![previewableContentsController_ isShowingPreview]; 478 return ![previewableContentsController_ isShowingPreview];
479 } 479 }
480 480
481 - (void)updateDevToolsForContents:(TabContents*)contents { 481 - (void)updateDevToolsForContents:(TabContents*)contents {
482 [devToolsController_ updateDevToolsForTabContents:contents 482 [devToolsController_ updateDevToolsForTabContents:contents];
483 withProfile:browser_->profile()];
484 [devToolsController_ ensureContentsVisible]; 483 [devToolsController_ ensureContentsVisible];
485 } 484 }
486 485
487 - (void)updateSidebarForContents:(TabContents*)contents { 486 - (void)updateSidebarForContents:(TabContents*)contents {
488 [sidebarController_ updateSidebarForTabContents:contents]; 487 [sidebarController_ updateSidebarForTabContents:contents];
489 [sidebarController_ ensureContentsVisible]; 488 [sidebarController_ ensureContentsVisible];
490 } 489 }
491 490
492 // Called when the user wants to close a window or from the shutdown process. 491 // Called when the user wants to close a window or from the shutdown process.
493 // The Browser object is in control of whether or not we're allowed to close. It 492 // The Browser object is in control of whether or not we're allowed to close. It
(...skipping 928 matching lines...) Expand 10 before | Expand all | Expand 10 after
1422 1421
1423 // TabStripControllerDelegate protocol. 1422 // TabStripControllerDelegate protocol.
1424 - (void)onSelectTabWithContents:(TabContents*)contents { 1423 - (void)onSelectTabWithContents:(TabContents*)contents {
1425 // Update various elements that are interested in knowing the current 1424 // Update various elements that are interested in knowing the current
1426 // TabContents. 1425 // TabContents.
1427 1426
1428 // Update all the UI bits. 1427 // Update all the UI bits.
1429 windowShim_->UpdateTitleBar(); 1428 windowShim_->UpdateTitleBar();
1430 1429
1431 [sidebarController_ updateSidebarForTabContents:contents]; 1430 [sidebarController_ updateSidebarForTabContents:contents];
1432 [devToolsController_ updateDevToolsForTabContents:contents 1431 [devToolsController_ updateDevToolsForTabContents:contents];
1433 withProfile:browser_->profile()];
1434 1432
1435 // Update the bookmark bar. 1433 // Update the bookmark bar.
1436 // Must do it after sidebar and devtools update, otherwise bookmark bar might 1434 // Must do it after sidebar and devtools update, otherwise bookmark bar might
1437 // call resizeView -> layoutSubviews and cause unnecessary relayout. 1435 // call resizeView -> layoutSubviews and cause unnecessary relayout.
1438 // TODO(viettrungluu): perhaps update to not terminate running animations (if 1436 // TODO(viettrungluu): perhaps update to not terminate running animations (if
1439 // applicable)? 1437 // applicable)?
1440 [self updateBookmarkBarVisibilityWithAnimation:NO]; 1438 [self updateBookmarkBarVisibilityWithAnimation:NO];
1441 1439
1442 [infoBarContainerController_ changeTabContents:contents]; 1440 [infoBarContainerController_ changeTabContents:contents];
1443 1441
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after
2083 2081
2084 - (BOOL)supportsBookmarkBar { 2082 - (BOOL)supportsBookmarkBar {
2085 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; 2083 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR];
2086 } 2084 }
2087 2085
2088 - (BOOL)isNormalWindow { 2086 - (BOOL)isNormalWindow {
2089 return browser_->type() == Browser::TYPE_NORMAL; 2087 return browser_->type() == Browser::TYPE_NORMAL;
2090 } 2088 }
2091 2089
2092 @end // @implementation BrowserWindowController(WindowType) 2090 @end // @implementation BrowserWindowController(WindowType)
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/cocoa/browser_window_controller_private.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698