OLD | NEW |
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 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
513 web_contents, start_sync_callback, email); | 513 web_contents, start_sync_callback, email); |
514 } | 514 } |
515 } | 515 } |
516 #endif | 516 #endif |
517 | 517 |
518 bool BrowserWindowCocoa::IsDownloadShelfVisible() const { | 518 bool BrowserWindowCocoa::IsDownloadShelfVisible() const { |
519 return [controller_ isDownloadShelfVisible] != NO; | 519 return [controller_ isDownloadShelfVisible] != NO; |
520 } | 520 } |
521 | 521 |
522 DownloadShelf* BrowserWindowCocoa::GetDownloadShelf() { | 522 DownloadShelf* BrowserWindowCocoa::GetDownloadShelf() { |
| 523 [controller_ createAndAddDownloadShelf]; |
523 DownloadShelfController* shelfController = [controller_ downloadShelf]; | 524 DownloadShelfController* shelfController = [controller_ downloadShelf]; |
524 return [shelfController bridge]; | 525 return [shelfController bridge]; |
525 } | 526 } |
526 | 527 |
527 // We allow closing the window here since the real quit decision on Mac is made | 528 // We allow closing the window here since the real quit decision on Mac is made |
528 // in [AppController quit:]. | 529 // in [AppController quit:]. |
529 void BrowserWindowCocoa::ConfirmBrowserCloseWithPendingDownloads( | 530 void BrowserWindowCocoa::ConfirmBrowserCloseWithPendingDownloads( |
530 int download_count, | 531 int download_count, |
531 Browser::DownloadClosePreventionType dialog_type, | 532 Browser::DownloadClosePreventionType dialog_type, |
532 bool app_modal, | 533 bool app_modal, |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
693 if (browser_->bookmark_bar_state() != BookmarkBar::DETACHED) | 694 if (browser_->bookmark_bar_state() != BookmarkBar::DETACHED) |
694 return 0; | 695 return 0; |
695 return 40; | 696 return 40; |
696 } | 697 } |
697 | 698 |
698 void BrowserWindowCocoa::ExecuteExtensionCommand( | 699 void BrowserWindowCocoa::ExecuteExtensionCommand( |
699 const extensions::Extension* extension, | 700 const extensions::Extension* extension, |
700 const extensions::Command& command) { | 701 const extensions::Command& command) { |
701 [cocoa_controller() executeExtensionCommand:extension->id() command:command]; | 702 [cocoa_controller() executeExtensionCommand:extension->id() command:command]; |
702 } | 703 } |
OLD | NEW |