| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/views/widget/native_widget_win.h" | 5 #include "ui/views/widget/native_widget_win.h" |
| 6 | 6 |
| 7 #include <dwmapi.h> | 7 #include <dwmapi.h> |
| 8 #include <shellapi.h> | 8 #include <shellapi.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 bool NativeWidgetWin::HasCapture() const { | 248 bool NativeWidgetWin::HasCapture() const { |
| 249 return message_handler_->HasCapture(); | 249 return message_handler_->HasCapture(); |
| 250 } | 250 } |
| 251 | 251 |
| 252 InputMethod* NativeWidgetWin::CreateInputMethod() { | 252 InputMethod* NativeWidgetWin::CreateInputMethod() { |
| 253 #if !defined(USE_AURA) | 253 #if !defined(USE_AURA) |
| 254 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 254 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| 255 if (!command_line->HasSwitch(switches::kEnableViewsTextfield)) | 255 if (!command_line->HasSwitch(switches::kEnableViewsTextfield)) |
| 256 return NULL; | 256 return NULL; |
| 257 #endif | 257 #endif |
| 258 return new InputMethodWin(GetMessageHandler()); | 258 return new InputMethodWin(GetMessageHandler(), GetMessageHandler()->hwnd()); |
| 259 } | 259 } |
| 260 | 260 |
| 261 internal::InputMethodDelegate* NativeWidgetWin::GetInputMethodDelegate() { | 261 internal::InputMethodDelegate* NativeWidgetWin::GetInputMethodDelegate() { |
| 262 return message_handler_.get(); | 262 return message_handler_.get(); |
| 263 } | 263 } |
| 264 | 264 |
| 265 void NativeWidgetWin::CenterWindow(const gfx::Size& size) { | 265 void NativeWidgetWin::CenterWindow(const gfx::Size& size) { |
| 266 message_handler_->CenterWindow(size); | 266 message_handler_->CenterWindow(size); |
| 267 } | 267 } |
| 268 | 268 |
| (...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1107 // static | 1107 // static |
| 1108 bool NativeWidgetPrivate::IsTouchDown() { | 1108 bool NativeWidgetPrivate::IsTouchDown() { |
| 1109 // This currently isn't necessary because we're not generating touch events on | 1109 // This currently isn't necessary because we're not generating touch events on |
| 1110 // windows. When we do, this will need to be updated. | 1110 // windows. When we do, this will need to be updated. |
| 1111 return false; | 1111 return false; |
| 1112 } | 1112 } |
| 1113 | 1113 |
| 1114 } // namespace internal | 1114 } // namespace internal |
| 1115 | 1115 |
| 1116 } // namespace views | 1116 } // namespace views |
| OLD | NEW |