| 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/download/download_shelf_mac.h" | 5 #include "chrome/browser/ui/cocoa/download/download_shelf_mac.h" |
| 6 | 6 |
| 7 #include "chrome/browser/download/download_item_model.h" | 7 #include "chrome/browser/download/download_item_model.h" |
| 8 #include "chrome/browser/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
| 9 #include "chrome/browser/ui/cocoa/download/download_item_mac.h" |
| 9 #import "chrome/browser/ui/cocoa/download/download_shelf_controller.h" | 10 #import "chrome/browser/ui/cocoa/download/download_shelf_controller.h" |
| 10 #include "chrome/browser/ui/cocoa/download/download_item_mac.h" | |
| 11 | 11 |
| 12 DownloadShelfMac::DownloadShelfMac(Browser* browser, | 12 DownloadShelfMac::DownloadShelfMac(Browser* browser, |
| 13 DownloadShelfController* controller) | 13 DownloadShelfController* controller) |
| 14 : browser_(browser), | 14 : browser_(browser), |
| 15 shelf_controller_(controller) { | 15 shelf_controller_(controller) { |
| 16 } | 16 } |
| 17 | 17 |
| 18 void DownloadShelfMac::DoAddDownload(content::DownloadItem* download) { | 18 void DownloadShelfMac::DoAddDownload(content::DownloadItem* download) { |
| 19 [shelf_controller_ addDownloadItem:download]; | 19 [shelf_controller_ addDownloadItem:download]; |
| 20 } | 20 } |
| (...skipping 15 matching lines...) Expand all Loading... |
| 36 | 36 |
| 37 void DownloadShelfMac::DoClose(CloseReason reason) { | 37 void DownloadShelfMac::DoClose(CloseReason reason) { |
| 38 [shelf_controller_ showDownloadShelf:NO | 38 [shelf_controller_ showDownloadShelf:NO |
| 39 isUserAction:reason == USER_ACTION]; | 39 isUserAction:reason == USER_ACTION]; |
| 40 browser_->UpdateDownloadShelfVisibility(false); | 40 browser_->UpdateDownloadShelfVisibility(false); |
| 41 } | 41 } |
| 42 | 42 |
| 43 Browser* DownloadShelfMac::browser() const { | 43 Browser* DownloadShelfMac::browser() const { |
| 44 return browser_; | 44 return browser_; |
| 45 } | 45 } |
| OLD | NEW |