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

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

Issue 2573073003: Collapse the API surface on WebInputEvent via accessor functions. (Closed)
Patch Set: Fix nits Created 3 years, 11 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
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 680 matching lines...) Expand 10 before | Expand all | Expand 10 after
691 bool BrowserWindowCocoa::PreHandleKeyboardEvent( 691 bool BrowserWindowCocoa::PreHandleKeyboardEvent(
692 const NativeWebKeyboardEvent& event, bool* is_keyboard_shortcut) { 692 const NativeWebKeyboardEvent& event, bool* is_keyboard_shortcut) {
693 // Handle ESC to dismiss permission bubbles, but still forward it 693 // Handle ESC to dismiss permission bubbles, but still forward it
694 // to the window afterwards. 694 // to the window afterwards.
695 if (event.windowsKeyCode == ui::VKEY_ESCAPE) 695 if (event.windowsKeyCode == ui::VKEY_ESCAPE)
696 [controller_ dismissPermissionBubble]; 696 [controller_ dismissPermissionBubble];
697 697
698 if (![BrowserWindowUtils shouldHandleKeyboardEvent:event]) 698 if (![BrowserWindowUtils shouldHandleKeyboardEvent:event])
699 return false; 699 return false;
700 700
701 if (event.type == blink::WebInputEvent::RawKeyDown && 701 if (event.type() == blink::WebInputEvent::RawKeyDown &&
702 [controller_ 702 [controller_
703 handledByExtensionCommand:event.os_event 703 handledByExtensionCommand:event.os_event
704 priority:ui::AcceleratorManager::kHighPriority]) 704 priority:ui::AcceleratorManager::kHighPriority])
705 return true; 705 return true;
706 706
707 int id = [BrowserWindowUtils getCommandId:event]; 707 int id = [BrowserWindowUtils getCommandId:event];
708 if (id == -1) 708 if (id == -1)
709 return false; 709 return false;
710 710
711 if (browser_->command_controller()->IsReservedCommandOrKey(id, event)) { 711 if (browser_->command_controller()->IsReservedCommandOrKey(id, event)) {
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
831 ExclusiveAccessContext* BrowserWindowCocoa::GetExclusiveAccessContext() { 831 ExclusiveAccessContext* BrowserWindowCocoa::GetExclusiveAccessContext() {
832 return [controller_ exclusiveAccessController]; 832 return [controller_ exclusiveAccessController];
833 } 833 }
834 834
835 void BrowserWindowCocoa::ShowImeWarningBubble( 835 void BrowserWindowCocoa::ShowImeWarningBubble(
836 const extensions::Extension* extension, 836 const extensions::Extension* extension,
837 const base::Callback<void(ImeWarningBubblePermissionStatus status)>& 837 const base::Callback<void(ImeWarningBubblePermissionStatus status)>&
838 callback) { 838 callback) {
839 NOTREACHED() << "The IME warning bubble is unsupported on this platform."; 839 NOTREACHED() << "The IME warning bubble is unsupported on this platform.";
840 } 840 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm ('k') | chrome/browser/ui/cocoa/browser_window_utils.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698