OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/views/location_bar_view.h" | 5 #include "chrome/browser/views/location_bar_view.h" |
6 | 6 |
7 #include "app/gfx/canvas.h" | 7 #include "app/gfx/canvas.h" |
8 #include "app/gfx/favicon_size.h" | 8 #include "app/gfx/favicon_size.h" |
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 894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
905 switch (c) { | 905 switch (c) { |
906 case VK_RETURN: | 906 case VK_RETURN: |
907 return true; | 907 return true; |
908 | 908 |
909 case VK_UP: | 909 case VK_UP: |
910 case VK_DOWN: | 910 case VK_DOWN: |
911 return !e.IsAltDown(); | 911 return !e.IsAltDown(); |
912 | 912 |
913 case VK_DELETE: | 913 case VK_DELETE: |
914 case VK_INSERT: | 914 case VK_INSERT: |
915 return !e.IsAltDown() && e.IsShiftDown(); | 915 return !e.IsAltDown() && e.IsShiftDown() && !e.IsControlDown(); |
916 | 916 |
917 case 'X': | 917 case 'X': |
918 case 'V': | 918 case 'V': |
919 return !e.IsAltDown() && e.IsControlDown(); | 919 return !e.IsAltDown() && e.IsControlDown(); |
920 | 920 |
921 case VK_BACK: | 921 case VK_BACK: |
922 case 0xbb: | 922 case 0xbb: |
923 return true; | 923 return true; |
924 | 924 |
925 default: | 925 default: |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1335 location_entry_->SetFocus(); | 1335 location_entry_->SetFocus(); |
1336 } | 1336 } |
1337 | 1337 |
1338 void LocationBarView::SaveStateToContents(TabContents* contents) { | 1338 void LocationBarView::SaveStateToContents(TabContents* contents) { |
1339 location_entry_->SaveStateToTab(contents); | 1339 location_entry_->SaveStateToTab(contents); |
1340 } | 1340 } |
1341 | 1341 |
1342 void LocationBarView::Revert() { | 1342 void LocationBarView::Revert() { |
1343 location_entry_->RevertAll(); | 1343 location_entry_->RevertAll(); |
1344 } | 1344 } |
OLD | NEW |