| Index: views/widget/widget_win.cc
|
| diff --git a/views/widget/widget_win.cc b/views/widget/widget_win.cc
|
| index 05ba37dd5875a12da78101616a5433540a3339e1..bc2c2299275499a18ef26dce3d32c01f69201033 100644
|
| --- a/views/widget/widget_win.cc
|
| +++ b/views/widget/widget_win.cc
|
| @@ -672,7 +672,7 @@ LRESULT WidgetWin::OnCreate(CREATESTRUCT* create_struct) {
|
| // widget. Only top-level widget should have an input method.
|
| if (delegate_->HasFocusManager() &&
|
| NativeTextfieldViews::IsTextfieldViewsEnabled()) {
|
| - input_method_.reset(new InputMethodWin(this));
|
| + input_method_.reset(new InputMethodWin());
|
| input_method_->Init(GetWidget());
|
| is_input_method_win_ = true;
|
| }
|
| @@ -813,11 +813,7 @@ void WidgetWin::OnInputLangChange(DWORD character_set, HKL input_language_id) {
|
|
|
| LRESULT WidgetWin::OnKeyEvent(UINT message, WPARAM w_param, LPARAM l_param) {
|
| MSG msg = { hwnd(), message, w_param, l_param };
|
| - KeyEvent key(msg);
|
| - if (input_method_.get())
|
| - input_method_->DispatchKeyEvent(key);
|
| - else
|
| - DispatchKeyEventPostIME(key);
|
| + SetMsgHandled(delegate_->OnKeyEvent(KeyEvent(msg)));
|
| return 0;
|
| }
|
|
|
| @@ -1045,19 +1041,6 @@ Window* WidgetWin::GetWindowImpl(HWND hwnd) {
|
| return NULL;
|
| }
|
|
|
| -RootView* WidgetWin::GetFocusedViewRootView() {
|
| - // TODO(beng): get rid of this
|
| - FocusManager* focus_manager = GetFocusManager();
|
| - if (!focus_manager) {
|
| - NOTREACHED();
|
| - return NULL;
|
| - }
|
| - View* focused_view = focus_manager->GetFocusedView();
|
| - if (!focused_view)
|
| - return NULL;
|
| - return focused_view->GetRootView();
|
| -}
|
| -
|
| // static
|
| void WidgetWin::PostProcessActivateMessage(WidgetWin* widget,
|
| int activation_state) {
|
| @@ -1142,14 +1125,6 @@ gfx::AcceleratedWidget WidgetWin::GetAcceleratedWidget() {
|
| return gfx::kNullAcceleratedWidget;
|
| }
|
|
|
| -void WidgetWin::DispatchKeyEventPostIME(const KeyEvent& key) {
|
| - RootView* root_view = GetFocusedViewRootView();
|
| - if (!root_view)
|
| - root_view = GetRootView();
|
| -
|
| - SetMsgHandled(root_view->ProcessKeyEvent(key));
|
| -}
|
| -
|
| ////////////////////////////////////////////////////////////////////////////////
|
| // Widget, public:
|
|
|
|
|