| 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/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 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 } | 83 } |
| 84 | 84 |
| 85 } // namespace | 85 } // namespace |
| 86 | 86 |
| 87 DownloadShelfView::DownloadShelfView(Browser* browser, BrowserView* parent) | 87 DownloadShelfView::DownloadShelfView(Browser* browser, BrowserView* parent) |
| 88 : browser_(browser), | 88 : browser_(browser), |
| 89 parent_(parent), | 89 parent_(parent), |
| 90 ALLOW_THIS_IN_INITIALIZER_LIST( | 90 ALLOW_THIS_IN_INITIALIZER_LIST( |
| 91 mouse_watcher_(this, this, gfx::Insets())) { | 91 mouse_watcher_(this, this, gfx::Insets())) { |
| 92 mouse_watcher_.set_notify_on_exit_time_ms(kNotifyOnExitTimeMS); | 92 mouse_watcher_.set_notify_on_exit_time_ms(kNotifyOnExitTimeMS); |
| 93 SetID(VIEW_ID_DOWNLOAD_SHELF); | 93 set_id(VIEW_ID_DOWNLOAD_SHELF); |
| 94 parent->AddChildView(this); | 94 parent->AddChildView(this); |
| 95 Init(); | 95 Init(); |
| 96 } | 96 } |
| 97 | 97 |
| 98 DownloadShelfView::~DownloadShelfView() { | 98 DownloadShelfView::~DownloadShelfView() { |
| 99 parent_->RemoveChildView(this); | 99 parent_->RemoveChildView(this); |
| 100 } | 100 } |
| 101 | 101 |
| 102 void DownloadShelfView::Init() { | 102 void DownloadShelfView::Init() { |
| 103 ResourceBundle &rb = ResourceBundle::GetSharedInstance(); | 103 ResourceBundle &rb = ResourceBundle::GetSharedInstance(); |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 const DownloadItemView* download_item_view) { | 443 const DownloadItemView* download_item_view) { |
| 444 gfx::Rect bounds = download_item_view->bounds(); | 444 gfx::Rect bounds = download_item_view->bounds(); |
| 445 | 445 |
| 446 #if defined(TOOLKIT_VIEWS) | 446 #if defined(TOOLKIT_VIEWS) |
| 447 bounds.set_height(bounds.height() - 1); | 447 bounds.set_height(bounds.height() - 1); |
| 448 bounds.Offset(0, 3); | 448 bounds.Offset(0, 3); |
| 449 #endif | 449 #endif |
| 450 | 450 |
| 451 return bounds; | 451 return bounds; |
| 452 } | 452 } |
| OLD | NEW |