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

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

Issue 663523002: Adding support for DOM3 KeyboardEvents Code in KeyboardEvents (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added new embedder API and code review comments update Created 5 years, 11 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
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 810 matching lines...) Expand 10 before | Expand all | Expand 10 after
821 if (webEvent.type == WebInputEvent::Undefined) 821 if (webEvent.type == WebInputEvent::Undefined)
822 return; 822 return;
823 823
824 WebCursorInfo cursorInfo; 824 WebCursorInfo cursorInfo;
825 if (m_webPlugin->handleInputEvent(webEvent, cursorInfo)) 825 if (m_webPlugin->handleInputEvent(webEvent, cursorInfo))
826 event->setDefaultHandled(); 826 event->setDefaultHandled();
827 } 827 }
828 828
829 void WebPluginContainerImpl::handleKeyboardEvent(KeyboardEvent* event) 829 void WebPluginContainerImpl::handleKeyboardEvent(KeyboardEvent* event)
830 { 830 {
831 WebKeyboardEventBuilder webEvent(*event); 831 WebKeyboardEventBuilder webEvent(this, *event);
832 if (webEvent.type == WebInputEvent::Undefined) 832 if (webEvent.type == WebInputEvent::Undefined)
833 return; 833 return;
834 834
835 if (webEvent.type == WebInputEvent::KeyDown) { 835 if (webEvent.type == WebInputEvent::KeyDown) {
836 #if OS(MACOSX) 836 #if OS(MACOSX)
837 if (webEvent.modifiers == WebInputEvent::MetaKey 837 if (webEvent.modifiers == WebInputEvent::MetaKey
838 #else 838 #else
839 if (webEvent.modifiers == WebInputEvent::ControlKey 839 if (webEvent.modifiers == WebInputEvent::ControlKey
840 #endif 840 #endif
841 && (webEvent.windowsKeyCode == VKEY_C || webEvent.windowsKeyCode == VKEY_INSERT) 841 && (webEvent.windowsKeyCode == VKEY_C || webEvent.windowsKeyCode == VKEY_INSERT)
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
981 981
982 return clipRect; 982 return clipRect;
983 } 983 }
984 984
985 bool WebPluginContainerImpl::pluginShouldPersist() const 985 bool WebPluginContainerImpl::pluginShouldPersist() const
986 { 986 {
987 return m_webPlugin->shouldPersist(); 987 return m_webPlugin->shouldPersist();
988 } 988 }
989 989
990 } // namespace blink 990 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698