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

Unified Diff: chrome/browser/renderer_host/render_widget_host_view_win.cc

Issue 149620: Use WebWidget from the WebKit API. This change also makes... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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_win.cc
===================================================================
--- chrome/browser/renderer_host/render_widget_host_view_win.cc (revision 20851)
+++ chrome/browser/renderer_host/render_widget_host_view_win.cc (working copy)
@@ -42,6 +42,7 @@
using WebKit::WebInputEvent;
using WebKit::WebInputEventFactory;
using WebKit::WebMouseEvent;
+using WebKit::WebTextDirection;
namespace {
@@ -112,6 +113,7 @@
// If only a control key and a right-shift key are down.
// * WEB_TEXT_DIRECTION_LTR
// If only a control key and a left-shift key are down.
+
static bool GetNewTextDirection(WebTextDirection* direction) {
uint8_t keystate[256];
if (!GetKeyboardState(&keystate[0]))
@@ -131,10 +133,10 @@
if (keystate[VK_RSHIFT] & kKeyDownMask) {
keystate[VK_RSHIFT] = 0;
- *direction = WEB_TEXT_DIRECTION_RTL;
+ *direction = WebKit::WebTextDirectionRightToLeft;
} else if (keystate[VK_LSHIFT] & kKeyDownMask) {
keystate[VK_LSHIFT] = 0;
- *direction = WEB_TEXT_DIRECTION_LTR;
+ *direction = WebKit::WebTextDirectionLeftToRight;
} else {
return false;
}
@@ -941,7 +943,7 @@
ImeComposition composition;
if (ime_input_.GetResult(m_hWnd, lparam, &composition)) {
Send(new ViewMsg_ImeSetComposition(render_widget_host_->routing_id(),
- 1,
+ WebKit::WebCompositionCommandConfirm,
composition.cursor_position,
composition.target_start,
composition.target_end,
@@ -956,7 +958,7 @@
// composition and send it to a renderer process.
if (ime_input_.GetComposition(m_hWnd, lparam, &composition)) {
Send(new ViewMsg_ImeSetComposition(render_widget_host_->routing_id(),
- 0,
+ WebKit::WebCompositionCommandSet,
composition.cursor_position,
composition.target_start,
composition.target_end,
@@ -977,7 +979,8 @@
// of the renderer process.
std::wstring empty_string;
Send(new ViewMsg_ImeSetComposition(render_widget_host_->routing_id(),
- -1, -1, -1, -1, empty_string));
+ WebKit::WebCompositionCommandDiscard,
+ -1, -1, -1, empty_string));
ime_input_.ResetComposition(m_hWnd);
}
ime_input_.DestroyImeWindow(m_hWnd);
« no previous file with comments | « chrome/browser/renderer_host/render_widget_host_view_gtk.cc ('k') | chrome/common/render_messages_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698