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

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: DCHECK_GE Created 6 years, 6 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 2009 matching lines...) Expand 10 before | Expand all | Expand 10 after
2020 mouse_locked_ = false; 2020 mouse_locked_ = false;
2021 2021
2022 // Unlock position of mouse cursor and unhide it. 2022 // Unlock position of mouse cursor and unhide it.
2023 CGAssociateMouseAndMouseCursorPosition(YES); 2023 CGAssociateMouseAndMouseCursorPosition(YES);
2024 [NSCursor unhide]; 2024 [NSCursor unhide];
2025 2025
2026 if (render_widget_host_) 2026 if (render_widget_host_)
2027 render_widget_host_->LostMouseLock(); 2027 render_widget_host_->LostMouseLock();
2028 } 2028 }
2029 2029
2030 void RenderWidgetHostViewMac::UnhandledWheelEvent( 2030 void RenderWidgetHostViewMac::WheelEventAck(
2031 const blink::WebMouseWheelEvent& event) { 2031 const blink::WebMouseWheelEvent& event,
2032 InputEventAckState ack_result) {
2033 if (ack_result == INPUT_EVENT_ACK_STATE_CONSUMED)
2034 return;
2035
2032 // Only record a wheel event as unhandled if JavaScript handlers got a chance 2036 // Only record a wheel event as unhandled if JavaScript handlers got a chance
2033 // to see it (no-op wheel events are ignored by the event dispatcher) 2037 // to see it (no-op wheel events are ignored by the event dispatcher)
2034 if (event.deltaX || event.deltaY) 2038 if (event.deltaX || event.deltaY)
2035 [cocoa_view_ gotUnhandledWheelEvent]; 2039 [cocoa_view_ gotUnhandledWheelEvent];
2036 } 2040 }
2037 2041
2038 bool RenderWidgetHostViewMac::Send(IPC::Message* message) { 2042 bool RenderWidgetHostViewMac::Send(IPC::Message* message) {
2039 if (render_widget_host_) 2043 if (render_widget_host_)
2040 return render_widget_host_->Send(message); 2044 return render_widget_host_->Send(message);
2041 delete message; 2045 delete message;
(...skipping 2338 matching lines...) Expand 10 before | Expand all | Expand 10 after
4380 4384
4381 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding 4385 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding
4382 // regions that are not draggable. (See ControlRegionView in 4386 // regions that are not draggable. (See ControlRegionView in
4383 // native_app_window_cocoa.mm). This requires the render host view to be 4387 // native_app_window_cocoa.mm). This requires the render host view to be
4384 // draggable by default. 4388 // draggable by default.
4385 - (BOOL)mouseDownCanMoveWindow { 4389 - (BOOL)mouseDownCanMoveWindow {
4386 return YES; 4390 return YES;
4387 } 4391 }
4388 4392
4389 @end 4393 @end
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_mac.h ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698