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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 | 89 |
90 } // namespace | 90 } // namespace |
91 | 91 |
92 DownloadShelfView::DownloadShelfView(Browser* browser, BrowserView* parent) | 92 DownloadShelfView::DownloadShelfView(Browser* browser, BrowserView* parent) |
93 : browser_(browser), | 93 : browser_(browser), |
94 parent_(parent), | 94 parent_(parent), |
95 auto_closed_(true), | 95 auto_closed_(true), |
96 ALLOW_THIS_IN_INITIALIZER_LIST( | 96 ALLOW_THIS_IN_INITIALIZER_LIST( |
97 mouse_watcher_(new views::MouseWatcherViewHost(this, gfx::Insets()), | 97 mouse_watcher_(new views::MouseWatcherViewHost(this, gfx::Insets()), |
98 this)) { | 98 this)) { |
99 mouse_watcher_.set_notify_on_exit_time_ms(kNotifyOnExitTimeMS); | 99 mouse_watcher_.set_notify_on_exit_time( |
| 100 base::TimeDelta::FromMilliseconds(kNotifyOnExitTimeMS)); |
100 set_id(VIEW_ID_DOWNLOAD_SHELF); | 101 set_id(VIEW_ID_DOWNLOAD_SHELF); |
101 parent->AddChildView(this); | 102 parent->AddChildView(this); |
102 } | 103 } |
103 | 104 |
104 DownloadShelfView::~DownloadShelfView() { | 105 DownloadShelfView::~DownloadShelfView() { |
105 parent_->RemoveChildView(this); | 106 parent_->RemoveChildView(this); |
106 } | 107 } |
107 | 108 |
108 void DownloadShelfView::AddDownloadView(DownloadItemView* view) { | 109 void DownloadShelfView::AddDownloadView(DownloadItemView* view) { |
109 mouse_watcher_.Stop(); | 110 mouse_watcher_.Stop(); |
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
468 const DownloadItemView* download_item_view) { | 469 const DownloadItemView* download_item_view) { |
469 gfx::Rect bounds = download_item_view->bounds(); | 470 gfx::Rect bounds = download_item_view->bounds(); |
470 | 471 |
471 #if defined(TOOLKIT_VIEWS) | 472 #if defined(TOOLKIT_VIEWS) |
472 bounds.set_height(bounds.height() - 1); | 473 bounds.set_height(bounds.height() - 1); |
473 bounds.Offset(0, 3); | 474 bounds.Offset(0, 3); |
474 #endif | 475 #endif |
475 | 476 |
476 return bounds; | 477 return bounds; |
477 } | 478 } |
OLD | NEW |