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 "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
10 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
(...skipping 858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
869 dragging_ = true; | 869 dragging_ = true; |
870 } | 870 } |
871 return true; | 871 return true; |
872 } | 872 } |
873 | 873 |
874 bool DownloadItemView::OnKeyPressed(const views::KeyEvent& e) { | 874 bool DownloadItemView::OnKeyPressed(const views::KeyEvent& e) { |
875 // Key press should not activate us in dangerous mode. | 875 // Key press should not activate us in dangerous mode. |
876 if (IsDangerousMode()) | 876 if (IsDangerousMode()) |
877 return true; | 877 return true; |
878 | 878 |
879 if (e.GetKeyCode() == app::VKEY_SPACE || | 879 if (e.GetKeyCode() == ui::VKEY_SPACE || |
880 e.GetKeyCode() == app::VKEY_RETURN) { | 880 e.GetKeyCode() == ui::VKEY_RETURN) { |
881 OpenDownload(); | 881 OpenDownload(); |
882 return true; | 882 return true; |
883 } | 883 } |
884 return false; | 884 return false; |
885 } | 885 } |
886 | 886 |
887 void DownloadItemView::ShowContextMenu(const gfx::Point& p, | 887 void DownloadItemView::ShowContextMenu(const gfx::Point& p, |
888 bool is_mouse_gesture) { | 888 bool is_mouse_gesture) { |
889 gfx::Point point = p; | 889 gfx::Point point = p; |
890 drop_down_pressed_ = true; | 890 drop_down_pressed_ = true; |
(...skipping 183 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 |