Standardize IME callbacks for off-screen rendering (issue #1675)

This commit is contained in:
Marshall Greenblatt
2016-10-28 12:11:24 -04:00
parent e69de63b15
commit d6b17a8fb5
48 changed files with 1999 additions and 976 deletions

View File

@ -16,6 +16,8 @@
namespace client {
class OsrImeHandlerWin;
// Represents the native parent window for an off-screen browser. This object
// must live on the CEF UI thread in order to handle CefRenderHandler callbacks.
// The methods of this class are thread-safe unless otherwise indicated.
@ -94,6 +96,11 @@ class OsrWindowWin :
void OnPaint();
bool OnEraseBkgnd();
void OnIMESetContext(UINT message, WPARAM wParam, LPARAM lParam);
void OnIMEStartComposition();
void OnIMEComposition(UINT message, WPARAM wParam, LPARAM lParam);
void OnIMECancelCompositionEvent();
// Manage popup bounds.
bool IsOverPopupWidget(int x, int y) const;
int GetPopupXOffset() const;
@ -133,6 +140,10 @@ class OsrWindowWin :
int x, int y) OVERRIDE;
void UpdateDragCursor(CefRefPtr<CefBrowser> browser,
CefRenderHandler::DragOperation operation) OVERRIDE;
void OnImeCompositionRangeChanged(
CefRefPtr<CefBrowser> browser,
const CefRange& selection_range,
const CefRenderHandler::RectList& character_bounds) OVERRIDE;
#if defined(CEF_USE_ATL)
// OsrDragEvents methods.
@ -156,6 +167,9 @@ class OsrWindowWin :
HDC hdc_;
HGLRC hrc_;
// Class that encapsulates IMM32 APIs and controls IMEs attached to a window.
scoped_ptr<OsrImeHandlerWin> ime_handler_;
RECT client_rect_;
float device_scale_factor_;