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

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

Issue 10915217: Hook up SetInstantPreviewHeight for ChromeOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move hidden notification, too. Created 8 years, 3 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 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 } 551 }
552 552
553 void BrowserWindowCocoa::ExitPresentationMode() { 553 void BrowserWindowCocoa::ExitPresentationMode() {
554 [controller_ exitPresentationMode]; 554 [controller_ exitPresentationMode];
555 } 555 }
556 556
557 bool BrowserWindowCocoa::InPresentationMode() { 557 bool BrowserWindowCocoa::InPresentationMode() {
558 return [controller_ inPresentationMode]; 558 return [controller_ inPresentationMode];
559 } 559 }
560 560
561 void BrowserWindowCocoa::ShowInstant(TabContents* preview) { 561 void BrowserWindowCocoa::ShowInstant(TabContents* preview,
562 int height,
563 InstantSizeUnits units) {
564 // TODO(jered): Support height < 100%.
565 DCHECK(height == 100 && units == INSTANT_SIZE_PERCENT);
562 [controller_ showInstant:preview->web_contents()]; 566 [controller_ showInstant:preview->web_contents()];
563 } 567 }
564 568
565 void BrowserWindowCocoa::HideInstant() { 569 void BrowserWindowCocoa::HideInstant() {
566 [controller_ hideInstant]; 570 [controller_ hideInstant];
567 } 571 }
568 572
569 gfx::Rect BrowserWindowCocoa::GetInstantBounds() { 573 gfx::Rect BrowserWindowCocoa::GetInstantBounds() {
570 // Flip coordinates based on the primary screen. 574 // Flip coordinates based on the primary screen.
571 NSScreen* screen = [[NSScreen screens] objectAtIndex:0]; 575 NSScreen* screen = [[NSScreen screens] objectAtIndex:0];
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 AvatarMenuBubbleController* menu = 645 AvatarMenuBubbleController* menu =
642 [[AvatarMenuBubbleController alloc] initWithBrowser:browser_ 646 [[AvatarMenuBubbleController alloc] initWithBrowser:browser_
643 anchoredAt:point]; 647 anchoredAt:point];
644 [[menu bubble] setAlignment:info_bubble::kAlignEdgeToAnchorEdge]; 648 [[menu bubble] setAlignment:info_bubble::kAlignEdgeToAnchorEdge];
645 [menu showWindow:nil]; 649 [menu showWindow:nil];
646 } 650 }
647 651
648 void BrowserWindowCocoa::ShowAvatarBubbleFromAvatarButton() { 652 void BrowserWindowCocoa::ShowAvatarBubbleFromAvatarButton() {
649 [[controller_ avatarButtonController] showAvatarBubble]; 653 [[controller_ avatarButtonController] showAvatarBubble];
650 } 654 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_cocoa.h ('k') | chrome/browser/ui/gtk/browser_window_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698