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

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: Rebase 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 1998 matching lines...) Expand 10 before | Expand all | Expand 10 after
2009 mouse_locked_ = false; 2009 mouse_locked_ = false;
2010 2010
2011 // Unlock position of mouse cursor and unhide it. 2011 // Unlock position of mouse cursor and unhide it.
2012 CGAssociateMouseAndMouseCursorPosition(YES); 2012 CGAssociateMouseAndMouseCursorPosition(YES);
2013 [NSCursor unhide]; 2013 [NSCursor unhide];
2014 2014
2015 if (render_widget_host_) 2015 if (render_widget_host_)
2016 render_widget_host_->LostMouseLock(); 2016 render_widget_host_->LostMouseLock();
2017 } 2017 }
2018 2018
2019 void RenderWidgetHostViewMac::UnhandledWheelEvent( 2019 void RenderWidgetHostViewMac::WheelEventAck(
2020 const blink::WebMouseWheelEvent& event) { 2020 const blink::WebMouseWheelEvent& event,
2021 InputEventAckState ack_result) {
2022 if (ack_result == INPUT_EVENT_ACK_STATE_CONSUMED)
2023 return;
2024
2021 // Only record a wheel event as unhandled if JavaScript handlers got a chance 2025 // Only record a wheel event as unhandled if JavaScript handlers got a chance
2022 // to see it (no-op wheel events are ignored by the event dispatcher) 2026 // to see it (no-op wheel events are ignored by the event dispatcher)
2023 if (event.deltaX || event.deltaY) 2027 if (event.deltaX || event.deltaY)
2024 [cocoa_view_ gotUnhandledWheelEvent]; 2028 [cocoa_view_ gotUnhandledWheelEvent];
2025 } 2029 }
2026 2030
2027 bool RenderWidgetHostViewMac::Send(IPC::Message* message) { 2031 bool RenderWidgetHostViewMac::Send(IPC::Message* message) {
2028 if (render_widget_host_) 2032 if (render_widget_host_)
2029 return render_widget_host_->Send(message); 2033 return render_widget_host_->Send(message);
2030 delete message; 2034 delete message;
(...skipping 2390 matching lines...) Expand 10 before | Expand all | Expand 10 after
4421 } 4425 }
4422 4426
4423 - (void)disableRendering { 4427 - (void)disableRendering {
4424 // Disable the fade-out animation as the layer is removed. 4428 // Disable the fade-out animation as the layer is removed.
4425 ScopedCAActionDisabler disabler; 4429 ScopedCAActionDisabler disabler;
4426 [self removeFromSuperlayer]; 4430 [self removeFromSuperlayer];
4427 renderWidgetHostView_ = nil; 4431 renderWidgetHostView_ = nil;
4428 } 4432 }
4429 4433
4430 @end // implementation SoftwareLayer 4434 @end // implementation SoftwareLayer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698