| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/views/download_shelf_view.h" | 5 #include "chrome/browser/views/download_shelf_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "chrome/browser/browser.h" | 10 #include "chrome/browser/browser.h" |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 } | 258 } |
| 259 } | 259 } |
| 260 } | 260 } |
| 261 | 261 |
| 262 // Open the download page. | 262 // Open the download page. |
| 263 void DownloadShelfView::LinkActivated(views::Link* source, int event_flags) { | 263 void DownloadShelfView::LinkActivated(views::Link* source, int event_flags) { |
| 264 int index; | 264 int index; |
| 265 NavigationController* controller = tab_contents_->controller(); | 265 NavigationController* controller = tab_contents_->controller(); |
| 266 Browser* browser = Browser::GetBrowserForController(controller, &index); | 266 Browser* browser = Browser::GetBrowserForController(controller, &index); |
| 267 DCHECK(browser); | 267 DCHECK(browser); |
| 268 browser->ShowNativeUITab(DownloadTabUI::GetURL()); | 268 browser->ShowDownloadsTab(); |
| 269 } | 269 } |
| 270 | 270 |
| 271 void DownloadShelfView::ButtonPressed(views::BaseButton* button) { | 271 void DownloadShelfView::ButtonPressed(views::BaseButton* button) { |
| 272 shelf_animation_->Hide(); | 272 shelf_animation_->Hide(); |
| 273 } | 273 } |
| 274 | 274 |
| 275 bool DownloadShelfView::IsShowing() const { | 275 bool DownloadShelfView::IsShowing() const { |
| 276 return shelf_animation_->IsShowing(); | 276 return shelf_animation_->IsShowing(); |
| 277 } | 277 } |
| OLD | NEW |