Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(134)

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_mac.mm

Issue 1652483002: Browser Side Text Input State Tracking for OOPIF. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 998 matching lines...) Expand 10 before | Expand all | Expand 10 after
1009 WebCursor web_cursor = cursor; 1009 WebCursor web_cursor = cursor;
1010 [cocoa_view_ updateCursor:web_cursor.GetNativeCursor()]; 1010 [cocoa_view_ updateCursor:web_cursor.GetNativeCursor()];
1011 } 1011 }
1012 1012
1013 void RenderWidgetHostViewMac::SetIsLoading(bool is_loading) { 1013 void RenderWidgetHostViewMac::SetIsLoading(bool is_loading) {
1014 is_loading_ = is_loading; 1014 is_loading_ = is_loading;
1015 // If we ever decide to show the waiting cursor while the page is loading 1015 // If we ever decide to show the waiting cursor while the page is loading
1016 // like Chrome does on Windows, call |UpdateCursor()| here. 1016 // like Chrome does on Windows, call |UpdateCursor()| here.
1017 } 1017 }
1018 1018
1019 void RenderWidgetHostViewMac::TextInputStateChanged( 1019 void RenderWidgetHostViewMac::NotifyTextInputStateChanged() {
1020 const ViewHostMsg_TextInputState_Params& params) { 1020 RenderWidgetHostViewBase::NotifyTextInputStateChanged();
1021 if (text_input_type_ != params.type
1022 || can_compose_inline_ != params.can_compose_inline) {
1023 text_input_type_ = params.type;
1024 can_compose_inline_ = params.can_compose_inline;
1025 if (HasFocus()) {
1026 SetTextInputActive(true);
1027 1021
1028 // Let AppKit cache the new input context to make IMEs happy. 1022 if (HasFocus()) {
1029 // See http://crbug.com/73039. 1023 SetTextInputActive(true);
1030 [NSApp updateWindows]; 1024
1025 // Let AppKit cache the new input context to make IMEs happy.
1026 // See http://crbug.com/73039.
1027 [NSApp updateWindows];
1031 1028
1032 #ifndef __LP64__ 1029 #ifndef __LP64__
1033 UseInputWindow(TSMGetActiveDocument(), !can_compose_inline_); 1030 UseInputWindow(TSMGetActiveDocument(),
1031 !GetCurrentTextInputState()->can_compose_inline_);
kenrb 2016/02/01 20:12:43 Wrong method name? (Related, you might want to run
EhsanK 2016/02/12 15:47:00 Done. Sorry for this. I did run this on all _rel_
1034 #endif 1032 #endif
1035 }
1036 }
1037 } 1033 }
1038 1034
1039 void RenderWidgetHostViewMac::ImeCancelComposition() { 1035 void RenderWidgetHostViewMac::ImeCancelComposition() {
1040 [cocoa_view_ cancelComposition]; 1036 [cocoa_view_ cancelComposition];
1041 } 1037 }
1042 1038
1043 void RenderWidgetHostViewMac::ImeCompositionRangeChanged( 1039 void RenderWidgetHostViewMac::ImeCompositionRangeChanged(
1044 const gfx::Range& range, 1040 const gfx::Range& range,
1045 const std::vector<gfx::Rect>& character_bounds) { 1041 const std::vector<gfx::Rect>& character_bounds) {
1046 // The RangeChanged message is only sent with valid values. The current 1042 // The RangeChanged message is only sent with valid values. The current
(...skipping 2397 matching lines...) Expand 10 before | Expand all | Expand 10 after
3444 3440
3445 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding 3441 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding
3446 // regions that are not draggable. (See ControlRegionView in 3442 // regions that are not draggable. (See ControlRegionView in
3447 // native_app_window_cocoa.mm). This requires the render host view to be 3443 // native_app_window_cocoa.mm). This requires the render host view to be
3448 // draggable by default. 3444 // draggable by default.
3449 - (BOOL)mouseDownCanMoveWindow { 3445 - (BOOL)mouseDownCanMoveWindow {
3450 return YES; 3446 return YES;
3451 } 3447 }
3452 3448
3453 @end 3449 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698