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

Side by Side Diff: chrome/browser/renderer_host/render_widget_host_view_mac.h

Issue 6289009: [Mac] Implement the system dictionary popup by implementing NSTextInput methods. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
7 #pragma once 7 #pragma once
8 8
9 #import <Cocoa/Cocoa.h> 9 #import <Cocoa/Cocoa.h>
10 #import <QuartzCore/CALayer.h> 10 #import <QuartzCore/CALayer.h>
11 11
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 // directly. 66 // directly.
67 // This object keeps the status of a composition of the renderer and returns 67 // This object keeps the status of a composition of the renderer and returns
68 // it when an input method asks for it. 68 // it when an input method asks for it.
69 // We need to implement Objective-C methods for the NSTextInput protocol. On 69 // We need to implement Objective-C methods for the NSTextInput protocol. On
70 // the other hand, we need to implement a C++ method for an IPC-message 70 // the other hand, we need to implement a C++ method for an IPC-message
71 // handler which receives input-method events from the renderer. 71 // handler which receives input-method events from the renderer.
72 72
73 // Represents the input-method attributes supported by this object. 73 // Represents the input-method attributes supported by this object.
74 scoped_nsobject<NSArray> validAttributesForMarkedText_; 74 scoped_nsobject<NSArray> validAttributesForMarkedText_;
75 75
76 // Represents the cursor position in this view coordinate.
77 // The renderer sends the cursor position through an IPC message.
78 // We save the latest cursor position here and return it when an input
79 // methods needs it.
80 NSRect caretRect_;
81
82 // Indicates if we are currently handling a key down event. 76 // Indicates if we are currently handling a key down event.
83 BOOL handlingKeyDown_; 77 BOOL handlingKeyDown_;
84 78
85 // Indicates if there is any marked text. 79 // Indicates if there is any marked text.
86 BOOL hasMarkedText_; 80 BOOL hasMarkedText_;
87 81
88 // Indicates if unmarkText is called or not when handling a keyboard 82 // Indicates if unmarkText is called or not when handling a keyboard
89 // event. 83 // event.
90 BOOL unmarkTextCalled_; 84 BOOL unmarkTextCalled_;
91 85
(...skipping 25 matching lines...) Expand all
117 111
118 // Contains edit commands received by the -doCommandBySelector: method when 112 // Contains edit commands received by the -doCommandBySelector: method when
119 // handling a key down event, not including inserting commands, eg. insertTab, 113 // handling a key down event, not including inserting commands, eg. insertTab,
120 // etc. 114 // etc.
121 EditCommands editCommands_; 115 EditCommands editCommands_;
122 116
123 // The plugin for which IME is currently enabled (-1 if not enabled). 117 // The plugin for which IME is currently enabled (-1 if not enabled).
124 int pluginImeIdentifier_; 118 int pluginImeIdentifier_;
125 } 119 }
126 120
127 @property(assign, nonatomic) NSRect caretRect;
128
129 - (void)setCanBeKeyView:(BOOL)can; 121 - (void)setCanBeKeyView:(BOOL)can;
130 - (void)setTakesFocusOnlyOnMouseDown:(BOOL)b; 122 - (void)setTakesFocusOnlyOnMouseDown:(BOOL)b;
131 - (void)setCloseOnDeactivate:(BOOL)b; 123 - (void)setCloseOnDeactivate:(BOOL)b;
132 - (void)setToolTipAtMousePoint:(NSString *)string; 124 - (void)setToolTipAtMousePoint:(NSString *)string;
133 // Set frame, then notify the RenderWidgetHost that the frame has been changed, 125 // Set frame, then notify the RenderWidgetHost that the frame has been changed,
134 // but do it in a separate task, using |performSelector:withObject:afterDelay:|. 126 // but do it in a separate task, using |performSelector:withObject:afterDelay:|.
135 // This stops the flickering issue in http://crbug.com/31970 127 // This stops the flickering issue in http://crbug.com/31970
136 - (void)setFrameWithDeferredUpdate:(NSRect)frame; 128 - (void)setFrameWithDeferredUpdate:(NSRect)frame;
137 // Notify the RenderWidgetHost that the frame was updated so it can resize 129 // Notify the RenderWidgetHost that the frame was updated so it can resize
138 // its contents. 130 // its contents.
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 357
366 // When rendering transitions from gpu to software, the gpu widget can't be 358 // When rendering transitions from gpu to software, the gpu widget can't be
367 // hidden until the software backing store has been updated. This variable is 359 // hidden until the software backing store has been updated. This variable is
368 // set when the gpu widget needs to be hidden once a paint is completed. 360 // set when the gpu widget needs to be hidden once a paint is completed.
369 bool needs_gpu_visibility_update_after_repaint_; 361 bool needs_gpu_visibility_update_after_repaint_;
370 362
371 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); 363 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac);
372 }; 364 };
373 365
374 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ 366 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698