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

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_cocoa.mm

Issue 2874153004: Revert change to BroserWindowCocoa::PreHandleKeyboardEvent in 2824803004 (Closed)
Patch Set: Created 3 years, 7 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/cocoa/browser_window_cocoa.h" 5 #include "chrome/browser/ui/cocoa/browser_window_cocoa.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #import "base/mac/sdk_forward_declarations.h" 10 #import "base/mac/sdk_forward_declarations.h"
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after
728 728
729 int id = [BrowserWindowUtils getCommandId:event]; 729 int id = [BrowserWindowUtils getCommandId:event];
730 if (id == -1) 730 if (id == -1)
731 return content::KeyboardEventProcessingResult::NOT_HANDLED; 731 return content::KeyboardEventProcessingResult::NOT_HANDLED;
732 732
733 if (browser_->command_controller()->IsReservedCommandOrKey(id, event)) { 733 if (browser_->command_controller()->IsReservedCommandOrKey(id, event)) {
734 using Result = content::KeyboardEventProcessingResult; 734 using Result = content::KeyboardEventProcessingResult;
735 return [BrowserWindowUtils handleKeyboardEvent:event.os_event 735 return [BrowserWindowUtils handleKeyboardEvent:event.os_event
736 inWindow:window()] 736 inWindow:window()]
737 ? Result::HANDLED 737 ? Result::HANDLED
738 : Result::NOT_HANDLED_IS_SHORTCUT; 738 : Result::NOT_HANDLED;
739 } 739 }
740 740
741 return content::KeyboardEventProcessingResult::NOT_HANDLED; 741 return content::KeyboardEventProcessingResult::NOT_HANDLED_IS_SHORTCUT;
742 } 742 }
743 743
744 void BrowserWindowCocoa::HandleKeyboardEvent( 744 void BrowserWindowCocoa::HandleKeyboardEvent(
745 const NativeWebKeyboardEvent& event) { 745 const NativeWebKeyboardEvent& event) {
746 if ([BrowserWindowUtils shouldHandleKeyboardEvent:event]) { 746 if ([BrowserWindowUtils shouldHandleKeyboardEvent:event]) {
747 if (![BrowserWindowUtils handleKeyboardEvent:event.os_event 747 if (![BrowserWindowUtils handleKeyboardEvent:event.os_event
748 inWindow:window()]) { 748 inWindow:window()]) {
749 749
750 // TODO(spqchan): This is a temporary fix for exit extension fullscreen. 750 // TODO(spqchan): This is a temporary fix for exit extension fullscreen.
751 // A priority system for exiting extension fullscreen when there is a 751 // A priority system for exiting extension fullscreen when there is a
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
856 ExclusiveAccessContext* BrowserWindowCocoa::GetExclusiveAccessContext() { 856 ExclusiveAccessContext* BrowserWindowCocoa::GetExclusiveAccessContext() {
857 return [controller_ exclusiveAccessController]; 857 return [controller_ exclusiveAccessController];
858 } 858 }
859 859
860 void BrowserWindowCocoa::ShowImeWarningBubble( 860 void BrowserWindowCocoa::ShowImeWarningBubble(
861 const extensions::Extension* extension, 861 const extensions::Extension* extension,
862 const base::Callback<void(ImeWarningBubblePermissionStatus status)>& 862 const base::Callback<void(ImeWarningBubblePermissionStatus status)>&
863 callback) { 863 callback) {
864 NOTREACHED() << "The IME warning bubble is unsupported on this platform."; 864 NOTREACHED() << "The IME warning bubble is unsupported on this platform.";
865 } 865 }
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