| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 481 | 481 |
| 482 tooltip->assign(tooltip_text_); | 482 tooltip->assign(tooltip_text_); |
| 483 | 483 |
| 484 return true; | 484 return true; |
| 485 } | 485 } |
| 486 | 486 |
| 487 void DownloadItemView::GetAccessibleNodeData(ui::AXNodeData* node_data) { | 487 void DownloadItemView::GetAccessibleNodeData(ui::AXNodeData* node_data) { |
| 488 node_data->SetName(accessible_name_); | 488 node_data->SetName(accessible_name_); |
| 489 node_data->role = ui::AX_ROLE_BUTTON; | 489 node_data->role = ui::AX_ROLE_BUTTON; |
| 490 if (model_.IsDangerous()) | 490 if (model_.IsDangerous()) |
| 491 node_data->AddStateFlag(ui::AX_STATE_DISABLED); | 491 node_data->AddState(ui::AX_STATE_DISABLED); |
| 492 else | 492 else |
| 493 node_data->AddStateFlag(ui::AX_STATE_HASPOPUP); | 493 node_data->AddState(ui::AX_STATE_HASPOPUP); |
| 494 } | 494 } |
| 495 | 495 |
| 496 void DownloadItemView::OnThemeChanged() { | 496 void DownloadItemView::OnThemeChanged() { |
| 497 UpdateColorsFromTheme(); | 497 UpdateColorsFromTheme(); |
| 498 SchedulePaint(); | 498 SchedulePaint(); |
| 499 UpdateDropdownButton(); | 499 UpdateDropdownButton(); |
| 500 } | 500 } |
| 501 | 501 |
| 502 void DownloadItemView::ViewHierarchyChanged( | 502 void DownloadItemView::ViewHierarchyChanged( |
| 503 const ViewHierarchyChangedDetails& details) { | 503 const ViewHierarchyChangedDetails& details) { |
| (...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1121 SchedulePaint(); | 1121 SchedulePaint(); |
| 1122 } | 1122 } |
| 1123 | 1123 |
| 1124 SkColor DownloadItemView::GetTextColor() const { | 1124 SkColor DownloadItemView::GetTextColor() const { |
| 1125 return GetTextColorForThemeProvider(GetThemeProvider()); | 1125 return GetTextColorForThemeProvider(GetThemeProvider()); |
| 1126 } | 1126 } |
| 1127 | 1127 |
| 1128 SkColor DownloadItemView::GetDimmedTextColor() const { | 1128 SkColor DownloadItemView::GetDimmedTextColor() const { |
| 1129 return SkColorSetA(GetTextColor(), 0xC7); | 1129 return SkColorSetA(GetTextColor(), 0xC7); |
| 1130 } | 1130 } |
| OLD | NEW |