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

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

Issue 5701008: Fixes bug in instant that resulted in flickery fade. The problem would (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome
Patch Set: Adds content to 403.html as bots seem to have problem with empty file Created 10 years 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 #include "chrome/browser/ui/cocoa/browser_window_cocoa.h" 5 #include "chrome/browser/ui/cocoa/browser_window_cocoa.h"
6 6
7 #include "app/l10n_util_mac.h" 7 #include "app/l10n_util_mac.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/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 } 580 }
581 581
582 void BrowserWindowCocoa::PrepareForInstant() { 582 void BrowserWindowCocoa::PrepareForInstant() {
583 // TODO: implement fade as done on windows. 583 // TODO: implement fade as done on windows.
584 } 584 }
585 585
586 void BrowserWindowCocoa::ShowInstant(TabContents* preview_contents) { 586 void BrowserWindowCocoa::ShowInstant(TabContents* preview_contents) {
587 [controller_ showInstant:preview_contents]; 587 [controller_ showInstant:preview_contents];
588 } 588 }
589 589
590 void BrowserWindowCocoa::HideInstant() { 590 void BrowserWindowCocoa::HideInstant(bool instant_is_active) {
591 [controller_ hideInstant]; 591 [controller_ hideInstant];
592
593 // TODO: add support for |instant_is_active|.
592 } 594 }
593 595
594 gfx::Rect BrowserWindowCocoa::GetInstantBounds() { 596 gfx::Rect BrowserWindowCocoa::GetInstantBounds() {
595 // Flip coordinates based on the primary screen. 597 // Flip coordinates based on the primary screen.
596 NSScreen* screen = [[NSScreen screens] objectAtIndex:0]; 598 NSScreen* screen = [[NSScreen screens] objectAtIndex:0];
597 NSRect monitorFrame = [screen frame]; 599 NSRect monitorFrame = [screen frame];
598 NSRect frame = [controller_ instantFrame]; 600 NSRect frame = [controller_ instantFrame];
599 gfx::Rect bounds(NSRectToCGRect(frame)); 601 gfx::Rect bounds(NSRectToCGRect(frame));
600 bounds.set_y(NSHeight(monitorFrame) - bounds.y() - bounds.height()); 602 bounds.set_y(NSHeight(monitorFrame) - bounds.y() - bounds.height());
601 return bounds; 603 return bounds;
(...skipping 27 matching lines...) Expand all
629 631
630 NSWindow* BrowserWindowCocoa::window() const { 632 NSWindow* BrowserWindowCocoa::window() const {
631 return [controller_ window]; 633 return [controller_ window];
632 } 634 }
633 635
634 void BrowserWindowCocoa::UpdateSidebarForContents(TabContents* tab_contents) { 636 void BrowserWindowCocoa::UpdateSidebarForContents(TabContents* tab_contents) {
635 if (tab_contents == browser_->GetSelectedTabContents()) { 637 if (tab_contents == browser_->GetSelectedTabContents()) {
636 [controller_ updateSidebarForContents:tab_contents]; 638 [controller_ updateSidebarForContents:tab_contents];
637 } 639 }
638 } 640 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_cocoa.h ('k') | chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698