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 #import "chrome/browser/renderer_host/chrome_render_widget_host_view_mac_delegat
e.h" | 5 #import "chrome/browser/renderer_host/chrome_render_widget_host_view_mac_delegat
e.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 | 8 |
9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
10 #include "base/strings/sys_string_conversions.h" | 10 #include "base/strings/sys_string_conversions.h" |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 view_id_util::UnsetID(view); | 99 view_id_util::UnsetID(view); |
100 } | 100 } |
101 | 101 |
102 // Handle an event. All incoming key and mouse events flow through this | 102 // Handle an event. All incoming key and mouse events flow through this |
103 // delegate method if implemented. Return YES if the event is fully handled, or | 103 // delegate method if implemented. Return YES if the event is fully handled, or |
104 // NO if normal processing should take place. | 104 // NO if normal processing should take place. |
105 - (BOOL)handleEvent:(NSEvent*)event { | 105 - (BOOL)handleEvent:(NSEvent*)event { |
106 return [historySwiper_ handleEvent:event]; | 106 return [historySwiper_ handleEvent:event]; |
107 } | 107 } |
108 | 108 |
109 // Notification that a wheel event was unhandled. | 109 - (void)gotWheelEventConsumed:(BOOL)consumed { |
110 - (void)gotUnhandledWheelEvent { | 110 [historySwiper_ gotWheelEventConsumed:consumed]; |
111 [historySwiper_ gotUnhandledWheelEvent]; | |
112 } | |
113 | |
114 // Notification of scroll offset pinning. | |
115 - (void)scrollOffsetPinnedToLeft:(BOOL)left toRight:(BOOL)right { | |
116 [historySwiper_ scrollOffsetPinnedToLeft:left toRight:right]; | |
117 } | |
118 | |
119 // Notification of whether the view has a horizontal scrollbar. | |
120 - (void)setHasHorizontalScrollbar:(BOOL)has_horizontal_scrollbar { | |
121 [historySwiper_ setHasHorizontalScrollbar:has_horizontal_scrollbar]; | |
122 } | 111 } |
123 | 112 |
124 // NSWindow events. | 113 // NSWindow events. |
125 | 114 |
126 - (void)beginGestureWithEvent:(NSEvent*)event { | 115 - (void)beginGestureWithEvent:(NSEvent*)event { |
127 [historySwiper_ beginGestureWithEvent:event]; | 116 [historySwiper_ beginGestureWithEvent:event]; |
128 } | 117 } |
129 | 118 |
130 - (void)endGestureWithEvent:(NSEvent*)event { | 119 - (void)endGestureWithEvent:(NSEvent*)event { |
131 [historySwiper_ endGestureWithEvent:event]; | 120 [historySwiper_ endGestureWithEvent:event]; |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 } | 253 } |
265 | 254 |
266 - (void)spellCheckEnabled:(BOOL)enabled checked:(BOOL)checked { | 255 - (void)spellCheckEnabled:(BOOL)enabled checked:(BOOL)checked { |
267 spellcheckEnabled_ = enabled; | 256 spellcheckEnabled_ = enabled; |
268 spellcheckChecked_ = checked; | 257 spellcheckChecked_ = checked; |
269 } | 258 } |
270 | 259 |
271 // END Spellchecking methods | 260 // END Spellchecking methods |
272 | 261 |
273 @end | 262 @end |
OLD | NEW |