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_item_view.h" | 5 #include "chrome/browser/ui/views/download_item_view.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
11 #include "base/i18n/rtl.h" | 11 #include "base/i18n/rtl.h" |
12 #include "base/metrics/histogram.h" | 12 #include "base/metrics/histogram.h" |
13 #include "base/string_util.h" | 13 #include "base/string_util.h" |
14 #include "base/sys_string_conversions.h" | 14 #include "base/sys_string_conversions.h" |
15 #include "base/utf_string_conversions.h" | 15 #include "base/utf_string_conversions.h" |
16 #include "chrome/browser/browser_process.h" | 16 #include "chrome/browser/browser_process.h" |
17 #include "chrome/browser/download/download_item_model.h" | 17 #include "chrome/browser/download/download_item_model.h" |
18 #include "chrome/browser/download/download_util.h" | 18 #include "chrome/browser/download/download_util.h" |
19 #include "chrome/browser/themes/browser_theme_provider.h" | 19 #include "chrome/browser/themes/browser_theme_provider.h" |
20 #include "chrome/browser/ui/views/download_shelf_view.h" | 20 #include "chrome/browser/ui/views/download_shelf_view.h" |
21 #include "gfx/canvas_skia.h" | |
22 #include "gfx/color_utils.h" | |
23 #include "grit/generated_resources.h" | 21 #include "grit/generated_resources.h" |
24 #include "grit/theme_resources.h" | 22 #include "grit/theme_resources.h" |
25 #include "ui/base/animation/slide_animation.h" | 23 #include "ui/base/animation/slide_animation.h" |
26 #include "ui/base/l10n/l10n_util.h" | 24 #include "ui/base/l10n/l10n_util.h" |
27 #include "ui/base/resource/resource_bundle.h" | 25 #include "ui/base/resource/resource_bundle.h" |
28 #include "ui/base/text/text_elider.h" | 26 #include "ui/base/text/text_elider.h" |
| 27 #include "ui/gfx/canvas_skia.h" |
| 28 #include "ui/gfx/color_utils.h" |
29 #include "views/controls/button/native_button.h" | 29 #include "views/controls/button/native_button.h" |
30 #include "views/controls/menu/menu_2.h" | 30 #include "views/controls/menu/menu_2.h" |
31 #include "views/widget/root_view.h" | 31 #include "views/widget/root_view.h" |
32 #include "views/widget/widget.h" | 32 #include "views/widget/widget.h" |
33 | 33 |
34 using base::TimeDelta; | 34 using base::TimeDelta; |
35 | 35 |
36 // TODO(paulg): These may need to be adjusted when download progress | 36 // TODO(paulg): These may need to be adjusted when download progress |
37 // animation is added, and also possibly to take into account | 37 // animation is added, and also possibly to take into account |
38 // different screen resolutions. | 38 // different screen resolutions. |
(...skipping 1035 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1074 | 1074 |
1075 // If the name has changed, call SetAccessibleName and notify | 1075 // If the name has changed, call SetAccessibleName and notify |
1076 // assistive technology that the name has changed so they can | 1076 // assistive technology that the name has changed so they can |
1077 // announce it immediately. | 1077 // announce it immediately. |
1078 if (new_name != current_name) { | 1078 if (new_name != current_name) { |
1079 SetAccessibleName(new_name); | 1079 SetAccessibleName(new_name); |
1080 if (GetWidget()) | 1080 if (GetWidget()) |
1081 NotifyAccessibilityEvent(AccessibilityTypes::EVENT_NAME_CHANGED); | 1081 NotifyAccessibilityEvent(AccessibilityTypes::EVENT_NAME_CHANGED); |
1082 } | 1082 } |
1083 } | 1083 } |
OLD | NEW |