OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <QuartzCore/QuartzCore.h> | 5 #include <QuartzCore/QuartzCore.h> |
6 | 6 |
7 #include "chrome/browser/renderer_host/render_widget_host_view_mac.h" | 7 #include "chrome/browser/renderer_host/render_widget_host_view_mac.h" |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/mac/scoped_cftyperef.h" | 10 #include "base/mac/scoped_cftyperef.h" |
(...skipping 2482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2493 requestor = self; | 2493 requestor = self; |
2494 } else if (sendTypeIsString && returnTypeIsString && hasText && takesText) { | 2494 } else if (sendTypeIsString && returnTypeIsString && hasText && takesText) { |
2495 requestor = self; | 2495 requestor = self; |
2496 } else { | 2496 } else { |
2497 requestor = [super validRequestorForSendType:sendType | 2497 requestor = [super validRequestorForSendType:sendType |
2498 returnType:returnType]; | 2498 returnType:returnType]; |
2499 } | 2499 } |
2500 return requestor; | 2500 return requestor; |
2501 } | 2501 } |
2502 | 2502 |
| 2503 - (void)viewWillStartLiveResize { |
| 2504 [super viewWillStartLiveResize]; |
| 2505 RenderWidgetHost* widget = renderWidgetHostView_->render_widget_host_; |
| 2506 widget->Send(new ViewMsg_SetInLiveResize(widget->routing_id(), true)); |
| 2507 } |
| 2508 |
| 2509 - (void)viewDidEndLiveResize { |
| 2510 [super viewDidEndLiveResize]; |
| 2511 RenderWidgetHost* widget = renderWidgetHostView_->render_widget_host_; |
| 2512 widget->Send(new ViewMsg_SetInLiveResize(widget->routing_id(), false)); |
| 2513 } |
| 2514 |
2503 @end | 2515 @end |
2504 | 2516 |
2505 // | 2517 // |
2506 // Supporting application services | 2518 // Supporting application services |
2507 // | 2519 // |
2508 @implementation RenderWidgetHostViewCocoa(NSServicesRequests) | 2520 @implementation RenderWidgetHostViewCocoa(NSServicesRequests) |
2509 | 2521 |
2510 - (BOOL)writeSelectionToPasteboard:(NSPasteboard*)pboard | 2522 - (BOOL)writeSelectionToPasteboard:(NSPasteboard*)pboard |
2511 types:(NSArray*)types { | 2523 types:(NSArray*)types { |
2512 const std::string& str = renderWidgetHostView_->selected_text(); | 2524 const std::string& str = renderWidgetHostView_->selected_text(); |
(...skipping 11 matching lines...) Expand all Loading... |
2524 if (!string) return NO; | 2536 if (!string) return NO; |
2525 | 2537 |
2526 // If the user is currently using an IME, confirm the IME input, | 2538 // If the user is currently using an IME, confirm the IME input, |
2527 // and then insert the text from the service, the same as TextEdit and Safari. | 2539 // and then insert the text from the service, the same as TextEdit and Safari. |
2528 [self confirmComposition]; | 2540 [self confirmComposition]; |
2529 [self insertText:string]; | 2541 [self insertText:string]; |
2530 return YES; | 2542 return YES; |
2531 } | 2543 } |
2532 | 2544 |
2533 @end | 2545 @end |
OLD | NEW |