OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "chrome/browser/renderer_host/render_widget_host_view_mac.h" | 5 #include "chrome/browser/renderer_host/render_widget_host_view_mac.h" |
6 | 6 |
7 #include "base/histogram.h" | 7 #include "base/histogram.h" |
8 #include "base/sys_string_conversions.h" | 8 #include "base/sys_string_conversions.h" |
9 #include "chrome/browser/browser_trial.h" | 9 #include "chrome/browser/browser_trial.h" |
10 #include "chrome/browser/renderer_host/backing_store.h" | 10 #include "chrome/browser/renderer_host/backing_store.h" |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 // Clamp the tooltip length to kMaxTooltipLength. It's a DOS issue on | 201 // Clamp the tooltip length to kMaxTooltipLength. It's a DOS issue on |
202 // Windows; we're just trying to be polite. | 202 // Windows; we're just trying to be polite. |
203 if (tooltip_text_.length() > kMaxTooltipLength) | 203 if (tooltip_text_.length() > kMaxTooltipLength) |
204 tooltip_text_ = tooltip_text_.substr(0, kMaxTooltipLength); | 204 tooltip_text_ = tooltip_text_.substr(0, kMaxTooltipLength); |
205 | 205 |
206 NSString* tooltip_nsstring = base::SysWideToNSString(tooltip_text_); | 206 NSString* tooltip_nsstring = base::SysWideToNSString(tooltip_text_); |
207 [cocoa_view_ setToolTip:tooltip_nsstring]; | 207 [cocoa_view_ setToolTip:tooltip_nsstring]; |
208 } | 208 } |
209 } | 209 } |
210 | 210 |
| 211 BackingStore* RenderWidgetHostViewMac::AllocBackingStore( |
| 212 const gfx::Size& size) { |
| 213 return new BackingStore(size); |
| 214 } |
| 215 |
211 void RenderWidgetHostViewMac::ShutdownHost() { | 216 void RenderWidgetHostViewMac::ShutdownHost() { |
212 render_widget_host_->Shutdown(); | 217 render_widget_host_->Shutdown(); |
213 // Do not touch any members at this point, |this| has been deleted. | 218 // Do not touch any members at this point, |this| has been deleted. |
214 } | 219 } |
215 | 220 |
216 @implementation RenderWidgetHostViewCocoa | 221 @implementation RenderWidgetHostViewCocoa |
217 | 222 |
218 // Tons of stuff goes here, where we grab events going on in Cocoaland and send | 223 // Tons of stuff goes here, where we grab events going on in Cocoaland and send |
219 // them into the C++ system. TODO(avi): all that jazz | 224 // them into the C++ system. TODO(avi): all that jazz |
220 | 225 |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 return YES; | 338 return YES; |
334 } | 339 } |
335 | 340 |
336 - (BOOL)resignFirstResponder { | 341 - (BOOL)resignFirstResponder { |
337 renderWidgetHostView_->render_widget_host()->Blur(); | 342 renderWidgetHostView_->render_widget_host()->Blur(); |
338 | 343 |
339 return YES; | 344 return YES; |
340 } | 345 } |
341 | 346 |
342 @end | 347 @end |
OLD | NEW |