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

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

Issue 6259013: Update Mac plugin IME handling to match updated spec (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to trunk 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) 2006-2008 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>
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 113
114 // Indicates if doCommandBySelector method receives any edit command when 114 // Indicates if doCommandBySelector method receives any edit command when
115 // handling a key down event. 115 // handling a key down event.
116 BOOL hasEditCommands_; 116 BOOL hasEditCommands_;
117 117
118 // Contains edit commands received by the -doCommandBySelector: method when 118 // Contains edit commands received by the -doCommandBySelector: method when
119 // handling a key down event, not including inserting commands, eg. insertTab, 119 // handling a key down event, not including inserting commands, eg. insertTab,
120 // etc. 120 // etc.
121 EditCommands editCommands_; 121 EditCommands editCommands_;
122 122
123 // The plugin for which IME is currently enabled (-1 if not enabled). 123 // The plugin that currently has focus (-1 if no plugin has focus).
124 int pluginImeIdentifier_; 124 int focusedPluginIdentifier_;
125
126 // Whether or not plugin IME is currently enabled active.
127 BOOL pluginImeActive_;
125 } 128 }
126 129
127 @property(assign, nonatomic) NSRect caretRect; 130 @property(assign, nonatomic) NSRect caretRect;
128 131
129 - (void)setCanBeKeyView:(BOOL)can; 132 - (void)setCanBeKeyView:(BOOL)can;
130 - (void)setTakesFocusOnlyOnMouseDown:(BOOL)b; 133 - (void)setTakesFocusOnlyOnMouseDown:(BOOL)b;
131 - (void)setCloseOnDeactivate:(BOOL)b; 134 - (void)setCloseOnDeactivate:(BOOL)b;
132 - (void)setToolTipAtMousePoint:(NSString *)string; 135 - (void)setToolTipAtMousePoint:(NSString *)string;
133 // Set frame, then notify the RenderWidgetHost that the frame has been changed, 136 // Set frame, then notify the RenderWidgetHost that the frame has been changed,
134 // but do it in a separate task, using |performSelector:withObject:afterDelay:|. 137 // but do it in a separate task, using |performSelector:withObject:afterDelay:|.
135 // This stops the flickering issue in http://crbug.com/31970 138 // This stops the flickering issue in http://crbug.com/31970
136 - (void)setFrameWithDeferredUpdate:(NSRect)frame; 139 - (void)setFrameWithDeferredUpdate:(NSRect)frame;
137 // Notify the RenderWidgetHost that the frame was updated so it can resize 140 // Notify the RenderWidgetHost that the frame was updated so it can resize
138 // its contents. 141 // its contents.
139 - (void)renderWidgetHostWasResized; 142 - (void)renderWidgetHostWasResized;
140 // Cancel ongoing composition (abandon the marked text). 143 // Cancel ongoing composition (abandon the marked text).
141 - (void)cancelComposition; 144 - (void)cancelComposition;
142 // Confirm ongoing composition. 145 // Confirm ongoing composition.
143 - (void)confirmComposition; 146 - (void)confirmComposition;
144 // Enables or disables plugin IME for the given plugin. 147 // Enables or disables plugin IME.
145 - (void)setPluginImeEnabled:(BOOL)enabled forPlugin:(int)pluginId; 148 - (void)setPluginImeActive:(BOOL)active;
149 // Updates the current plugin focus state.
150 - (void)pluginFocusChanged:(BOOL)focused forPlugin:(int)pluginId;
146 // Evaluates the event in the context of plugin IME, if plugin IME is enabled. 151 // Evaluates the event in the context of plugin IME, if plugin IME is enabled.
147 // Returns YES if the event was handled. 152 // Returns YES if the event was handled.
148 - (BOOL)postProcessEventForPluginIme:(NSEvent*)event; 153 - (BOOL)postProcessEventForPluginIme:(NSEvent*)event;
149 154
150 @end 155 @end
151 156
152 /////////////////////////////////////////////////////////////////////////////// 157 ///////////////////////////////////////////////////////////////////////////////
153 // RenderWidgetHostViewMac 158 // RenderWidgetHostViewMac
154 // 159 //
155 // An object representing the "View" of a rendered web page. This object is 160 // An object representing the "View" of a rendered web page. This object is
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 virtual gfx::Rect GetRootWindowRect(); 217 virtual gfx::Rect GetRootWindowRect();
213 virtual void SetActive(bool active); 218 virtual void SetActive(bool active);
214 virtual void SetWindowVisibility(bool visible); 219 virtual void SetWindowVisibility(bool visible);
215 virtual void WindowFrameChanged(); 220 virtual void WindowFrameChanged();
216 virtual void SetBackground(const SkBitmap& background); 221 virtual void SetBackground(const SkBitmap& background);
217 virtual bool ContainsNativeView(gfx::NativeView native_view) const; 222 virtual bool ContainsNativeView(gfx::NativeView native_view) const;
218 223
219 virtual void OnAccessibilityNotifications( 224 virtual void OnAccessibilityNotifications(
220 const std::vector<ViewHostMsg_AccessibilityNotification_Params>& params); 225 const std::vector<ViewHostMsg_AccessibilityNotification_Params>& params);
221 226
222 virtual void SetPluginImeEnabled(bool enabled, int plugin_id); 227 virtual void PluginFocusChanged(bool focused, int plugin_id);
228 virtual void StartPluginIme();
223 virtual bool PostProcessEventForPluginIme( 229 virtual bool PostProcessEventForPluginIme(
224 const NativeWebKeyboardEvent& event); 230 const NativeWebKeyboardEvent& event);
225 231
226 // Methods associated with GPU-accelerated plug-in instances and the 232 // Methods associated with GPU-accelerated plug-in instances and the
227 // accelerated compositor. 233 // accelerated compositor.
228 virtual gfx::PluginWindowHandle AllocateFakePluginWindowHandle(bool opaque, 234 virtual gfx::PluginWindowHandle AllocateFakePluginWindowHandle(bool opaque,
229 bool root); 235 bool root);
230 virtual void DestroyFakePluginWindowHandle(gfx::PluginWindowHandle window); 236 virtual void DestroyFakePluginWindowHandle(gfx::PluginWindowHandle window);
231 237
232 // Exposed for testing. 238 // Exposed for testing.
(...skipping 29 matching lines...) Expand all
262 // Forces the textures associated with any accelerated plugin instances 268 // Forces the textures associated with any accelerated plugin instances
263 // to be reloaded. 269 // to be reloaded.
264 void ForceTextureReload(); 270 void ForceTextureReload();
265 271
266 virtual void SetVisuallyDeemphasized(const SkColor* color, bool animate); 272 virtual void SetVisuallyDeemphasized(const SkColor* color, bool animate);
267 273
268 void KillSelf(); 274 void KillSelf();
269 275
270 void SetTextInputActive(bool active); 276 void SetTextInputActive(bool active);
271 277
272 // Sends confirmed plugin IME text back to the renderer. 278 // Sends completed plugin IME notification and text back to the renderer.
273 void PluginImeCompositionConfirmed(const string16& text, int plugin_id); 279 void PluginImeCompositionCompleted(const string16& text, int plugin_id);
274 280
275 const std::string& selected_text() const { return selected_text_; } 281 const std::string& selected_text() const { return selected_text_; }
276 282
277 void UpdateRootGpuViewVisibility(bool show_gpu_widget); 283 void UpdateRootGpuViewVisibility(bool show_gpu_widget);
278 284
279 // When rendering transitions from gpu to software, the gpu widget can't be 285 // When rendering transitions from gpu to software, the gpu widget can't be
280 // hidden until the software backing store has been updated. This method 286 // hidden until the software backing store has been updated. This method
281 // checks if the GPU view needs to be hidden and hides it if necessary. It 287 // checks if the GPU view needs to be hidden and hides it if necessary. It
282 // should be called after the software backing store has been painted to. 288 // should be called after the software backing store has been painted to.
283 void HandleDelayedGpuViewHiding(); 289 void HandleDelayedGpuViewHiding();
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 371
366 // When rendering transitions from gpu to software, the gpu widget can't be 372 // 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 373 // 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. 374 // set when the gpu widget needs to be hidden once a paint is completed.
369 bool needs_gpu_visibility_update_after_repaint_; 375 bool needs_gpu_visibility_update_after_repaint_;
370 376
371 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); 377 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac);
372 }; 378 };
373 379
374 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ 380 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/render_widget_host_view.h ('k') | chrome/browser/renderer_host/render_widget_host_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698