Chromium Code Reviews| 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_item_view.h" | 5 #include "chrome/browser/ui/views/download/download_item_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 488 } | 488 } |
| 489 | 489 |
| 490 tooltip->assign(tooltip_text_); | 490 tooltip->assign(tooltip_text_); |
| 491 | 491 |
| 492 return true; | 492 return true; |
| 493 } | 493 } |
| 494 | 494 |
| 495 void DownloadItemView::GetAccessibleState(ui::AXViewState* state) { | 495 void DownloadItemView::GetAccessibleState(ui::AXViewState* state) { |
| 496 state->name = accessible_name_; | 496 state->name = accessible_name_; |
| 497 state->role = ui::AX_ROLE_BUTTON; | 497 state->role = ui::AX_ROLE_BUTTON; |
| 498 if (model_.IsDangerous()) { | 498 if (model_.IsDangerous()) { |
|
sky
2014/03/26 14:29:13
nit: no {}
dmazzoni
2014/03/26 18:12:29
Done.
| |
| 499 state->state = ui::AX_STATE_DISABLED; | 499 state->SetStateFlag(ui::AX_STATE_DISABLED); |
| 500 } else { | 500 } else { |
| 501 state->state = ui::AX_STATE_HASPOPUP; | 501 state->SetStateFlag(ui::AX_STATE_HASPOPUP); |
| 502 } | 502 } |
| 503 } | 503 } |
| 504 | 504 |
| 505 void DownloadItemView::OnThemeChanged() { | 505 void DownloadItemView::OnThemeChanged() { |
| 506 UpdateColorsFromTheme(); | 506 UpdateColorsFromTheme(); |
| 507 } | 507 } |
| 508 | 508 |
| 509 void DownloadItemView::OnGestureEvent(ui::GestureEvent* event) { | 509 void DownloadItemView::OnGestureEvent(ui::GestureEvent* event) { |
| 510 if (event->type() == ui::ET_GESTURE_TAP_DOWN) { | 510 if (event->type() == ui::ET_GESTURE_TAP_DOWN) { |
| 511 HandlePressEvent(*event, true); | 511 HandlePressEvent(*event, true); |
| (...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1338 void DownloadItemView::AnimateStateTransition(State from, State to, | 1338 void DownloadItemView::AnimateStateTransition(State from, State to, |
| 1339 gfx::SlideAnimation* animation) { | 1339 gfx::SlideAnimation* animation) { |
| 1340 if (from == NORMAL && to == HOT) { | 1340 if (from == NORMAL && to == HOT) { |
| 1341 animation->Show(); | 1341 animation->Show(); |
| 1342 } else if (from == HOT && to == NORMAL) { | 1342 } else if (from == HOT && to == NORMAL) { |
| 1343 animation->Hide(); | 1343 animation->Hide(); |
| 1344 } else if (from != to) { | 1344 } else if (from != to) { |
| 1345 animation->Reset((to == HOT) ? 1.0 : 0.0); | 1345 animation->Reset((to == HOT) ? 1.0 : 0.0); |
| 1346 } | 1346 } |
| 1347 } | 1347 } |
| OLD | NEW |