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/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 2861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2872 requestor = self; | 2872 requestor = self; |
2873 } else if (sendTypeIsString && returnTypeIsString && hasText && takesText) { | 2873 } else if (sendTypeIsString && returnTypeIsString && hasText && takesText) { |
2874 requestor = self; | 2874 requestor = self; |
2875 } else { | 2875 } else { |
2876 requestor = [super validRequestorForSendType:sendType | 2876 requestor = [super validRequestorForSendType:sendType |
2877 returnType:returnType]; | 2877 returnType:returnType]; |
2878 } | 2878 } |
2879 return requestor; | 2879 return requestor; |
2880 } | 2880 } |
2881 | 2881 |
| 2882 - (void)viewWillStartLiveResize { |
| 2883 [super viewWillStartLiveResize]; |
| 2884 RenderWidgetHost* widget = renderWidgetHostView_->render_widget_host_; |
| 2885 widget->Send(new ViewMsg_SetInLiveResize(widget->routing_id(), true)); |
| 2886 } |
| 2887 |
| 2888 - (void)viewDidEndLiveResize { |
| 2889 [super viewDidEndLiveResize]; |
| 2890 RenderWidgetHost* widget = renderWidgetHostView_->render_widget_host_; |
| 2891 widget->Send(new ViewMsg_SetInLiveResize(widget->routing_id(), false)); |
| 2892 } |
| 2893 |
2882 @end | 2894 @end |
2883 | 2895 |
2884 // | 2896 // |
2885 // Supporting application services | 2897 // Supporting application services |
2886 // | 2898 // |
2887 @implementation RenderWidgetHostViewCocoa(NSServicesRequests) | 2899 @implementation RenderWidgetHostViewCocoa(NSServicesRequests) |
2888 | 2900 |
2889 - (BOOL)writeSelectionToPasteboard:(NSPasteboard*)pboard | 2901 - (BOOL)writeSelectionToPasteboard:(NSPasteboard*)pboard |
2890 types:(NSArray*)types { | 2902 types:(NSArray*)types { |
2891 const std::string& str = renderWidgetHostView_->selected_text(); | 2903 const std::string& str = renderWidgetHostView_->selected_text(); |
(...skipping 11 matching lines...) Expand all Loading... |
2903 if (!string) return NO; | 2915 if (!string) return NO; |
2904 | 2916 |
2905 // If the user is currently using an IME, confirm the IME input, | 2917 // If the user is currently using an IME, confirm the IME input, |
2906 // and then insert the text from the service, the same as TextEdit and Safari. | 2918 // and then insert the text from the service, the same as TextEdit and Safari. |
2907 [self confirmComposition]; | 2919 [self confirmComposition]; |
2908 [self insertText:string]; | 2920 [self insertText:string]; |
2909 return YES; | 2921 return YES; |
2910 } | 2922 } |
2911 | 2923 |
2912 @end | 2924 @end |
OLD | NEW |