Chromium Code Reviews| 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 1355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1366 immersive_mode_controller_->GetRevealedLock( | 1366 immersive_mode_controller_->GetRevealedLock( |
| 1367 ImmersiveModeController::ANIMATE_REVEAL_NO)); | 1367 ImmersiveModeController::ANIMATE_REVEAL_NO)); |
| 1368 | 1368 |
| 1369 toolbar_->app_menu_button()->Activate(nullptr); | 1369 toolbar_->app_menu_button()->Activate(nullptr); |
| 1370 } | 1370 } |
| 1371 | 1371 |
| 1372 bool BrowserView::PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, | 1372 bool BrowserView::PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, |
| 1373 bool* is_keyboard_shortcut) { | 1373 bool* is_keyboard_shortcut) { |
| 1374 *is_keyboard_shortcut = false; | 1374 *is_keyboard_shortcut = false; |
| 1375 | 1375 |
| 1376 // When running in mash the browser should register accelerators with mus. | |
| 1377 if (chrome::IsRunningInMash()) | |
|
sky
2016/04/20 20:26:49
This seems too early. It's only ash accelerators w
| |
| 1378 return false; | |
| 1379 | |
| 1376 if ((event.type != blink::WebInputEvent::RawKeyDown) && | 1380 if ((event.type != blink::WebInputEvent::RawKeyDown) && |
| 1377 (event.type != blink::WebInputEvent::KeyUp)) { | 1381 (event.type != blink::WebInputEvent::KeyUp)) { |
| 1378 return false; | 1382 return false; |
| 1379 } | 1383 } |
| 1380 | 1384 |
| 1381 views::FocusManager* focus_manager = GetFocusManager(); | 1385 views::FocusManager* focus_manager = GetFocusManager(); |
| 1382 DCHECK(focus_manager); | 1386 DCHECK(focus_manager); |
| 1383 | 1387 |
| 1384 if (focus_manager->shortcut_handling_suspended()) | 1388 if (focus_manager->shortcut_handling_suspended()) |
| 1385 return false; | 1389 return false; |
| (...skipping 1260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2646 } | 2650 } |
| 2647 | 2651 |
| 2648 extensions::ActiveTabPermissionGranter* | 2652 extensions::ActiveTabPermissionGranter* |
| 2649 BrowserView::GetActiveTabPermissionGranter() { | 2653 BrowserView::GetActiveTabPermissionGranter() { |
| 2650 content::WebContents* web_contents = GetActiveWebContents(); | 2654 content::WebContents* web_contents = GetActiveWebContents(); |
| 2651 if (!web_contents) | 2655 if (!web_contents) |
| 2652 return nullptr; | 2656 return nullptr; |
| 2653 return extensions::TabHelper::FromWebContents(web_contents) | 2657 return extensions::TabHelper::FromWebContents(web_contents) |
| 2654 ->active_tab_permission_granter(); | 2658 ->active_tab_permission_granter(); |
| 2655 } | 2659 } |
| OLD | NEW |