| 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 "ui/views/controls/textfield/native_textfield_gtk.h" | 8 #include "ui/views/controls/textfield/native_textfield_gtk.h" |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 | 168 |
| 169 void NativeTextfieldGtk::UpdateIsPassword() { | 169 void NativeTextfieldGtk::UpdateIsPassword() { |
| 170 if (!native_view()) | 170 if (!native_view()) |
| 171 return; | 171 return; |
| 172 gtk_entry_set_visibility(GTK_ENTRY(native_view()), !textfield_->IsPassword()); | 172 gtk_entry_set_visibility(GTK_ENTRY(native_view()), !textfield_->IsPassword()); |
| 173 } | 173 } |
| 174 | 174 |
| 175 void NativeTextfieldGtk::UpdateEnabled() { | 175 void NativeTextfieldGtk::UpdateEnabled() { |
| 176 if (!native_view()) | 176 if (!native_view()) |
| 177 return; | 177 return; |
| 178 SetEnabled(textfield_->IsEnabled()); | 178 SetEnabled(textfield_->enabled()); |
| 179 } | 179 } |
| 180 | 180 |
| 181 gfx::Insets NativeTextfieldGtk::CalculateInsets() { | 181 gfx::Insets NativeTextfieldGtk::CalculateInsets() { |
| 182 if (!native_view()) | 182 if (!native_view()) |
| 183 return gfx::Insets(); | 183 return gfx::Insets(); |
| 184 | 184 |
| 185 GtkWidget* widget = native_view(); | 185 GtkWidget* widget = native_view(); |
| 186 gfx::Insets insets; | 186 gfx::Insets insets; |
| 187 | 187 |
| 188 GtkEntry* entry = GTK_ENTRY(widget); | 188 GtkEntry* entry = GTK_ENTRY(widget); |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 | 429 |
| 430 // static | 430 // static |
| 431 NativeTextfieldWrapper* NativeTextfieldWrapper::CreateWrapper( | 431 NativeTextfieldWrapper* NativeTextfieldWrapper::CreateWrapper( |
| 432 Textfield* field) { | 432 Textfield* field) { |
| 433 if (Widget::IsPureViews()) | 433 if (Widget::IsPureViews()) |
| 434 return new NativeTextfieldViews(field); | 434 return new NativeTextfieldViews(field); |
| 435 return new NativeTextfieldGtk(field); | 435 return new NativeTextfieldGtk(field); |
| 436 } | 436 } |
| 437 | 437 |
| 438 } // namespace views | 438 } // namespace views |
| OLD | NEW |