OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <gdk/gdkkeysyms.h> | 5 #include <gdk/gdkkeysyms.h> |
6 #include <gtk/gtk.h> | 6 #include <gtk/gtk.h> |
7 | 7 |
8 #include "views/controls/textfield/native_textfield_gtk.h" | 8 #include "views/controls/textfield/native_textfield_gtk.h" |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 | 388 |
389 void NativeTextfieldGtk::ApplyTextStyle(const TextStyle* style, | 389 void NativeTextfieldGtk::ApplyTextStyle(const TextStyle* style, |
390 const ui::Range& range) { | 390 const ui::Range& range) { |
391 NOTREACHED(); | 391 NOTREACHED(); |
392 } | 392 } |
393 | 393 |
394 void NativeTextfieldGtk::ClearAllTextStyles() { | 394 void NativeTextfieldGtk::ClearAllTextStyles() { |
395 NOTREACHED(); | 395 NOTREACHED(); |
396 } | 396 } |
397 | 397 |
| 398 void NativeTextfieldGtk::ClearEditHistory() { |
| 399 NOTREACHED(); |
| 400 } |
| 401 |
398 void NativeTextfieldGtk::OnActivate(GtkWidget* native_widget) { | 402 void NativeTextfieldGtk::OnActivate(GtkWidget* native_widget) { |
399 GdkEvent* event = gtk_get_current_event(); | 403 GdkEvent* event = gtk_get_current_event(); |
400 if (!event || event->type != GDK_KEY_PRESS) | 404 if (!event || event->type != GDK_KEY_PRESS) |
401 return; | 405 return; |
402 | 406 |
403 KeyEvent views_key_event(event); | 407 KeyEvent views_key_event(event); |
404 gboolean handled = false; | 408 gboolean handled = false; |
405 | 409 |
406 TextfieldController* controller = textfield_->GetController(); | 410 TextfieldController* controller = textfield_->GetController(); |
407 if (controller) | 411 if (controller) |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
535 // static | 539 // static |
536 NativeTextfieldWrapper* NativeTextfieldWrapper::CreateWrapper( | 540 NativeTextfieldWrapper* NativeTextfieldWrapper::CreateWrapper( |
537 Textfield* field) { | 541 Textfield* field) { |
538 if (NativeTextfieldViews::IsTextfieldViewsEnabled()) { | 542 if (NativeTextfieldViews::IsTextfieldViewsEnabled()) { |
539 return new NativeTextfieldViews(field); | 543 return new NativeTextfieldViews(field); |
540 } | 544 } |
541 return new NativeTextfieldGtk(field); | 545 return new NativeTextfieldGtk(field); |
542 } | 546 } |
543 | 547 |
544 } // namespace views | 548 } // namespace views |
OLD | NEW |