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

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

Issue 9265018: Change grow box computation back to a method on BrowserWindow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 8 years, 11 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/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 368
369 bool BrowserWindowCocoa::IsTabStripEditable() const { 369 bool BrowserWindowCocoa::IsTabStripEditable() const {
370 return ![controller_ isDragSessionActive]; 370 return ![controller_ isDragSessionActive];
371 } 371 }
372 372
373 bool BrowserWindowCocoa::IsToolbarVisible() const { 373 bool BrowserWindowCocoa::IsToolbarVisible() const {
374 return browser_->SupportsWindowFeature(Browser::FEATURE_TOOLBAR) || 374 return browser_->SupportsWindowFeature(Browser::FEATURE_TOOLBAR) ||
375 browser_->SupportsWindowFeature(Browser::FEATURE_LOCATIONBAR); 375 browser_->SupportsWindowFeature(Browser::FEATURE_LOCATIONBAR);
376 } 376 }
377 377
378 gfx::Rect BrowserWindowCocoa::GetRootWindowResizerRect() const {
379 NSRect tabRect = [controller_ selectedTabGrowBoxRect];
380 return gfx::Rect(NSRectToCGRect(tabRect));
381 }
382
378 bool BrowserWindowCocoa::IsPanel() const { 383 bool BrowserWindowCocoa::IsPanel() const {
379 return false; 384 return false;
380 } 385 }
381 386
382 // This is called from Browser, which in turn is called directly from 387 // This is called from Browser, which in turn is called directly from
383 // a menu option. All we do here is set a preference. The act of 388 // a menu option. All we do here is set a preference. The act of
384 // setting the preference sends notifications to all windows who then 389 // setting the preference sends notifications to all windows who then
385 // know what to do. 390 // know what to do.
386 void BrowserWindowCocoa::ToggleBookmarkBar() { 391 void BrowserWindowCocoa::ToggleBookmarkBar() {
387 bookmark_utils::ToggleWhenVisible(browser_->profile()); 392 bookmark_utils::ToggleWhenVisible(browser_->profile());
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 AvatarMenuBubbleController* menu = 629 AvatarMenuBubbleController* menu =
625 [[AvatarMenuBubbleController alloc] initWithBrowser:browser_ 630 [[AvatarMenuBubbleController alloc] initWithBrowser:browser_
626 anchoredAt:point]; 631 anchoredAt:point];
627 [[menu bubble] setAlignment:info_bubble::kAlignEdgeToAnchorEdge]; 632 [[menu bubble] setAlignment:info_bubble::kAlignEdgeToAnchorEdge];
628 [menu showWindow:nil]; 633 [menu showWindow:nil];
629 } 634 }
630 635
631 void BrowserWindowCocoa::ShowAvatarBubbleFromAvatarButton() { 636 void BrowserWindowCocoa::ShowAvatarBubbleFromAvatarButton() {
632 [[controller_ avatarButtonController] showAvatarBubble]; 637 [[controller_ avatarButtonController] showAvatarBubble];
633 } 638 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_cocoa.h ('k') | chrome/browser/ui/cocoa/browser_window_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698