OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // This file contains the definition for EventSendingController. | 5 // This file contains the definition for EventSendingController. |
6 // | 6 // |
7 // Some notes about drag and drop handling: | 7 // Some notes about drag and drop handling: |
8 // Windows drag and drop goes through a system call to DoDragDrop. At that | 8 // Windows drag and drop goes through a system call to DoDragDrop. At that |
9 // point, program control is given to Windows which then periodically makes | 9 // point, program control is given to Windows which then periodically makes |
10 // callbacks into the webview. This won't work for layout tests, so instead, | 10 // callbacks into the webview. This won't work for layout tests, so instead, |
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 generate_char = true; | 557 generate_char = true; |
558 text = code = base::VKEY_RETURN; | 558 text = code = base::VKEY_RETURN; |
559 } else if (L"rightArrow" == code_str) { | 559 } else if (L"rightArrow" == code_str) { |
560 code = base::VKEY_RIGHT; | 560 code = base::VKEY_RIGHT; |
561 } else if (L"downArrow" == code_str) { | 561 } else if (L"downArrow" == code_str) { |
562 code = base::VKEY_DOWN; | 562 code = base::VKEY_DOWN; |
563 } else if (L"leftArrow" == code_str) { | 563 } else if (L"leftArrow" == code_str) { |
564 code = base::VKEY_LEFT; | 564 code = base::VKEY_LEFT; |
565 } else if (L"upArrow" == code_str) { | 565 } else if (L"upArrow" == code_str) { |
566 code = base::VKEY_UP; | 566 code = base::VKEY_UP; |
| 567 } else if (L"insert" == code_str) { |
| 568 code = base::VKEY_INSERT; |
567 } else if (L"delete" == code_str) { | 569 } else if (L"delete" == code_str) { |
568 code = base::VKEY_BACK; | 570 code = base::VKEY_BACK; |
569 } else if (L"pageUp" == code_str) { | 571 } else if (L"pageUp" == code_str) { |
570 code = base::VKEY_PRIOR; | 572 code = base::VKEY_PRIOR; |
571 } else if (L"pageDown" == code_str) { | 573 } else if (L"pageDown" == code_str) { |
572 code = base::VKEY_NEXT; | 574 code = base::VKEY_NEXT; |
573 } else if (L"home" == code_str) { | 575 } else if (L"home" == code_str) { |
574 code = base::VKEY_HOME; | 576 code = base::VKEY_HOME; |
575 } else if (L"end" == code_str) { | 577 } else if (L"end" == code_str) { |
576 code = base::VKEY_END; | 578 code = base::VKEY_END; |
| 579 } else if (L"printScreen" == code_str) { |
| 580 code = base::VKEY_SNAPSHOT; |
577 } else { | 581 } else { |
578 // Compare the input string with the function-key names defined by the | 582 // Compare the input string with the function-key names defined by the |
579 // DOM spec (i.e. "F1",...,"F24"). If the input string is a function-key | 583 // DOM spec (i.e. "F1",...,"F24"). If the input string is a function-key |
580 // name, set its key code. | 584 // name, set its key code. |
581 for (int i = 1; i <= 24; ++i) { | 585 for (int i = 1; i <= 24; ++i) { |
582 std::wstring function_key_name; | 586 std::wstring function_key_name; |
583 function_key_name += L"F"; | 587 function_key_name += L"F"; |
584 function_key_name += UTF8ToWide(base::IntToString(i)); | 588 function_key_name += UTF8ToWide(base::IntToString(i)); |
585 if (function_key_name == code_str) { | 589 if (function_key_name == code_str) { |
586 code = base::VKEY_F1 + (i - 1); | 590 code = base::VKEY_F1 + (i - 1); |
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
982 | 986 |
983 void EventSendingController::fireKeyboardEventsToElement( | 987 void EventSendingController::fireKeyboardEventsToElement( |
984 const CppArgumentList& args, CppVariant* result) { | 988 const CppArgumentList& args, CppVariant* result) { |
985 result->SetNull(); | 989 result->SetNull(); |
986 } | 990 } |
987 | 991 |
988 void EventSendingController::clearKillRing( | 992 void EventSendingController::clearKillRing( |
989 const CppArgumentList& args, CppVariant* result) { | 993 const CppArgumentList& args, CppVariant* result) { |
990 result->SetNull(); | 994 result->SetNull(); |
991 } | 995 } |
OLD | NEW |