| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/ui/views/frame/browser_view.h" | 5 #include "chrome/browser/ui/views/frame/browser_view.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 1326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1337 | 1337 |
| 1338 if (browser_->is_app()) { | 1338 if (browser_->is_app()) { |
| 1339 // Let all keys fall through to a v1 app's web content, even accelerators. | 1339 // Let all keys fall through to a v1 app's web content, even accelerators. |
| 1340 // We don't have to flip |is_keyboard_shortcut| here. If we do that, the app | 1340 // We don't have to flip |is_keyboard_shortcut| here. If we do that, the app |
| 1341 // might not be able to see a subsequent Char event. See OnHandleInputEvent | 1341 // might not be able to see a subsequent Char event. See OnHandleInputEvent |
| 1342 // in content/renderer/render_widget.cc for details. | 1342 // in content/renderer/render_widget.cc for details. |
| 1343 return false; | 1343 return false; |
| 1344 } | 1344 } |
| 1345 | 1345 |
| 1346 #if defined(OS_CHROMEOS) | 1346 #if defined(OS_CHROMEOS) |
| 1347 if (ash_util::IsAcceleratorDeprecated(accelerator)) { | 1347 if (IsAcceleratorDeprecated(accelerator)) { |
| 1348 if (event.type() == blink::WebInputEvent::RawKeyDown) | 1348 if (event.type() == blink::WebInputEvent::RawKeyDown) |
| 1349 *is_keyboard_shortcut = true; | 1349 *is_keyboard_shortcut = true; |
| 1350 return false; | 1350 return false; |
| 1351 } | 1351 } |
| 1352 #endif // defined(OS_CHROMEOS) | 1352 #endif // defined(OS_CHROMEOS) |
| 1353 | 1353 |
| 1354 if (frame_->PreHandleKeyboardEvent(event)) | 1354 if (frame_->PreHandleKeyboardEvent(event)) |
| 1355 return true; | 1355 return true; |
| 1356 | 1356 |
| 1357 chrome::BrowserCommandController* controller = browser_->command_controller(); | 1357 chrome::BrowserCommandController* controller = browser_->command_controller(); |
| (...skipping 1309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2667 } | 2667 } |
| 2668 | 2668 |
| 2669 extensions::ActiveTabPermissionGranter* | 2669 extensions::ActiveTabPermissionGranter* |
| 2670 BrowserView::GetActiveTabPermissionGranter() { | 2670 BrowserView::GetActiveTabPermissionGranter() { |
| 2671 content::WebContents* web_contents = GetActiveWebContents(); | 2671 content::WebContents* web_contents = GetActiveWebContents(); |
| 2672 if (!web_contents) | 2672 if (!web_contents) |
| 2673 return nullptr; | 2673 return nullptr; |
| 2674 return extensions::TabHelper::FromWebContents(web_contents) | 2674 return extensions::TabHelper::FromWebContents(web_contents) |
| 2675 ->active_tab_permission_granter(); | 2675 ->active_tab_permission_granter(); |
| 2676 } | 2676 } |
| OLD | NEW |