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_item_view.h" | 5 #include "chrome/browser/ui/views/download/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" |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 body_hover_animation_.reset(new ui::SlideAnimation(this)); | 211 body_hover_animation_.reset(new ui::SlideAnimation(this)); |
212 drop_hover_animation_.reset(new ui::SlideAnimation(this)); | 212 drop_hover_animation_.reset(new ui::SlideAnimation(this)); |
213 | 213 |
214 if (download->safety_state() == DownloadItem::DANGEROUS) { | 214 if (download->safety_state() == DownloadItem::DANGEROUS) { |
215 tooltip_text_.clear(); | 215 tooltip_text_.clear(); |
216 body_state_ = DANGEROUS; | 216 body_state_ = DANGEROUS; |
217 drop_down_state_ = DANGEROUS; | 217 drop_down_state_ = DANGEROUS; |
218 save_button_ = new views::NativeButton(this, | 218 save_button_ = new views::NativeButton(this, |
219 UTF16ToWide(l10n_util::GetStringUTF16( | 219 UTF16ToWide(l10n_util::GetStringUTF16( |
220 download->is_extension_install() ? | 220 download->is_extension_install() ? |
221 IDS_CONTINUE_EXTENSION_DOWNLOAD : IDS_SAVE_DOWNLOAD))); | 221 IDS_CONTINUE_EXTENSION_DOWNLOAD : IDS_CONFIRM_DOWNLOAD))); |
222 save_button_->set_ignore_minimum_size(true); | 222 save_button_->set_ignore_minimum_size(true); |
223 discard_button_ = new views::NativeButton( | 223 discard_button_ = new views::NativeButton( |
224 this, UTF16ToWide(l10n_util::GetStringUTF16(IDS_DISCARD_DOWNLOAD))); | 224 this, UTF16ToWide(l10n_util::GetStringUTF16(IDS_DISCARD_DOWNLOAD))); |
225 discard_button_->set_ignore_minimum_size(true); | 225 discard_button_->set_ignore_minimum_size(true); |
226 AddChildView(save_button_); | 226 AddChildView(save_button_); |
227 AddChildView(discard_button_); | 227 AddChildView(discard_button_); |
228 | 228 |
229 // Ensure the file name is not too long. | 229 // Ensure the file name is not too long. |
230 | 230 |
231 // Extract the file extension (if any). | 231 // Extract the file extension (if any). |
(...skipping 880 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1112 // If the name has changed, notify assistive technology that the name | 1112 // If the name has changed, notify assistive technology that the name |
1113 // has changed so they can announce it immediately. | 1113 // has changed so they can announce it immediately. |
1114 if (new_name != accessible_name_) { | 1114 if (new_name != accessible_name_) { |
1115 accessible_name_ = new_name; | 1115 accessible_name_ = new_name; |
1116 if (GetWidget()) { | 1116 if (GetWidget()) { |
1117 GetWidget()->NotifyAccessibilityEvent( | 1117 GetWidget()->NotifyAccessibilityEvent( |
1118 this, ui::AccessibilityTypes::EVENT_NAME_CHANGED, true); | 1118 this, ui::AccessibilityTypes::EVENT_NAME_CHANGED, true); |
1119 } | 1119 } |
1120 } | 1120 } |
1121 } | 1121 } |
OLD | NEW |