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

Unified Diff: chrome/browser/ui/cocoa/browser_window_utils.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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/browser_window_utils.mm
diff --git a/chrome/browser/ui/cocoa/browser_window_utils.mm b/chrome/browser/ui/cocoa/browser_window_utils.mm
index 6a9e97fa65f30a5f390137d2613b7c2d308d45fd..6389acfb6085f8fbc6521f3bdfcd06160aa5b2fa 100644
--- a/chrome/browser/ui/cocoa/browser_window_utils.mm
+++ b/chrome/browser/ui/cocoa/browser_window_utils.mm
@@ -28,14 +28,14 @@ CGFloat GetPatternVerticalOffsetWithTabStrip(bool tabStripVisible) {
@implementation BrowserWindowUtils
+ (BOOL)shouldHandleKeyboardEvent:(const NativeWebKeyboardEvent&)event {
- if (event.skip_in_browser || event.type == NativeWebKeyboardEvent::Char)
+ if (event.skip_in_browser || event.type() == NativeWebKeyboardEvent::Char)
return NO;
DCHECK(event.os_event != NULL);
return YES;
}
+ (BOOL)isTextEditingEvent:(const content::NativeWebKeyboardEvent&)event {
- return (event.modifiers & blink::WebInputEvent::MetaKey) &&
+ return (event.modifiers() & blink::WebInputEvent::MetaKey) &&
(event.windowsKeyCode == ui::VKEY_A ||
event.windowsKeyCode == ui::VKEY_V ||
event.windowsKeyCode == ui::VKEY_C ||
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_cocoa.mm ('k') | chrome/browser/ui/cocoa/extensions/extension_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698