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

Side by Side Diff: Source/web/WebPluginContainerImpl.cpp

Issue 629823002: Keyboard Shortkey for ctrl+insert is not working. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Changes for meta key in mac os. Created 6 years, 2 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
« no previous file with comments | « no previous file | Source/web/tests/WebPluginContainerTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2014 Opera Software ASA. All rights reserved. 3 * Copyright (C) 2014 Opera Software ASA. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 WebKeyboardEventBuilder webEvent(*event); 812 WebKeyboardEventBuilder webEvent(*event);
813 if (webEvent.type == WebInputEvent::Undefined) 813 if (webEvent.type == WebInputEvent::Undefined)
814 return; 814 return;
815 815
816 if (webEvent.type == WebInputEvent::KeyDown) { 816 if (webEvent.type == WebInputEvent::KeyDown) {
817 #if OS(MACOSX) 817 #if OS(MACOSX)
818 if (webEvent.modifiers == WebInputEvent::MetaKey 818 if (webEvent.modifiers == WebInputEvent::MetaKey
819 #else 819 #else
820 if (webEvent.modifiers == WebInputEvent::ControlKey 820 if (webEvent.modifiers == WebInputEvent::ControlKey
821 #endif 821 #endif
822 && webEvent.windowsKeyCode == VKEY_C 822 && (webEvent.windowsKeyCode == VKEY_C || webEvent.windowsKeyCode == VKEY_INSERT)
823 // Only copy if there's a selection, so that we only ever do this 823 // Only copy if there's a selection, so that we only ever do this
824 // for Pepper plugins that support copying. Windowless NPAPI 824 // for Pepper plugins that support copying. Windowless NPAPI
825 // plugins will get the event as before. 825 // plugins will get the event as before.
826 && m_webPlugin->hasSelection()) { 826 && m_webPlugin->hasSelection()) {
827 copy(); 827 copy();
828 event->setDefaultHandled(); 828 event->setDefaultHandled();
829 return; 829 return;
830 } 830 }
831 } 831 }
832 832
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
962 962
963 return clipRect; 963 return clipRect;
964 } 964 }
965 965
966 bool WebPluginContainerImpl::pluginShouldPersist() const 966 bool WebPluginContainerImpl::pluginShouldPersist() const
967 { 967 {
968 return m_webPlugin->shouldPersist(); 968 return m_webPlugin->shouldPersist();
969 } 969 }
970 970
971 } // namespace blink 971 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/web/tests/WebPluginContainerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698