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

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

Issue 3782012: Merge 62820 - Implement IME for Mac plugins using the Cocoa event model on 10... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/552/src/
Patch Set: 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
===================================================================
--- chrome/browser/renderer_host/render_widget_host_view_mac.h (revision 62862)
+++ chrome/browser/renderer_host/render_widget_host_view_mac.h (working copy)
@@ -124,6 +124,9 @@
// 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 @@
- (void)setAccessibilityTree:(const webkit_glue::WebAccessibility&) tree;
// 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
@@ -222,6 +230,10 @@
virtual bool ContainsNativeView(gfx::NativeView native_view) const;
virtual void UpdateAccessibilityTree(
const webkit_glue::WebAccessibility& tree);
+ 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,
@@ -261,6 +273,9 @@
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