OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "views/controls/textfield/native_textfield_win.h" | 5 #include "views/controls/textfield/native_textfield_win.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "app/clipboard/clipboard.h" | 9 #include "app/clipboard/clipboard.h" |
10 #include "app/clipboard/scoped_clipboard_writer.h" | 10 #include "app/clipboard/scoped_clipboard_writer.h" |
(...skipping 256 matching lines...) Loading... |
267 return; | 267 return; |
268 | 268 |
269 if (top == 0 && bottom == 0) { | 269 if (top == 0 && bottom == 0) { |
270 // Do nothing, default margins are 0 already. | 270 // Do nothing, default margins are 0 already. |
271 return; | 271 return; |
272 } | 272 } |
273 // Non-zero margins case. | 273 // Non-zero margins case. |
274 NOTIMPLEMENTED(); | 274 NOTIMPLEMENTED(); |
275 } | 275 } |
276 | 276 |
277 void NativeTextfieldWin::SetFocus() { | 277 bool NativeTextfieldWin::SetFocus() { |
278 // Focus the associated HWND. | 278 // Focus the associated HWND. |
279 //container_view_->Focus(); | 279 //container_view_->Focus(); |
280 ::SetFocus(m_hWnd); | 280 ::SetFocus(m_hWnd); |
| 281 return true; |
281 } | 282 } |
282 | 283 |
283 View* NativeTextfieldWin::GetView() { | 284 View* NativeTextfieldWin::GetView() { |
284 return container_view_; | 285 return container_view_; |
285 } | 286 } |
286 | 287 |
287 gfx::NativeView NativeTextfieldWin::GetTestingHandle() const { | 288 gfx::NativeView NativeTextfieldWin::GetTestingHandle() const { |
288 return m_hWnd; | 289 return m_hWnd; |
289 } | 290 } |
290 | 291 |
(...skipping 781 matching lines...) Loading... |
1072 //////////////////////////////////////////////////////////////////////////////// | 1073 //////////////////////////////////////////////////////////////////////////////// |
1073 // NativeTextfieldWrapper, public: | 1074 // NativeTextfieldWrapper, public: |
1074 | 1075 |
1075 // static | 1076 // static |
1076 NativeTextfieldWrapper* NativeTextfieldWrapper::CreateWrapper( | 1077 NativeTextfieldWrapper* NativeTextfieldWrapper::CreateWrapper( |
1077 Textfield* field) { | 1078 Textfield* field) { |
1078 return new NativeTextfieldWin(field); | 1079 return new NativeTextfieldWin(field); |
1079 } | 1080 } |
1080 | 1081 |
1081 } // namespace views | 1082 } // namespace views |
OLD | NEW |