Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(459)

Side by Side Diff: chrome/browser/ui/views/download_item_view.cc

Issue 6480001: Migrate Event API methods to Google Style. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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"
(...skipping 858 matching lines...) Expand 10 before | Expand all | Expand 10 after
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() == ui::VKEY_SPACE || 879 if (e.key_code() == ui::VKEY_SPACE || e.key_code() == ui::VKEY_RETURN) {
880 e.GetKeyCode() == ui::VKEY_RETURN) {
881 OpenDownload(); 880 OpenDownload();
882 return true; 881 return true;
883 } 882 }
884 return false; 883 return false;
885 } 884 }
886 885
887 void DownloadItemView::ShowContextMenu(const gfx::Point& p, 886 void DownloadItemView::ShowContextMenu(const gfx::Point& p,
888 bool is_mouse_gesture) { 887 bool is_mouse_gesture) {
889 gfx::Point point = p; 888 gfx::Point point = p;
890 drop_down_pressed_ = true; 889 drop_down_pressed_ = true;
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
1074 1073
1075 // If the name has changed, call SetAccessibleName and notify 1074 // If the name has changed, call SetAccessibleName and notify
1076 // assistive technology that the name has changed so they can 1075 // assistive technology that the name has changed so they can
1077 // announce it immediately. 1076 // announce it immediately.
1078 if (new_name != current_name) { 1077 if (new_name != current_name) {
1079 SetAccessibleName(new_name); 1078 SetAccessibleName(new_name);
1080 if (GetWidget()) 1079 if (GetWidget())
1081 NotifyAccessibilityEvent(AccessibilityTypes::EVENT_NAME_CHANGED); 1080 NotifyAccessibilityEvent(AccessibilityTypes::EVENT_NAME_CHANGED);
1082 } 1081 }
1083 } 1082 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698