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

Side by Side Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 1902393003: Don't check ash accelerators in browser with mash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698