| 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 #import <objc/runtime.h> | 7 #import <objc/runtime.h> |
| 8 #include <OpenGL/gl.h> | 8 #include <OpenGL/gl.h> |
| 9 #include <QuartzCore/QuartzCore.h> | 9 #include <QuartzCore/QuartzCore.h> |
| 10 #include <stdint.h> | 10 #include <stdint.h> |
| (...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 907 #ifndef __LP64__ | 907 #ifndef __LP64__ |
| 908 bool can_compose_inline = | 908 bool can_compose_inline = |
| 909 !!GetTextInputManager()->GetActiveWidget() | 909 !!GetTextInputManager()->GetActiveWidget() |
| 910 ? GetTextInputManager()->GetTextInputState()->can_compose_inline | 910 ? GetTextInputManager()->GetTextInputState()->can_compose_inline |
| 911 : true; | 911 : true; |
| 912 UseInputWindow(TSMGetActiveDocument(), !can_compose_inline); | 912 UseInputWindow(TSMGetActiveDocument(), !can_compose_inline); |
| 913 #endif | 913 #endif |
| 914 } | 914 } |
| 915 } | 915 } |
| 916 | 916 |
| 917 void RenderWidgetHostViewMac::ImeCancelComposition() { | 917 void RenderWidgetHostViewMac::OnImeCancelComposition( |
| 918 TextInputManager* text_input_manager, |
| 919 RenderWidgetHostViewBase* updated_view) { |
| 918 [cocoa_view_ cancelComposition]; | 920 [cocoa_view_ cancelComposition]; |
| 919 } | 921 } |
| 920 | 922 |
| 921 void RenderWidgetHostViewMac::ImeCompositionRangeChanged( | 923 void RenderWidgetHostViewMac::ImeCompositionRangeChanged( |
| 922 const gfx::Range& range, | 924 const gfx::Range& range, |
| 923 const std::vector<gfx::Rect>& character_bounds) { | 925 const std::vector<gfx::Rect>& character_bounds) { |
| 924 // The RangeChanged message is only sent with valid values. The current | 926 // The RangeChanged message is only sent with valid values. The current |
| 925 // caret position (start == end) will be sent if there is no IME range. | 927 // caret position (start == end) will be sent if there is no IME range. |
| 926 [cocoa_view_ setMarkedRange:range.ToNSRange()]; | 928 [cocoa_view_ setMarkedRange:range.ToNSRange()]; |
| 927 composition_range_ = range; | 929 composition_range_ = range; |
| (...skipping 2331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3259 | 3261 |
| 3260 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding | 3262 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding |
| 3261 // regions that are not draggable. (See ControlRegionView in | 3263 // regions that are not draggable. (See ControlRegionView in |
| 3262 // native_app_window_cocoa.mm). This requires the render host view to be | 3264 // native_app_window_cocoa.mm). This requires the render host view to be |
| 3263 // draggable by default. | 3265 // draggable by default. |
| 3264 - (BOOL)mouseDownCanMoveWindow { | 3266 - (BOOL)mouseDownCanMoveWindow { |
| 3265 return YES; | 3267 return YES; |
| 3266 } | 3268 } |
| 3267 | 3269 |
| 3268 @end | 3270 @end |
| OLD | NEW |