| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |