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 - (void)gotWheelEventConsumed:(BOOL)consumed { | 109 // Notification that a wheel event was unhandled. |
110 [historySwiper_ gotWheelEventConsumed:consumed]; | 110 - (void)gotUnhandledWheelEvent { |
| 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]; |
111 } | 122 } |
112 | 123 |
113 // NSWindow events. | 124 // NSWindow events. |
114 | 125 |
115 - (void)beginGestureWithEvent:(NSEvent*)event { | 126 - (void)beginGestureWithEvent:(NSEvent*)event { |
116 [historySwiper_ beginGestureWithEvent:event]; | 127 [historySwiper_ beginGestureWithEvent:event]; |
117 } | 128 } |
118 | 129 |
119 - (void)endGestureWithEvent:(NSEvent*)event { | 130 - (void)endGestureWithEvent:(NSEvent*)event { |
120 [historySwiper_ endGestureWithEvent:event]; | 131 [historySwiper_ endGestureWithEvent:event]; |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 } | 264 } |
254 | 265 |
255 - (void)spellCheckEnabled:(BOOL)enabled checked:(BOOL)checked { | 266 - (void)spellCheckEnabled:(BOOL)enabled checked:(BOOL)checked { |
256 spellcheckEnabled_ = enabled; | 267 spellcheckEnabled_ = enabled; |
257 spellcheckChecked_ = checked; | 268 spellcheckChecked_ = checked; |
258 } | 269 } |
259 | 270 |
260 // END Spellchecking methods | 271 // END Spellchecking methods |
261 | 272 |
262 @end | 273 @end |
OLD | NEW |