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

Unified Diff: chrome/browser/renderer_host/render_widget_host_view_mac.h

Issue 3808001: Implement IME for Mac plugins using the Cocoa event model on 10.6 (Closed)
Patch Set: Windows and unit test compile fixes Created 10 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/renderer_host/render_widget_host_view_mac.h
diff --git a/chrome/browser/renderer_host/render_widget_host_view_mac.h b/chrome/browser/renderer_host/render_widget_host_view_mac.h
index f41ae8d830acaf2d98f064925a7e68f74b69c7ce..b9e41f9e1f3507c9d84c8f5b8423c0b6386d1b35 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_mac.h
+++ b/chrome/browser/renderer_host/render_widget_host_view_mac.h
@@ -124,6 +124,9 @@ class RWHVMEditCommandHelper;
// handling a key down event, not including inserting commands, eg. insertTab,
// etc.
EditCommands editCommands_;
+
+ // The plugin for which IME is currently enabled (-1 if not enabled).
+ int pluginImeIdentifier_;
}
@property(assign, nonatomic) NSRect caretRect;
@@ -145,6 +148,11 @@ class RWHVMEditCommandHelper;
- (void)setAccessibilityTreeRoot:(BrowserAccessibility*) treeRoot;
// Confirm ongoing composition.
- (void)confirmComposition;
+// Enables or disables plugin IME for the given plugin.
+- (void)setPluginImeEnabled:(BOOL)enabled forPlugin:(int)pluginId;
+// Evaluates the event in the context of plugin IME, if plugin IME is enabled.
+// Returns YES if the event was handled.
+- (BOOL)postProcessEventForPluginIme:(NSEvent*)event;
@end
@@ -224,6 +232,10 @@ class RenderWidgetHostViewMac : public RenderWidgetHostView {
virtual void OnAccessibilityNotifications(
const std::vector<ViewHostMsg_AccessibilityNotification_Params>& params);
+ virtual void SetPluginImeEnabled(bool enabled, int plugin_id);
+ virtual bool PostProcessEventForPluginIme(
+ const NativeWebKeyboardEvent& event);
+
// Methods associated with GPU-accelerated plug-in instances and the
// accelerated compositor.
virtual gfx::PluginWindowHandle AllocateFakePluginWindowHandle(bool opaque,
@@ -263,6 +275,9 @@ class RenderWidgetHostViewMac : public RenderWidgetHostView {
void SetTextInputActive(bool active);
+ // Sends confirmed plugin IME text back to the renderer.
+ void PluginImeCompositionConfirmed(const string16& text, int plugin_id);
+
const std::string& selected_text() const { return selected_text_; }
// These member variables should be private, but the associated ObjC class
« 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