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

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

Issue 1914603002: Replace ViewHostMsg_TextInputState_Params with content::TextInputState. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing Comments Created 4 years, 8 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 #import "content/browser/renderer_host/render_widget_host_view_mac_dictionary_he lper.h" 50 #import "content/browser/renderer_host/render_widget_host_view_mac_dictionary_he lper.h"
51 #import "content/browser/renderer_host/render_widget_host_view_mac_editcommand_h elper.h" 51 #import "content/browser/renderer_host/render_widget_host_view_mac_editcommand_h elper.h"
52 #include "content/browser/renderer_host/render_widget_resize_helper_mac.h" 52 #include "content/browser/renderer_host/render_widget_resize_helper_mac.h"
53 #include "content/browser/renderer_host/resize_lock.h" 53 #include "content/browser/renderer_host/resize_lock.h"
54 #import "content/browser/renderer_host/text_input_client_mac.h" 54 #import "content/browser/renderer_host/text_input_client_mac.h"
55 #include "content/common/accessibility_messages.h" 55 #include "content/common/accessibility_messages.h"
56 #include "content/common/edit_command.h" 56 #include "content/common/edit_command.h"
57 #include "content/common/input/input_event_utils.h" 57 #include "content/common/input/input_event_utils.h"
58 #include "content/common/input_messages.h" 58 #include "content/common/input_messages.h"
59 #include "content/common/site_isolation_policy.h" 59 #include "content/common/site_isolation_policy.h"
60 #include "content/common/text_input_state.h"
60 #include "content/common/view_messages.h" 61 #include "content/common/view_messages.h"
61 #include "content/public/browser/browser_context.h" 62 #include "content/public/browser/browser_context.h"
62 #include "content/public/browser/browser_plugin_guest_manager.h" 63 #include "content/public/browser/browser_plugin_guest_manager.h"
63 #include "content/public/browser/browser_thread.h" 64 #include "content/public/browser/browser_thread.h"
64 #include "content/public/browser/native_web_keyboard_event.h" 65 #include "content/public/browser/native_web_keyboard_event.h"
65 #include "content/public/browser/render_widget_host_view_frame_subscriber.h" 66 #include "content/public/browser/render_widget_host_view_frame_subscriber.h"
66 #import "content/public/browser/render_widget_host_view_mac_delegate.h" 67 #import "content/public/browser/render_widget_host_view_mac_delegate.h"
67 #include "content/public/browser/web_contents.h" 68 #include "content/public/browser/web_contents.h"
68 #include "gpu/ipc/common/gpu_messages.h" 69 #include "gpu/ipc/common/gpu_messages.h"
69 #include "skia/ext/platform_canvas.h" 70 #include "skia/ext/platform_canvas.h"
(...skipping 977 matching lines...) Expand 10 before | Expand all | Expand 10 after
1047 [cocoa_view_ updateCursor:web_cursor.GetNativeCursor()]; 1048 [cocoa_view_ updateCursor:web_cursor.GetNativeCursor()];
1048 } 1049 }
1049 1050
1050 void RenderWidgetHostViewMac::SetIsLoading(bool is_loading) { 1051 void RenderWidgetHostViewMac::SetIsLoading(bool is_loading) {
1051 is_loading_ = is_loading; 1052 is_loading_ = is_loading;
1052 // If we ever decide to show the waiting cursor while the page is loading 1053 // If we ever decide to show the waiting cursor while the page is loading
1053 // like Chrome does on Windows, call |UpdateCursor()| here. 1054 // like Chrome does on Windows, call |UpdateCursor()| here.
1054 } 1055 }
1055 1056
1056 void RenderWidgetHostViewMac::TextInputStateChanged( 1057 void RenderWidgetHostViewMac::TextInputStateChanged(
1057 const ViewHostMsg_TextInputState_Params& params) { 1058 const TextInputState& params) {
1058 if (text_input_type_ != params.type 1059 if (text_input_type_ != params.type
1059 || can_compose_inline_ != params.can_compose_inline) { 1060 || can_compose_inline_ != params.can_compose_inline) {
1060 text_input_type_ = params.type; 1061 text_input_type_ = params.type;
1061 can_compose_inline_ = params.can_compose_inline; 1062 can_compose_inline_ = params.can_compose_inline;
1062 if (HasFocus()) { 1063 if (HasFocus()) {
1063 SetTextInputActive(true); 1064 SetTextInputActive(true);
1064 1065
1065 // Let AppKit cache the new input context to make IMEs happy. 1066 // Let AppKit cache the new input context to make IMEs happy.
1066 // See http://crbug.com/73039. 1067 // See http://crbug.com/73039.
1067 [NSApp updateWindows]; 1068 [NSApp updateWindows];
(...skipping 2371 matching lines...) Expand 10 before | Expand all | Expand 10 after
3439 3440
3440 // "-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
3441 // regions that are not draggable. (See ControlRegionView in 3442 // regions that are not draggable. (See ControlRegionView in
3442 // 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
3443 // draggable by default. 3444 // draggable by default.
3444 - (BOOL)mouseDownCanMoveWindow { 3445 - (BOOL)mouseDownCanMoveWindow {
3445 return YES; 3446 return YES;
3446 } 3447 }
3447 3448
3448 @end 3449 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698