diff --git a/atom/browser/common_web_contents_delegate_views.cc b/atom/browser/common_web_contents_delegate_views.cc index efea8829424a..0b8bba66424a 100644 --- a/atom/browser/common_web_contents_delegate_views.cc +++ b/atom/browser/common_web_contents_delegate_views.cc @@ -19,7 +19,7 @@ void CommonWebContentsDelegate::HandleKeyboardEvent( content::WebContents* source, const content::NativeWebKeyboardEvent& event) { // Escape exits tabbed fullscreen mode. - if (event.windowsKeyCode == ui::VKEY_ESCAPE && is_html_fullscreen()) + if (event.windows_key_code == ui::VKEY_ESCAPE && is_html_fullscreen()) ExitFullscreenModeForTab(source); // Let the NativeWindow handle other parts. diff --git a/atom/browser/native_window_views.cc b/atom/browser/native_window_views.cc index 94e2f09c964a..0e9a70b6f0a7 100644 --- a/atom/browser/native_window_views.cc +++ b/atom/browser/native_window_views.cc @@ -82,17 +82,17 @@ void FlipWindowStyle(HWND handle, bool on, DWORD flag) { #endif bool IsAltKey(const content::NativeWebKeyboardEvent& event) { - return event.windowsKeyCode == ui::VKEY_MENU; + return event.windows_key_code == ui::VKEY_MENU; } bool IsAltModifier(const content::NativeWebKeyboardEvent& event) { typedef content::NativeWebKeyboardEvent::Modifiers Modifiers; - int modifiers = event.modifiers(); - modifiers &= ~Modifiers::NumLockOn; - modifiers &= ~Modifiers::CapsLockOn; - return (modifiers == Modifiers::AltKey) || - (modifiers == (Modifiers::AltKey | Modifiers::IsLeft)) || - (modifiers == (Modifiers::AltKey | Modifiers::IsRight)); + int modifiers = event.GetModifiers(); + modifiers &= ~Modifiers::kNumLockOn; + modifiers &= ~Modifiers::kCapsLockOn; + return (modifiers == Modifiers::kAltKey) || + (modifiers == (Modifiers::kAltKey | Modifiers::kIsLeft)) || + (modifiers == (Modifiers::kAltKey | Modifiers::kIsRight)); } #if defined(USE_X11) @@ -1252,15 +1252,15 @@ void NativeWindowViews::HandleKeyboardEvent( // Show accelerator when "Alt" is pressed. if (menu_bar_visible_ && IsAltKey(event)) menu_bar_->SetAcceleratorVisibility( - event.type() == blink::WebInputEvent::RawKeyDown); + event.GetType() == blink::WebInputEvent::kRawKeyDown); // Show the submenu when "Alt+Key" is pressed. - if (event.type() == blink::WebInputEvent::RawKeyDown && !IsAltKey(event) && - IsAltModifier(event)) { + if (event.GetType() == blink::WebInputEvent::kRawKeyDown && + !IsAltKey(event) && IsAltModifier(event)) { if (!menu_bar_visible_ && - (menu_bar_->GetAcceleratorIndex(event.windowsKeyCode) != -1)) + (menu_bar_->GetAcceleratorIndex(event.windows_key_code) != -1)) SetMenuBarVisibility(true); - menu_bar_->ActivateAccelerator(event.windowsKeyCode); + menu_bar_->ActivateAccelerator(event.windows_key_code); return; } @@ -1268,10 +1268,10 @@ void NativeWindowViews::HandleKeyboardEvent( return; // Toggle the menu bar only when a single Alt is released. - if (event.type() == blink::WebInputEvent::RawKeyDown && IsAltKey(event)) { + if (event.GetType() == blink::WebInputEvent::kRawKeyDown && IsAltKey(event)) { // When a single Alt is pressed: menu_bar_alt_pressed_ = true; - } else if (event.type() == blink::WebInputEvent::KeyUp && IsAltKey(event) && + } else if (event.GetType() == blink::WebInputEvent::kKeyUp && IsAltKey(event) && menu_bar_alt_pressed_) { // When a single Alt is released right after a Alt is pressed: menu_bar_alt_pressed_ = false; diff --git a/atom/browser/ui/views/autofill_popup_view.cc b/atom/browser/ui/views/autofill_popup_view.cc index 5c333b2f57da..6050b9eec766 100644 --- a/atom/browser/ui/views/autofill_popup_view.cc +++ b/atom/browser/ui/views/autofill_popup_view.cc @@ -358,7 +358,7 @@ bool AutofillPopupView::HandleKeyPressEvent( const content::NativeWebKeyboardEvent& event) { if (!popup_) return false; - switch (event.windowsKeyCode) { + switch (event.windows_key_code) { case ui::VKEY_UP: SelectPreviousLine(); return true; diff --git a/atom/common/native_mate_converters/blink_converter.cc b/atom/common/native_mate_converters/blink_converter.cc index 8aff33481a44..70b6e6d69712 100644 --- a/atom/common/native_mate_converters/blink_converter.cc +++ b/atom/common/native_mate_converters/blink_converter.cc @@ -290,7 +290,7 @@ bool Converter::FromV8( bool can_scroll = true; if (dict.Get("canScroll", &can_scroll) && !can_scroll) { out->has_precise_scrolling_deltas = false; - out->setModifiers(out->GetModifiers() & ~blink::WebInputEvent::ControlKey); + out->SetModifiers(out->GetModifiers() & ~blink::WebInputEvent::kControlKey); } #endif return true;