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 <QuartzCore/QuartzCore.h> | 8 #include <QuartzCore/QuartzCore.h> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
945 WebCursor web_cursor = cursor; | 945 WebCursor web_cursor = cursor; |
946 [cocoa_view_ updateCursor:web_cursor.GetNativeCursor()]; | 946 [cocoa_view_ updateCursor:web_cursor.GetNativeCursor()]; |
947 } | 947 } |
948 | 948 |
949 void RenderWidgetHostViewMac::SetIsLoading(bool is_loading) { | 949 void RenderWidgetHostViewMac::SetIsLoading(bool is_loading) { |
950 is_loading_ = is_loading; | 950 is_loading_ = is_loading; |
951 // If we ever decide to show the waiting cursor while the page is loading | 951 // If we ever decide to show the waiting cursor while the page is loading |
952 // like Chrome does on Windows, call |UpdateCursor()| here. | 952 // like Chrome does on Windows, call |UpdateCursor()| here. |
953 } | 953 } |
954 | 954 |
955 void RenderWidgetHostViewMac::TextInputTypeChanged( | 955 void RenderWidgetHostViewMac::TextInputStateChanged( |
956 ui::TextInputType type, | 956 const ViewHostMsg_TextInputState_Params& params) { |
957 ui::TextInputMode input_mode, | 957 if (text_input_type_ != params.type || |
958 bool can_compose_inline) { | 958 can_compose_inline_ != params.can_compose_inline) { |
959 if (text_input_type_ != type | 959 text_input_type_ = params.type; |
960 || can_compose_inline_ != can_compose_inline) { | 960 can_compose_inline_ = params.can_compose_inline; |
961 text_input_type_ = type; | |
962 can_compose_inline_ = can_compose_inline; | |
963 if (HasFocus()) { | 961 if (HasFocus()) { |
964 SetTextInputActive(true); | 962 SetTextInputActive(true); |
965 | 963 |
966 // Let AppKit cache the new input context to make IMEs happy. | 964 // Let AppKit cache the new input context to make IMEs happy. |
967 // See http://crbug.com/73039. | 965 // See http://crbug.com/73039. |
968 [NSApp updateWindows]; | 966 [NSApp updateWindows]; |
969 | 967 |
970 #ifndef __LP64__ | 968 #ifndef __LP64__ |
971 UseInputWindow(TSMGetActiveDocument(), !can_compose_inline_); | 969 UseInputWindow(TSMGetActiveDocument(), !can_compose_inline_); |
972 #endif | 970 #endif |
(...skipping 2953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3926 | 3924 |
3927 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding | 3925 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding |
3928 // regions that are not draggable. (See ControlRegionView in | 3926 // regions that are not draggable. (See ControlRegionView in |
3929 // native_app_window_cocoa.mm). This requires the render host view to be | 3927 // native_app_window_cocoa.mm). This requires the render host view to be |
3930 // draggable by default. | 3928 // draggable by default. |
3931 - (BOOL)mouseDownCanMoveWindow { | 3929 - (BOOL)mouseDownCanMoveWindow { |
3932 return YES; | 3930 return YES; |
3933 } | 3931 } |
3934 | 3932 |
3935 @end | 3933 @end |
OLD | NEW |