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

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

Issue 12387089: Instant: Rename 'preview' to 'overlay' (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/ui/cocoa/browser_window_cocoa.h" 5 #include "chrome/browser/ui/cocoa/browser_window_cocoa.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/mac/mac_util.h" 10 #include "base/mac/mac_util.h"
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 } 418 }
419 419
420 void BrowserWindowCocoa::RotatePaneFocus(bool forwards) { 420 void BrowserWindowCocoa::RotatePaneFocus(bool forwards) {
421 // Not needed on the Mac. 421 // Not needed on the Mac.
422 } 422 }
423 423
424 void BrowserWindowCocoa::FocusBookmarksToolbar() { 424 void BrowserWindowCocoa::FocusBookmarksToolbar() {
425 // Not needed on the Mac. 425 // Not needed on the Mac.
426 } 426 }
427 427
428
429 bool BrowserWindowCocoa::IsBookmarkBarVisible() const { 428 bool BrowserWindowCocoa::IsBookmarkBarVisible() const {
430 return browser_->profile()->GetPrefs()->GetBoolean(prefs::kShowBookmarkBar); 429 return browser_->profile()->GetPrefs()->GetBoolean(prefs::kShowBookmarkBar);
431 } 430 }
432 431
433 bool BrowserWindowCocoa::IsBookmarkBarAnimating() const { 432 bool BrowserWindowCocoa::IsBookmarkBarAnimating() const {
434 return [controller_ isBookmarkBarAnimating]; 433 return [controller_ isBookmarkBarAnimating];
435 } 434 }
436 435
437 bool BrowserWindowCocoa::IsTabStripEditable() const { 436 bool BrowserWindowCocoa::IsTabStripEditable() const {
438 return ![controller_ isDragSessionActive]; 437 return ![controller_ isDragSessionActive];
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 if (!web_contents) 661 if (!web_contents)
663 return NULL; 662 return NULL;
664 extensions::TabHelper* tab_helper = 663 extensions::TabHelper* tab_helper =
665 extensions::TabHelper::FromWebContents(web_contents); 664 extensions::TabHelper::FromWebContents(web_contents);
666 return tab_helper ? tab_helper->active_tab_permission_granter() : NULL; 665 return tab_helper ? tab_helper->active_tab_permission_granter() : NULL;
667 } 666 }
668 667
669 void BrowserWindowCocoa::ModeChanged( 668 void BrowserWindowCocoa::ModeChanged(
670 const chrome::search::Mode& old_mode, 669 const chrome::search::Mode& old_mode,
671 const chrome::search::Mode& new_mode) { 670 const chrome::search::Mode& new_mode) {
672 [controller_ updateBookmarkBarStateForInstantPreview]; 671 [controller_ updateBookmarkBarStateForInstantOverlay];
673 } 672 }
674 673
675 void BrowserWindowCocoa::DestroyBrowser() { 674 void BrowserWindowCocoa::DestroyBrowser() {
676 [controller_ destroyBrowser]; 675 [controller_ destroyBrowser];
677 676
678 // at this point the controller is dead (autoreleased), so 677 // at this point the controller is dead (autoreleased), so
679 // make sure we don't try to reference it any more. 678 // make sure we don't try to reference it any more.
680 } 679 }
681 680
682 NSWindow* BrowserWindowCocoa::window() const { 681 NSWindow* BrowserWindowCocoa::window() const {
(...skipping 30 matching lines...) Expand all
713 PasswordGenerationBubbleController* controller = 712 PasswordGenerationBubbleController* controller =
714 [[PasswordGenerationBubbleController alloc] 713 [[PasswordGenerationBubbleController alloc]
715 initWithWindow:browser_->window()->GetNativeWindow() 714 initWithWindow:browser_->window()->GetNativeWindow()
716 anchoredAt:point 715 anchoredAt:point
717 renderViewHost:web_contents->GetRenderViewHost() 716 renderViewHost:web_contents->GetRenderViewHost()
718 passwordManager:PasswordManager::FromWebContents(web_contents) 717 passwordManager:PasswordManager::FromWebContents(web_contents)
719 usingGenerator:password_generator 718 usingGenerator:password_generator
720 forForm:form]; 719 forForm:form];
721 [controller showWindow:nil]; 720 [controller showWindow:nil];
722 } 721 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_instant_controller.cc ('k') | chrome/browser/ui/cocoa/browser_window_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698