| OLD | NEW |
| 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/cocoa/browser_window_cocoa.h" | 5 #include "chrome/browser/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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 } | 209 } |
| 210 | 210 |
| 211 bool BrowserWindowCocoa::IsFullscreen() const { | 211 bool BrowserWindowCocoa::IsFullscreen() const { |
| 212 return !![controller_ isFullscreen]; | 212 return !![controller_ isFullscreen]; |
| 213 } | 213 } |
| 214 | 214 |
| 215 bool BrowserWindowCocoa::IsFullscreenBubbleVisible() const { | 215 bool BrowserWindowCocoa::IsFullscreenBubbleVisible() const { |
| 216 return false; | 216 return false; |
| 217 } | 217 } |
| 218 | 218 |
| 219 gfx::Rect BrowserWindowCocoa::GetRootWindowResizerRect() const { | |
| 220 NSRect tabRect = [controller_ selectedTabGrowBoxRect]; | |
| 221 return gfx::Rect(NSRectToCGRect(tabRect)); | |
| 222 } | |
| 223 | |
| 224 void BrowserWindowCocoa::ConfirmAddSearchProvider( | 219 void BrowserWindowCocoa::ConfirmAddSearchProvider( |
| 225 const TemplateURL* template_url, | 220 const TemplateURL* template_url, |
| 226 Profile* profile) { | 221 Profile* profile) { |
| 227 // The controller will release itself when the window closes. | 222 // The controller will release itself when the window closes. |
| 228 EditSearchEngineCocoaController* editor = | 223 EditSearchEngineCocoaController* editor = |
| 229 [[EditSearchEngineCocoaController alloc] initWithProfile:profile | 224 [[EditSearchEngineCocoaController alloc] initWithProfile:profile |
| 230 delegate:NULL | 225 delegate:NULL |
| 231 templateURL:template_url]; | 226 templateURL:template_url]; |
| 232 [NSApp beginSheet:[editor window] | 227 [NSApp beginSheet:[editor window] |
| 233 modalForWindow:window() | 228 modalForWindow:window() |
| (...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 623 | 618 |
| 624 NSWindow* BrowserWindowCocoa::window() const { | 619 NSWindow* BrowserWindowCocoa::window() const { |
| 625 return [controller_ window]; | 620 return [controller_ window]; |
| 626 } | 621 } |
| 627 | 622 |
| 628 void BrowserWindowCocoa::UpdateSidebarForContents(TabContents* tab_contents) { | 623 void BrowserWindowCocoa::UpdateSidebarForContents(TabContents* tab_contents) { |
| 629 if (tab_contents == browser_->tabstrip_model()->GetSelectedTabContents()) { | 624 if (tab_contents == browser_->tabstrip_model()->GetSelectedTabContents()) { |
| 630 [controller_ updateSidebarForContents:tab_contents]; | 625 [controller_ updateSidebarForContents:tab_contents]; |
| 631 } | 626 } |
| 632 } | 627 } |
| OLD | NEW |