| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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/chromeos/accessibility/event_handler_common.h" | 5 #include "chrome/browser/chromeos/accessibility/event_handler_common.h" |
| 6 | 6 |
| 7 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" | 7 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" |
| 8 #include "chrome/browser/profiles/profile_manager.h" | 8 #include "chrome/browser/profiles/profile_manager.h" |
| 9 #include "content/public/browser/render_view_host.h" | 9 #include "content/public/browser/render_view_host.h" |
| 10 #include "content/public/browser/render_widget_host.h" | 10 #include "content/public/browser/render_widget_host.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 return; | 42 return; |
| 43 } | 43 } |
| 44 | 44 |
| 45 content::RenderViewHost* rvh = host->render_view_host(); | 45 content::RenderViewHost* rvh = host->render_view_host(); |
| 46 if (!rvh) { | 46 if (!rvh) { |
| 47 LOG(ERROR) << "Unable to forward key to extension"; | 47 LOG(ERROR) << "Unable to forward key to extension"; |
| 48 return; | 48 return; |
| 49 } | 49 } |
| 50 | 50 |
| 51 const content::NativeWebKeyboardEvent web_event(key_event); | 51 const content::NativeWebKeyboardEvent web_event(key_event); |
| 52 // Don't forward latency info, as these are getting forwarded to an extension. |
| 52 rvh->GetWidget()->ForwardKeyboardEvent(web_event); | 53 rvh->GetWidget()->ForwardKeyboardEvent(web_event); |
| 53 } | 54 } |
| 54 } // namespace chromeos | 55 } // namespace chromeos |
| OLD | NEW |