Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(422)

Side by Side Diff: views/controls/textfield/textfield.cc

Issue 113981: Get textfield to compile on linux. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « views/controls/textfield/native_textfield_gtk.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/textfield.h" 5 #include "views/controls/textfield/textfield.h"
6 6
7 #include "app/gfx/insets.h" 7 #include "app/gfx/insets.h"
8 #if defined(OS_WIN) 8 #if defined(OS_WIN)
9 #include "app/win_util.h" 9 #include "app/win_util.h"
10 #endif 10 #endif
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 insets->Set(3, 3, 3, 3); 152 insets->Set(3, 3, 3, 3);
153 } 153 }
154 154
155 void Textfield::SyncText() { 155 void Textfield::SyncText() {
156 if (native_wrapper_) 156 if (native_wrapper_)
157 text_ = native_wrapper_->GetText(); 157 text_ = native_wrapper_->GetText();
158 } 158 }
159 159
160 // static 160 // static
161 bool Textfield::IsKeystrokeEnter(const Keystroke& key) { 161 bool Textfield::IsKeystrokeEnter(const Keystroke& key) {
162 #if defined(OS_WIN)
162 return key.key == VK_RETURN; 163 return key.key == VK_RETURN;
164 #else
165 NOTIMPLEMENTED();
166 return false;
167 #endif
163 } 168 }
164 169
165 // static 170 // static
166 bool Textfield::IsKeystrokeEscape(const Keystroke& key) { 171 bool Textfield::IsKeystrokeEscape(const Keystroke& key) {
172 #if defined(OS_WIN)
167 return key.key == VK_ESCAPE; 173 return key.key == VK_ESCAPE;
174 #else
175 NOTIMPLEMENTED();
176 return false;
177 #endif
168 } 178 }
169 179
170 //////////////////////////////////////////////////////////////////////////////// 180 ////////////////////////////////////////////////////////////////////////////////
171 // Textfield, View overrides: 181 // Textfield, View overrides:
172 182
173 void Textfield::Layout() { 183 void Textfield::Layout() {
174 if (native_wrapper_) { 184 if (native_wrapper_) {
175 native_wrapper_->GetView()->SetBounds(GetLocalBounds(true)); 185 native_wrapper_->GetView()->SetBounds(GetLocalBounds(true));
176 native_wrapper_->GetView()->Layout(); 186 native_wrapper_->GetView()->Layout();
177 } 187 }
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 native_wrapper_->UpdateEnabled(); 251 native_wrapper_->UpdateEnabled();
242 native_wrapper_->UpdateBorder(); 252 native_wrapper_->UpdateBorder();
243 } 253 }
244 } 254 }
245 255
246 std::string Textfield::GetClassName() const { 256 std::string Textfield::GetClassName() const {
247 return kViewClassName; 257 return kViewClassName;
248 } 258 }
249 259
250 } // namespace views 260 } // namespace views
OLDNEW
« no previous file with comments | « views/controls/textfield/native_textfield_gtk.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698