Chromium Code Reviews| Index: ui/aura/desktop_host_win.cc |
| diff --git a/ui/aura/desktop_host_win.cc b/ui/aura/desktop_host_win.cc |
| index 1809dda1fb3c2da0581bb42829f2b285e494955c..dd208748e3793a62821872b4629d4a8d04584c4f 100644 |
| --- a/ui/aura/desktop_host_win.cc |
| +++ b/ui/aura/desktop_host_win.cc |
| @@ -11,6 +11,7 @@ |
| #include "base/message_loop.h" |
| #include "ui/aura/desktop.h" |
| #include "ui/aura/event.h" |
| +#include "ui/base/ime/mock_input_method.h" |
| using std::max; |
| using std::min; |
| @@ -114,11 +115,15 @@ gfx::Size DesktopHost::GetNativeScreenSize() { |
| DesktopHostWin::DesktopHostWin(const gfx::Rect& bounds) |
| : desktop_(NULL), |
| + // TODO(yusukes): implement and use ui::InputMethodWin. |
| + ALLOW_THIS_IN_INITIALIZER_LIST( |
| + input_method_(new ui::MockInputMethod(this))), |
| fullscreen_(false), |
| saved_window_style_(0), |
| saved_window_ex_style_(0) { |
| Init(NULL, bounds); |
| SetWindowText(hwnd(), L"aura::Desktop!"); |
| + input_method_->Init(hwnd()); |
| } |
| DesktopHostWin::~DesktopHostWin() { |
| @@ -245,6 +250,7 @@ void DesktopHostWin::OnClose() { |
| LRESULT DesktopHostWin::OnKeyEvent(UINT message, |
| WPARAM w_param, |
| LPARAM l_param) { |
| + // TODO(yusukes): Support input method. |
| MSG msg = { hwnd(), message, w_param, l_param }; |
| KeyEvent keyev(msg, message == WM_CHAR); |
| SetMsgHandled(desktop_->DispatchKeyEvent(&keyev)); |
| @@ -276,4 +282,23 @@ void DesktopHostWin::OnSize(UINT param, const CSize& size) { |
| desktop_->OnHostResized(gfx::Size(size.cx, size.cy)); |
| } |
| +void DesktopHostWin::SetInputMethod(ui::InputMethod* input_method) { |
|
sky
2011/12/01 17:01:09
Order doesn't match header.
Yusuke Sato
2011/12/02 02:18:31
Done.
|
| + input_method_.reset(input_method); |
| +} |
| + |
| +ui::InputMethod* DesktopHostWin::GetInputMethod() const { |
| + return input_method_.get(); |
| +} |
| + |
| +void DesktopHostWin::DispatchKeyEventPostIME(const base::NativeEvent& event) { |
| + // TODO(yusukes): Support input method. |
| + NOTIMPLEMENTED(); |
| +} |
| + |
| +void DesktopHostWin::DispatchFabricatedKeyEventPostIME( |
| + ui::EventType type, ui::KeyboardCode key_code, int flags) { |
| + // TODO(yusukes): Support input method. |
| + NOTIMPLEMENTED(); |
| +} |
| + |
| } // namespace aura |