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 2216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2227 | 2227 |
2228 - (void)windowChangedGlobalFrame:(NSNotification*)notification { | 2228 - (void)windowChangedGlobalFrame:(NSNotification*)notification { |
2229 renderWidgetHostView_->UpdateScreenInfo( | 2229 renderWidgetHostView_->UpdateScreenInfo( |
2230 renderWidgetHostView_->GetNativeView()); | 2230 renderWidgetHostView_->GetNativeView()); |
2231 } | 2231 } |
2232 | 2232 |
2233 - (void)setFrameSize:(NSSize)newSize { | 2233 - (void)setFrameSize:(NSSize)newSize { |
2234 // NB: -[NSView setFrame:] calls through -setFrameSize:, so overriding | 2234 // NB: -[NSView setFrame:] calls through -setFrameSize:, so overriding |
2235 // -setFrame: isn't neccessary. | 2235 // -setFrame: isn't neccessary. |
2236 [super setFrameSize:newSize]; | 2236 [super setFrameSize:newSize]; |
2237 if (renderWidgetHostView_->render_widget_host_) | 2237 if (renderWidgetHostView_->render_widget_host_) { |
| 2238 renderWidgetHostView_->render_widget_host_->SendScreenRects(); |
2238 renderWidgetHostView_->render_widget_host_->WasResized(); | 2239 renderWidgetHostView_->render_widget_host_->WasResized(); |
| 2240 } |
2239 } | 2241 } |
2240 | 2242 |
2241 - (void)callSetNeedsDisplayInRect { | 2243 - (void)callSetNeedsDisplayInRect { |
2242 DCHECK([NSThread isMainThread]); | 2244 DCHECK([NSThread isMainThread]); |
2243 DCHECK(renderWidgetHostView_->call_set_needs_display_in_rect_pending_); | 2245 DCHECK(renderWidgetHostView_->call_set_needs_display_in_rect_pending_); |
2244 [self setNeedsDisplayInRect:renderWidgetHostView_->invalid_rect_]; | 2246 [self setNeedsDisplayInRect:renderWidgetHostView_->invalid_rect_]; |
2245 renderWidgetHostView_->call_set_needs_display_in_rect_pending_ = false; | 2247 renderWidgetHostView_->call_set_needs_display_in_rect_pending_ = false; |
2246 renderWidgetHostView_->invalid_rect_ = NSZeroRect; | 2248 renderWidgetHostView_->invalid_rect_ = NSZeroRect; |
2247 } | 2249 } |
2248 | 2250 |
(...skipping 1126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3375 if (!string) return NO; | 3377 if (!string) return NO; |
3376 | 3378 |
3377 // If the user is currently using an IME, confirm the IME input, | 3379 // If the user is currently using an IME, confirm the IME input, |
3378 // and then insert the text from the service, the same as TextEdit and Safari. | 3380 // and then insert the text from the service, the same as TextEdit and Safari. |
3379 [self confirmComposition]; | 3381 [self confirmComposition]; |
3380 [self insertText:string]; | 3382 [self insertText:string]; |
3381 return YES; | 3383 return YES; |
3382 } | 3384 } |
3383 | 3385 |
3384 @end | 3386 @end |
OLD | NEW |