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

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

Issue 5915006: Remove user-related data from local_state and add to user_preferences, i... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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/mac/scoped_nsdisable_screen_updates.h" 9 #include "app/mac/scoped_nsdisable_screen_updates.h"
10 #include "app/mac/nsimage_cache.h" 10 #include "app/mac/nsimage_cache.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()];
483 [devToolsController_ ensureContentsVisible]; 484 [devToolsController_ ensureContentsVisible];
484 } 485 }
485 486
486 - (void)updateSidebarForContents:(TabContents*)contents { 487 - (void)updateSidebarForContents:(TabContents*)contents {
487 [sidebarController_ updateSidebarForTabContents:contents]; 488 [sidebarController_ updateSidebarForTabContents:contents];
488 [sidebarController_ ensureContentsVisible]; 489 [sidebarController_ ensureContentsVisible];
489 } 490 }
490 491
491 // Called when the user wants to close a window or from the shutdown process. 492 // Called when the user wants to close a window or from the shutdown process.
492 // The Browser object is in control of whether or not we're allowed to close. It 493 // 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
1421 1422
1422 // TabStripControllerDelegate protocol. 1423 // TabStripControllerDelegate protocol.
1423 - (void)onSelectTabWithContents:(TabContents*)contents { 1424 - (void)onSelectTabWithContents:(TabContents*)contents {
1424 // Update various elements that are interested in knowing the current 1425 // Update various elements that are interested in knowing the current
1425 // TabContents. 1426 // TabContents.
1426 1427
1427 // Update all the UI bits. 1428 // Update all the UI bits.
1428 windowShim_->UpdateTitleBar(); 1429 windowShim_->UpdateTitleBar();
1429 1430
1430 [sidebarController_ updateSidebarForTabContents:contents]; 1431 [sidebarController_ updateSidebarForTabContents:contents];
1431 [devToolsController_ updateDevToolsForTabContents:contents]; 1432 [devToolsController_ updateDevToolsForTabContents:contents
1433 withProfile:browser_->profile()];
1432 1434
1433 // Update the bookmark bar. 1435 // Update the bookmark bar.
1434 // Must do it after sidebar and devtools update, otherwise bookmark bar might 1436 // Must do it after sidebar and devtools update, otherwise bookmark bar might
1435 // call resizeView -> layoutSubviews and cause unnecessary relayout. 1437 // call resizeView -> layoutSubviews and cause unnecessary relayout.
1436 // TODO(viettrungluu): perhaps update to not terminate running animations (if 1438 // TODO(viettrungluu): perhaps update to not terminate running animations (if
1437 // applicable)? 1439 // applicable)?
1438 [self updateBookmarkBarVisibilityWithAnimation:NO]; 1440 [self updateBookmarkBarVisibilityWithAnimation:NO];
1439 1441
1440 [infoBarContainerController_ changeTabContents:contents]; 1442 [infoBarContainerController_ changeTabContents:contents];
1441 1443
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after
2081 2083
2082 - (BOOL)supportsBookmarkBar { 2084 - (BOOL)supportsBookmarkBar {
2083 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; 2085 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR];
2084 } 2086 }
2085 2087
2086 - (BOOL)isNormalWindow { 2088 - (BOOL)isNormalWindow {
2087 return browser_->type() == Browser::TYPE_NORMAL; 2089 return browser_->type() == Browser::TYPE_NORMAL;
2088 } 2090 }
2089 2091
2090 @end // @implementation BrowserWindowController(WindowType) 2092 @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