| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/extensions/extension_input_api.h" | 5 #include "chrome/browser/extensions/extension_input_api.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| 11 #include "chrome/browser/browser_window.h" | 11 #include "chrome/browser/browser_window.h" |
| 12 #include "chrome/browser/extensions/extension_tabs_module.h" | 12 #include "chrome/browser/extensions/extension_tabs_module.h" |
| 13 #include "chrome/browser/extensions/key_identifier_conversion_views.h" | 13 #include "chrome/browser/extensions/key_identifier_conversion_views.h" |
| 14 #include "chrome/browser/renderer_host/render_view_host.h" | |
| 15 #include "chrome/browser/ui/browser.h" | 14 #include "chrome/browser/ui/browser.h" |
| 16 #include "chrome/browser/ui/views/frame/browser_view.h" | 15 #include "chrome/browser/ui/views/frame/browser_view.h" |
| 17 #include "chrome/common/native_web_keyboard_event.h" | 16 #include "chrome/common/native_web_keyboard_event.h" |
| 17 #include "content/browser/renderer_host/render_view_host.h" |
| 18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" | 18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" |
| 19 #include "views/events/event.h" | 19 #include "views/events/event.h" |
| 20 #include "views/widget/root_view.h" | 20 #include "views/widget/root_view.h" |
| 21 | 21 |
| 22 namespace { | 22 namespace { |
| 23 | 23 |
| 24 // Keys. | 24 // Keys. |
| 25 const char kType[] = "type"; | 25 const char kType[] = "type"; |
| 26 const char kKeyIdentifier[] = "keyIdentifier"; | 26 const char kKeyIdentifier[] = "keyIdentifier"; |
| 27 const char kAlt[] = "altKey"; | 27 const char kAlt[] = "altKey"; |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 } | 120 } |
| 121 | 121 |
| 122 views::KeyEvent event(type, prototype_event.key_code(), flags); | 122 views::KeyEvent event(type, prototype_event.key_code(), flags); |
| 123 if (!root_view->ProcessKeyEvent(event)) { | 123 if (!root_view->ProcessKeyEvent(event)) { |
| 124 error_ = kKeyEventUnprocessedError; | 124 error_ = kKeyEventUnprocessedError; |
| 125 return false; | 125 return false; |
| 126 } | 126 } |
| 127 | 127 |
| 128 return true; | 128 return true; |
| 129 } | 129 } |
| OLD | NEW |