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 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
596 // Let AppKit cache the new input context to make IMEs happy. | 596 // Let AppKit cache the new input context to make IMEs happy. |
597 // See http://crbug.com/73039. | 597 // See http://crbug.com/73039. |
598 [NSApp updateWindows]; | 598 [NSApp updateWindows]; |
599 UseInputWindow(TSMGetActiveDocument(), !can_compose_inline_); | 599 UseInputWindow(TSMGetActiveDocument(), !can_compose_inline_); |
600 } | 600 } |
601 } | 601 } |
602 } | 602 } |
603 | 603 |
604 void RenderWidgetHostViewMac::SelectionBoundsChanged( | 604 void RenderWidgetHostViewMac::SelectionBoundsChanged( |
605 const gfx::Rect& start_rect, | 605 const gfx::Rect& start_rect, |
606 const gfx::Rect& end_rect) { | 606 WebKit::WebTextDirection start_direction, |
| 607 const gfx::Rect& end_rect, |
| 608 WebKit::WebTextDirection end_direction) { |
607 if (start_rect == end_rect) | 609 if (start_rect == end_rect) |
608 caret_rect_ = start_rect; | 610 caret_rect_ = start_rect; |
609 } | 611 } |
610 | 612 |
611 void RenderWidgetHostViewMac::ImeCancelComposition() { | 613 void RenderWidgetHostViewMac::ImeCancelComposition() { |
612 [cocoa_view_ cancelComposition]; | 614 [cocoa_view_ cancelComposition]; |
613 } | 615 } |
614 | 616 |
615 void RenderWidgetHostViewMac::ImeCompositionRangeChanged( | 617 void RenderWidgetHostViewMac::ImeCompositionRangeChanged( |
616 const ui::Range& range, | 618 const ui::Range& range, |
(...skipping 2637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3254 if (!string) return NO; | 3256 if (!string) return NO; |
3255 | 3257 |
3256 // If the user is currently using an IME, confirm the IME input, | 3258 // If the user is currently using an IME, confirm the IME input, |
3257 // and then insert the text from the service, the same as TextEdit and Safari. | 3259 // and then insert the text from the service, the same as TextEdit and Safari. |
3258 [self confirmComposition]; | 3260 [self confirmComposition]; |
3259 [self insertText:string]; | 3261 [self insertText:string]; |
3260 return YES; | 3262 return YES; |
3261 } | 3263 } |
3262 | 3264 |
3263 @end | 3265 @end |
OLD | NEW |