| 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 #include "content/browser/renderer_host/render_widget_host_view_mac.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_mac.h" |
| 6 | 6 |
| 7 #include <QuartzCore/QuartzCore.h> | 7 #include <QuartzCore/QuartzCore.h> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 2133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2144 if (handlingGlobalFrameDidChange_) | 2144 if (handlingGlobalFrameDidChange_) |
| 2145 return; | 2145 return; |
| 2146 | 2146 |
| 2147 handlingGlobalFrameDidChange_ = YES; | 2147 handlingGlobalFrameDidChange_ = YES; |
| 2148 if (renderWidgetHostView_->compositing_iosurface_.get()) | 2148 if (renderWidgetHostView_->compositing_iosurface_.get()) |
| 2149 renderWidgetHostView_->compositing_iosurface_->GlobalFrameDidChange(); | 2149 renderWidgetHostView_->compositing_iosurface_->GlobalFrameDidChange(); |
| 2150 handlingGlobalFrameDidChange_ = NO; | 2150 handlingGlobalFrameDidChange_ = NO; |
| 2151 } | 2151 } |
| 2152 | 2152 |
| 2153 - (void)windowChangedScreen:(NSNotification*)notification { | 2153 - (void)windowChangedScreen:(NSNotification*)notification { |
| 2154 renderWidgetHostView_->UpdateScreenInfo(); | 2154 renderWidgetHostView_->UpdateScreenInfo( |
| 2155 renderWidgetHostView_->GetNativeView()); |
| 2155 } | 2156 } |
| 2156 | 2157 |
| 2157 - (void)setFrameSize:(NSSize)newSize { | 2158 - (void)setFrameSize:(NSSize)newSize { |
| 2158 // NB: -[NSView setFrame:] calls through -setFrameSize:, so overriding | 2159 // NB: -[NSView setFrame:] calls through -setFrameSize:, so overriding |
| 2159 // -setFrame: isn't neccessary. | 2160 // -setFrame: isn't neccessary. |
| 2160 [super setFrameSize:newSize]; | 2161 [super setFrameSize:newSize]; |
| 2161 if (renderWidgetHostView_->render_widget_host_) | 2162 if (renderWidgetHostView_->render_widget_host_) |
| 2162 renderWidgetHostView_->render_widget_host_->WasResized(); | 2163 renderWidgetHostView_->render_widget_host_->WasResized(); |
| 2163 } | 2164 } |
| 2164 | 2165 |
| (...skipping 1135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3300 if (!string) return NO; | 3301 if (!string) return NO; |
| 3301 | 3302 |
| 3302 // If the user is currently using an IME, confirm the IME input, | 3303 // If the user is currently using an IME, confirm the IME input, |
| 3303 // and then insert the text from the service, the same as TextEdit and Safari. | 3304 // and then insert the text from the service, the same as TextEdit and Safari. |
| 3304 [self confirmComposition]; | 3305 [self confirmComposition]; |
| 3305 [self insertText:string]; | 3306 [self insertText:string]; |
| 3306 return YES; | 3307 return YES; |
| 3307 } | 3308 } |
| 3308 | 3309 |
| 3309 @end | 3310 @end |
| OLD | NEW |