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

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

Issue 10933085: Update ConstrainedWindowViews appearance according to mock (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review updates 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 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 FindBar* BrowserWindowCocoa::CreateFindBar() { 591 FindBar* BrowserWindowCocoa::CreateFindBar() {
592 // We could push the AddFindBar() call into the FindBarBridge 592 // We could push the AddFindBar() call into the FindBarBridge
593 // constructor or the FindBarCocoaController init, but that makes 593 // constructor or the FindBarCocoaController init, but that makes
594 // unit testing difficult, since we would also require a 594 // unit testing difficult, since we would also require a
595 // BrowserWindow object. 595 // BrowserWindow object.
596 FindBarBridge* bridge = new FindBarBridge(); 596 FindBarBridge* bridge = new FindBarBridge();
597 AddFindBar(bridge->find_bar_cocoa_controller()); 597 AddFindBar(bridge->find_bar_cocoa_controller());
598 return bridge; 598 return bridge;
599 } 599 }
600 600
601 int BrowserWindowCocoa::GetConstrainedWindowTopY() {
602 return -1;
603 }
604
601 void BrowserWindowCocoa::Observe(int type, 605 void BrowserWindowCocoa::Observe(int type,
602 const content::NotificationSource& source, 606 const content::NotificationSource& source,
603 const content::NotificationDetails& details) { 607 const content::NotificationDetails& details) {
604 switch (type) { 608 switch (type) {
605 case chrome::NOTIFICATION_PREF_CHANGED: { 609 case chrome::NOTIFICATION_PREF_CHANGED: {
606 const std::string& pref_name = 610 const std::string& pref_name =
607 *content::Details<std::string>(details).ptr(); 611 *content::Details<std::string>(details).ptr();
608 DCHECK(pref_name == prefs::kShowBookmarkBar); 612 DCHECK(pref_name == prefs::kShowBookmarkBar);
609 [controller_ updateBookmarkBarVisibilityWithAnimation:YES]; 613 [controller_ updateBookmarkBarVisibilityWithAnimation:YES];
610 break; 614 break;
(...skipping 30 matching lines...) Expand all
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

Powered by Google App Engine
This is Rietveld 408576698