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

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

Issue 6881073: Cleanup popup related browser navigation code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Popup tests for ChromeOS. Created 9 years, 8 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/sys_string_conversions.h" 10 #include "base/sys_string_conversions.h"
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 gfx::Rect BrowserWindowCocoa::GetInstantBounds() { 560 gfx::Rect BrowserWindowCocoa::GetInstantBounds() {
561 // Flip coordinates based on the primary screen. 561 // Flip coordinates based on the primary screen.
562 NSScreen* screen = [[NSScreen screens] objectAtIndex:0]; 562 NSScreen* screen = [[NSScreen screens] objectAtIndex:0];
563 NSRect monitorFrame = [screen frame]; 563 NSRect monitorFrame = [screen frame];
564 NSRect frame = [controller_ instantFrame]; 564 NSRect frame = [controller_ instantFrame];
565 gfx::Rect bounds(NSRectToCGRect(frame)); 565 gfx::Rect bounds(NSRectToCGRect(frame));
566 bounds.set_y(NSHeight(monitorFrame) - bounds.y() - bounds.height()); 566 bounds.set_y(NSHeight(monitorFrame) - bounds.y() - bounds.height());
567 return bounds; 567 return bounds;
568 } 568 }
569 569
570 void BrowserWindowCocoa::AdjustNavigateParams(browser::NavigateParams* params) {
571 }
572
570 void BrowserWindowCocoa::Observe(NotificationType type, 573 void BrowserWindowCocoa::Observe(NotificationType type,
571 const NotificationSource& source, 574 const NotificationSource& source,
572 const NotificationDetails& details) { 575 const NotificationDetails& details) {
573 switch (type.value) { 576 switch (type.value) {
574 // Only the key window gets a direct toggle from the menu. 577 // Only the key window gets a direct toggle from the menu.
575 // Other windows hear about it from the notification. 578 // Other windows hear about it from the notification.
576 case NotificationType::BOOKMARK_BAR_VISIBILITY_PREF_CHANGED: 579 case NotificationType::BOOKMARK_BAR_VISIBILITY_PREF_CHANGED:
577 [controller_ updateBookmarkBarVisibilityWithAnimation:YES]; 580 [controller_ updateBookmarkBarVisibilityWithAnimation:YES];
578 break; 581 break;
579 case NotificationType::SIDEBAR_CHANGED: 582 case NotificationType::SIDEBAR_CHANGED:
(...skipping 15 matching lines...) Expand all
595 598
596 NSWindow* BrowserWindowCocoa::window() const { 599 NSWindow* BrowserWindowCocoa::window() const {
597 return [controller_ window]; 600 return [controller_ window];
598 } 601 }
599 602
600 void BrowserWindowCocoa::UpdateSidebarForContents(TabContents* tab_contents) { 603 void BrowserWindowCocoa::UpdateSidebarForContents(TabContents* tab_contents) {
601 if (tab_contents == browser_->GetSelectedTabContents()) { 604 if (tab_contents == browser_->GetSelectedTabContents()) {
602 [controller_ updateSidebarForContents:tab_contents]; 605 [controller_ updateSidebarForContents:tab_contents];
603 } 606 }
604 } 607 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698