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/views/download/download_shelf_view.h" | 5 #include "chrome/browser/ui/views/download/download_shelf_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 | 377 |
378 void DownloadShelfView::OnThemeChanged() { | 378 void DownloadShelfView::OnThemeChanged() { |
379 UpdateButtonColors(); | 379 UpdateButtonColors(); |
380 } | 380 } |
381 | 381 |
382 void DownloadShelfView::LinkClicked(views::Link* source, int event_flags) { | 382 void DownloadShelfView::LinkClicked(views::Link* source, int event_flags) { |
383 chrome::ShowDownloads(browser_); | 383 chrome::ShowDownloads(browser_); |
384 } | 384 } |
385 | 385 |
386 void DownloadShelfView::ButtonPressed( | 386 void DownloadShelfView::ButtonPressed( |
387 views::Button* button, const views::Event& event) { | 387 views::Button* button, const ui::Event& event) { |
388 auto_closed_ = false; | 388 auto_closed_ = false; |
389 Close(); | 389 Close(); |
390 } | 390 } |
391 | 391 |
392 bool DownloadShelfView::IsShowing() const { | 392 bool DownloadShelfView::IsShowing() const { |
393 return shelf_animation_->IsShowing(); | 393 return shelf_animation_->IsShowing(); |
394 } | 394 } |
395 | 395 |
396 bool DownloadShelfView::IsClosing() const { | 396 bool DownloadShelfView::IsClosing() const { |
397 return shelf_animation_->IsClosing(); | 397 return shelf_animation_->IsClosing(); |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
474 const DownloadItemView* download_item_view) { | 474 const DownloadItemView* download_item_view) { |
475 gfx::Rect bounds = download_item_view->bounds(); | 475 gfx::Rect bounds = download_item_view->bounds(); |
476 | 476 |
477 #if defined(TOOLKIT_VIEWS) | 477 #if defined(TOOLKIT_VIEWS) |
478 bounds.set_height(bounds.height() - 1); | 478 bounds.set_height(bounds.height() - 1); |
479 bounds.Offset(0, 3); | 479 bounds.Offset(0, 3); |
480 #endif | 480 #endif |
481 | 481 |
482 return bounds; | 482 return bounds; |
483 } | 483 } |
OLD | NEW |