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

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

Issue 3624001: Implement Instant on Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 2 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) 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/browser_window_controller_private.h" 5 #import "chrome/browser/cocoa/browser_window_controller_private.h"
6 6
7 #include "base/mac_util.h" 7 #include "base/mac_util.h"
8 #import "base/scoped_nsobject.h" 8 #import "base/scoped_nsobject.h"
9 #include "chrome/browser/browser.h" 9 #include "chrome/browser/browser.h"
10 #include "chrome/browser/browser_list.h" 10 #include "chrome/browser/browser_list.h"
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 443
444 - (BOOL)shouldShowBookmarkBar { 444 - (BOOL)shouldShowBookmarkBar {
445 DCHECK(browser_.get()); 445 DCHECK(browser_.get());
446 return browser_->profile()->GetPrefs()->GetBoolean(prefs::kShowBookmarkBar) ? 446 return browser_->profile()->GetPrefs()->GetBoolean(prefs::kShowBookmarkBar) ?
447 YES : NO; 447 YES : NO;
448 } 448 }
449 449
450 - (BOOL)shouldShowDetachedBookmarkBar { 450 - (BOOL)shouldShowDetachedBookmarkBar {
451 DCHECK(browser_.get()); 451 DCHECK(browser_.get());
452 TabContents* contents = browser_->GetSelectedTabContents(); 452 TabContents* contents = browser_->GetSelectedTabContents();
453 return (contents && contents->ShouldShowBookmarkBar()) ? YES : NO; 453 return (contents &&
454 contents->ShouldShowBookmarkBar() &&
455 ![previewableContentsController_ isShowingPreview]);
454 } 456 }
455 457
456 - (void)adjustToolbarAndBookmarkBarForCompression:(CGFloat)compression { 458 - (void)adjustToolbarAndBookmarkBarForCompression:(CGFloat)compression {
457 CGFloat newHeight = 459 CGFloat newHeight =
458 [toolbarController_ desiredHeightForCompression:compression]; 460 [toolbarController_ desiredHeightForCompression:compression];
459 NSRect toolbarFrame = [[toolbarController_ view] frame]; 461 NSRect toolbarFrame = [[toolbarController_ view] frame];
460 CGFloat deltaH = newHeight - toolbarFrame.size.height; 462 CGFloat deltaH = newHeight - toolbarFrame.size.height;
461 463
462 if (deltaH == 0) 464 if (deltaH == 0)
463 return; 465 return;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 - (void)disableBarVisibilityUpdates { 500 - (void)disableBarVisibilityUpdates {
499 // Early escape if there's nothing to do. 501 // Early escape if there's nothing to do.
500 if (!barVisibilityUpdatesEnabled_) 502 if (!barVisibilityUpdatesEnabled_)
501 return; 503 return;
502 504
503 barVisibilityUpdatesEnabled_ = NO; 505 barVisibilityUpdatesEnabled_ = NO;
504 [fullscreenController_ cancelAnimationAndTimers]; 506 [fullscreenController_ cancelAnimationAndTimers];
505 } 507 }
506 508
507 @end // @implementation BrowserWindowController(Private) 509 @end // @implementation BrowserWindowController(Private)
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/browser_window_controller.mm ('k') | chrome/browser/cocoa/location_bar/location_bar_view_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698