| OLD | NEW |
| 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 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 void BrowserWindowCocoa::ConfirmBrowserCloseWithPendingDownloads() { | 360 void BrowserWindowCocoa::ConfirmBrowserCloseWithPendingDownloads() { |
| 361 // Call InProgressDownloadResponse asynchronously to avoid a crash when the | 361 // Call InProgressDownloadResponse asynchronously to avoid a crash when the |
| 362 // browser window is closed here (http://crbug.com/44454). | 362 // browser window is closed here (http://crbug.com/44454). |
| 363 MessageLoop::current()->PostTask( | 363 MessageLoop::current()->PostTask( |
| 364 FROM_HERE, | 364 FROM_HERE, |
| 365 confirm_close_factory_.NewRunnableMethod( | 365 confirm_close_factory_.NewRunnableMethod( |
| 366 &Browser::InProgressDownloadResponse, | 366 &Browser::InProgressDownloadResponse, |
| 367 true)); | 367 true)); |
| 368 } | 368 } |
| 369 | 369 |
| 370 void BrowserWindowCocoa::ShowHTMLDialog(HtmlDialogUIDelegate* delegate, | 370 gfx::NativeWindow BrowserWindowCocoa::ShowHTMLDialog( |
| 371 gfx::NativeWindow parent_window) { | 371 HtmlDialogUIDelegate* delegate, |
| 372 gfx::NativeWindow parent_window) { |
| 372 [HtmlDialogWindowController showHtmlDialog:delegate | 373 [HtmlDialogWindowController showHtmlDialog:delegate |
| 373 profile:browser_->profile()]; | 374 profile:browser_->profile()]; |
| 375 return NULL; |
| 374 } | 376 } |
| 375 | 377 |
| 376 void BrowserWindowCocoa::UserChangedTheme() { | 378 void BrowserWindowCocoa::UserChangedTheme() { |
| 377 [controller_ userChangedTheme]; | 379 [controller_ userChangedTheme]; |
| 378 } | 380 } |
| 379 | 381 |
| 380 int BrowserWindowCocoa::GetExtraRenderViewHeight() const { | 382 int BrowserWindowCocoa::GetExtraRenderViewHeight() const { |
| 381 // Currently this is only used on linux. | 383 // Currently this is only used on linux. |
| 382 return 0; | 384 return 0; |
| 383 } | 385 } |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 631 | 633 |
| 632 NSWindow* BrowserWindowCocoa::window() const { | 634 NSWindow* BrowserWindowCocoa::window() const { |
| 633 return [controller_ window]; | 635 return [controller_ window]; |
| 634 } | 636 } |
| 635 | 637 |
| 636 void BrowserWindowCocoa::UpdateSidebarForContents(TabContents* tab_contents) { | 638 void BrowserWindowCocoa::UpdateSidebarForContents(TabContents* tab_contents) { |
| 637 if (tab_contents == browser_->GetSelectedTabContents()) { | 639 if (tab_contents == browser_->GetSelectedTabContents()) { |
| 638 [controller_ updateSidebarForContents:tab_contents]; | 640 [controller_ updateSidebarForContents:tab_contents]; |
| 639 } | 641 } |
| 640 } | 642 } |
| OLD | NEW |