summaryrefslogtreecommitdiffstats
path: root/content/renderer/render_widget.h
diff options
context:
space:
mode:
authorkinaba@chromium.org <kinaba@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-17 07:59:45 +0000
committerkinaba@chromium.org <kinaba@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-17 07:59:45 +0000
commitad26ef4a0c0a170f4a167eea95aed749b791cc95 (patch)
tree74be3a5fc6131021eb8870b2394250eb5b45cf00 /content/renderer/render_widget.h
parent2c046f04af7805b04463d8b742e55f21029b896a (diff)
downloadchromium_src-ad26ef4a0c0a170f4a167eea95aed749b791cc95.zip
chromium_src-ad26ef4a0c0a170f4a167eea95aed749b791cc95.tar.gz
chromium_src-ad26ef4a0c0a170f4a167eea95aed749b791cc95.tar.bz2
Show composition text on IME panel when Pepper plugin is focused (Linux).
BUG=83684 TEST=1. On Linux Chrome, load some PPAPI plugin (e.g., ppapi/example) 2. Focus the plugin element 3. Turn on IME and type some text 4. Verify composition text is drawn on the IME candidate panel. This is the second step for enabling off-the-spot IME on Pepper on ChromeOS/Linux, continuing from the first step r87215. This patch includes [many places] Add a boolean flag to indicate inline composition is supported or not. (WebKit should also be updated for supporting this kind of information for the final complete version of Pepper IME API, but not in this patch) [chrome/browser/renderer_host/render_widget_host_view_gtk.cc] Control IME context to show composition text on candidate window. (In this patch, only RenderWidgetHostViewGtk, i.e., Linux and ChromeOS is considered. On Windows and Mac, the behavior stays unchanged.) [content/renderer/render_view.cc] Turn the flag off when Pepper is focused. and not yet include - Enhancement of ChromeOS candidate window to have composition text area. - Proper placement of the candidate window. Review URL: http://codereview.chromium.org/7041003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89451 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer/render_widget.h')
-rw-r--r--content/renderer/render_widget.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/content/renderer/render_widget.h b/content/renderer/render_widget.h
index d48c336..fde8220 100644
--- a/content/renderer/render_widget.h
+++ b/content/renderer/render_widget.h
@@ -18,9 +18,9 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebRect.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h"
-#include "third_party/WebKit/Source/WebKit/chromium/public/WebTextInputType.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebWidgetClient.h"
#include "third_party/skia/include/core/SkBitmap.h"
+#include "ui/base/ime/text_input_type.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/size.h"
@@ -278,7 +278,11 @@ class RenderWidget : public IPC::Channel::Listener,
// Override point to obtain that the current input method state and caret
// position.
- virtual WebKit::WebTextInputType GetTextInputType();
+ virtual ui::TextInputType GetTextInputType();
+
+ // Override point to obtain that the current input method state about
+ // composition text.
+ virtual bool CanComposeInline();
// Tells the renderer it does not have focus. Used to prevent us from getting
// the focus on our own when the browser did not focus us.
@@ -397,7 +401,10 @@ class RenderWidget : public IPC::Channel::Listener,
bool input_method_is_active_;
// Stores the current text input type of |webwidget_|.
- WebKit::WebTextInputType text_input_type_;
+ ui::TextInputType text_input_type_;
+
+ // Stores the current type of composition text rendering of |webwidget_|.
+ bool can_compose_inline_;
// Stores the current caret bounds of input focus.
WebKit::WebRect caret_bounds_;