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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_mac.mm

Issue 291003002: Move OverscrollController to RenderWidgetHostViewAura (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
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 "content/browser/renderer_host/render_widget_host_view_mac.h" 5 #include "content/browser/renderer_host/render_widget_host_view_mac.h"
6 6
7 #import <objc/runtime.h> 7 #import <objc/runtime.h>
8 #include <QuartzCore/QuartzCore.h> 8 #include <QuartzCore/QuartzCore.h>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 2002 matching lines...) Expand 10 before | Expand all | Expand 10 after
2013 mouse_locked_ = false; 2013 mouse_locked_ = false;
2014 2014
2015 // Unlock position of mouse cursor and unhide it. 2015 // Unlock position of mouse cursor and unhide it.
2016 CGAssociateMouseAndMouseCursorPosition(YES); 2016 CGAssociateMouseAndMouseCursorPosition(YES);
2017 [NSCursor unhide]; 2017 [NSCursor unhide];
2018 2018
2019 if (render_widget_host_) 2019 if (render_widget_host_)
2020 render_widget_host_->LostMouseLock(); 2020 render_widget_host_->LostMouseLock();
2021 } 2021 }
2022 2022
2023 void RenderWidgetHostViewMac::UnhandledWheelEvent( 2023 void RenderWidgetHostViewMac::WheelEventAck(
2024 const blink::WebMouseWheelEvent& event) { 2024 const blink::WebMouseWheelEvent& event,
2025 InputEventAckState ack_result) {
2026 if (ack_result == INPUT_EVENT_ACK_STATE_CONSUMED)
2027 return;
2028
2025 // Only record a wheel event as unhandled if JavaScript handlers got a chance 2029 // Only record a wheel event as unhandled if JavaScript handlers got a chance
2026 // to see it (no-op wheel events are ignored by the event dispatcher) 2030 // to see it (no-op wheel events are ignored by the event dispatcher)
2027 if (event.deltaX || event.deltaY) 2031 if (event.deltaX || event.deltaY)
2028 [cocoa_view_ gotUnhandledWheelEvent]; 2032 [cocoa_view_ gotUnhandledWheelEvent];
2029 } 2033 }
2030 2034
2031 bool RenderWidgetHostViewMac::Send(IPC::Message* message) { 2035 bool RenderWidgetHostViewMac::Send(IPC::Message* message) {
2032 if (render_widget_host_) 2036 if (render_widget_host_)
2033 return render_widget_host_->Send(message); 2037 return render_widget_host_->Send(message);
2034 delete message; 2038 delete message;
(...skipping 2390 matching lines...) Expand 10 before | Expand all | Expand 10 after
4425 } 4429 }
4426 4430
4427 - (void)disableRendering { 4431 - (void)disableRendering {
4428 // Disable the fade-out animation as the layer is removed. 4432 // Disable the fade-out animation as the layer is removed.
4429 ScopedCAActionDisabler disabler; 4433 ScopedCAActionDisabler disabler;
4430 [self removeFromSuperlayer]; 4434 [self removeFromSuperlayer];
4431 renderWidgetHostView_ = nil; 4435 renderWidgetHostView_ = nil;
4432 } 4436 }
4433 4437
4434 @end // implementation SoftwareLayer 4438 @end // implementation SoftwareLayer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698