| OLD | NEW |
| 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 #include <QuartzCore/QuartzCore.h> | 7 #include <QuartzCore/QuartzCore.h> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1027 glMatrixMode(GL_MODELVIEW); | 1027 glMatrixMode(GL_MODELVIEW); |
| 1028 glLoadIdentity(); | 1028 glLoadIdentity(); |
| 1029 | 1029 |
| 1030 plugin_container_manager_.Draw(context, plugin_handle); | 1030 plugin_container_manager_.Draw(context, plugin_handle); |
| 1031 } | 1031 } |
| 1032 | 1032 |
| 1033 void RenderWidgetHostViewMac::ForceTextureReload() { | 1033 void RenderWidgetHostViewMac::ForceTextureReload() { |
| 1034 plugin_container_manager_.ForceTextureReload(); | 1034 plugin_container_manager_.ForceTextureReload(); |
| 1035 } | 1035 } |
| 1036 | 1036 |
| 1037 void RenderWidgetHostViewMac::UnhandledWheelEvent( | |
| 1038 const WebKit::WebMouseWheelEvent& event) { | |
| 1039 [cocoa_view_ gotUnhandledWheelEvent]; | |
| 1040 } | |
| 1041 | |
| 1042 void RenderWidgetHostViewMac::ProcessTouchAck( | 1037 void RenderWidgetHostViewMac::ProcessTouchAck( |
| 1043 WebKit::WebInputEvent::Type type, bool processed) { | 1038 WebKit::WebInputEvent::Type type, bool processed) { |
| 1044 } | 1039 } |
| 1045 | 1040 |
| 1046 void RenderWidgetHostViewMac::SetHasHorizontalScrollbar( | 1041 void RenderWidgetHostViewMac::SetHasHorizontalScrollbar( |
| 1047 bool has_horizontal_scrollbar) { | 1042 bool has_horizontal_scrollbar) { |
| 1048 [cocoa_view_ setHasHorizontalScrollbar:has_horizontal_scrollbar]; | 1043 [cocoa_view_ setHasHorizontalScrollbar:has_horizontal_scrollbar]; |
| 1049 } | 1044 } |
| 1050 | 1045 |
| 1051 void RenderWidgetHostViewMac::SetScrollOffsetPinning( | 1046 void RenderWidgetHostViewMac::SetScrollOffsetPinning( |
| (...skipping 24 matching lines...) Expand all Loading... |
| 1076 mouse_locked_ = false; | 1071 mouse_locked_ = false; |
| 1077 | 1072 |
| 1078 // Unlock position of mouse cursor and unhide it. | 1073 // Unlock position of mouse cursor and unhide it. |
| 1079 CGAssociateMouseAndMouseCursorPosition(YES); | 1074 CGAssociateMouseAndMouseCursorPosition(YES); |
| 1080 [NSCursor unhide]; | 1075 [NSCursor unhide]; |
| 1081 | 1076 |
| 1082 if (render_widget_host_) | 1077 if (render_widget_host_) |
| 1083 render_widget_host_->LostMouseLock(); | 1078 render_widget_host_->LostMouseLock(); |
| 1084 } | 1079 } |
| 1085 | 1080 |
| 1081 void RenderWidgetHostViewMac::UnhandledWheelEvent( |
| 1082 const WebKit::WebMouseWheelEvent& event) { |
| 1083 [cocoa_view_ gotUnhandledWheelEvent]; |
| 1084 } |
| 1085 |
| 1086 void RenderWidgetHostViewMac::ShutdownHost() { | 1086 void RenderWidgetHostViewMac::ShutdownHost() { |
| 1087 weak_factory_.InvalidateWeakPtrs(); | 1087 weak_factory_.InvalidateWeakPtrs(); |
| 1088 render_widget_host_->Shutdown(); | 1088 render_widget_host_->Shutdown(); |
| 1089 // Do not touch any members at this point, |this| has been deleted. | 1089 // Do not touch any members at this point, |this| has been deleted. |
| 1090 } | 1090 } |
| 1091 | 1091 |
| 1092 gfx::Rect RenderWidgetHostViewMac::GetViewCocoaBounds() const { | 1092 gfx::Rect RenderWidgetHostViewMac::GetViewCocoaBounds() const { |
| 1093 return gfx::Rect(NSRectToCGRect([cocoa_view_ bounds])); | 1093 return gfx::Rect(NSRectToCGRect([cocoa_view_ bounds])); |
| 1094 } | 1094 } |
| 1095 | 1095 |
| (...skipping 1681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2777 if (!string) return NO; | 2777 if (!string) return NO; |
| 2778 | 2778 |
| 2779 // If the user is currently using an IME, confirm the IME input, | 2779 // If the user is currently using an IME, confirm the IME input, |
| 2780 // and then insert the text from the service, the same as TextEdit and Safari. | 2780 // and then insert the text from the service, the same as TextEdit and Safari. |
| 2781 [self confirmComposition]; | 2781 [self confirmComposition]; |
| 2782 [self insertText:string]; | 2782 [self insertText:string]; |
| 2783 return YES; | 2783 return YES; |
| 2784 } | 2784 } |
| 2785 | 2785 |
| 2786 @end | 2786 @end |
| OLD | NEW |