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

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

Issue 1249013005: Merge ViewHostMsg_TextInputTypeChanged and ViewHostMsg_TextInputStateChanged into one. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits. Created 5 years, 4 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 10
(...skipping 1025 matching lines...) Expand 10 before | Expand all | Expand 10 after
1036 WebCursor web_cursor = cursor; 1036 WebCursor web_cursor = cursor;
1037 [cocoa_view_ updateCursor:web_cursor.GetNativeCursor()]; 1037 [cocoa_view_ updateCursor:web_cursor.GetNativeCursor()];
1038 } 1038 }
1039 1039
1040 void RenderWidgetHostViewMac::SetIsLoading(bool is_loading) { 1040 void RenderWidgetHostViewMac::SetIsLoading(bool is_loading) {
1041 is_loading_ = is_loading; 1041 is_loading_ = is_loading;
1042 // If we ever decide to show the waiting cursor while the page is loading 1042 // If we ever decide to show the waiting cursor while the page is loading
1043 // like Chrome does on Windows, call |UpdateCursor()| here. 1043 // like Chrome does on Windows, call |UpdateCursor()| here.
1044 } 1044 }
1045 1045
1046 void RenderWidgetHostViewMac::TextInputTypeChanged( 1046 void RenderWidgetHostViewMac::TextInputStateChanged(
1047 ui::TextInputType type, 1047 const ViewHostMsg_TextInputState_Params& params) {
1048 ui::TextInputMode input_mode, 1048 if (text_input_type_ != params.type
1049 bool can_compose_inline, 1049 || can_compose_inline_ != params.can_compose_inline) {
1050 int flags) { 1050 text_input_type_ = params.type;
1051 if (text_input_type_ != type 1051 can_compose_inline_ = params.can_compose_inline;
1052 || can_compose_inline_ != can_compose_inline) {
1053 text_input_type_ = type;
1054 can_compose_inline_ = can_compose_inline;
1055 if (HasFocus()) { 1052 if (HasFocus()) {
1056 SetTextInputActive(true); 1053 SetTextInputActive(true);
1057 1054
1058 // Let AppKit cache the new input context to make IMEs happy. 1055 // Let AppKit cache the new input context to make IMEs happy.
1059 // See http://crbug.com/73039. 1056 // See http://crbug.com/73039.
1060 [NSApp updateWindows]; 1057 [NSApp updateWindows];
1061 1058
1062 #ifndef __LP64__ 1059 #ifndef __LP64__
1063 UseInputWindow(TSMGetActiveDocument(), !can_compose_inline_); 1060 UseInputWindow(TSMGetActiveDocument(), !can_compose_inline_);
1064 #endif 1061 #endif
(...skipping 2240 matching lines...) Expand 10 before | Expand all | Expand 10 after
3305 3302
3306 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding 3303 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding
3307 // regions that are not draggable. (See ControlRegionView in 3304 // regions that are not draggable. (See ControlRegionView in
3308 // native_app_window_cocoa.mm). This requires the render host view to be 3305 // native_app_window_cocoa.mm). This requires the render host view to be
3309 // draggable by default. 3306 // draggable by default.
3310 - (BOOL)mouseDownCanMoveWindow { 3307 - (BOOL)mouseDownCanMoveWindow {
3311 return YES; 3308 return YES;
3312 } 3309 }
3313 3310
3314 @end 3311 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698