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

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

Issue 6384004: Browser should get notified if a views textfield changes focus. In addition, (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: minor change Created 9 years, 10 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
OLDNEW
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 "views/controls/textfield/textfield.h" 5 #include "views/controls/textfield/textfield.h"
6 6
7 #if defined(OS_LINUX) 7 #if defined(OS_LINUX)
8 #include <gdk/gdkkeysyms.h> 8 #include <gdk/gdkkeysyms.h>
9 #endif 9 #endif
10 10
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 void Textfield::DidGainFocus() { 345 void Textfield::DidGainFocus() {
346 if (native_wrapper_) 346 if (native_wrapper_)
347 native_wrapper_->HandleDidGainFocus(); 347 native_wrapper_->HandleDidGainFocus();
348 } 348 }
349 349
350 void Textfield::WillLoseFocus() { 350 void Textfield::WillLoseFocus() {
351 if (native_wrapper_) 351 if (native_wrapper_)
352 native_wrapper_->HandleWillLoseFocus(); 352 native_wrapper_->HandleWillLoseFocus();
353 } 353 }
354 354
355 View::VirtualKeyboardType Textfield::GetVirtualKeyboardType() {
356 return View::REGULAR_KEYBOARD;
357 }
358
355 AccessibilityTypes::Role Textfield::GetAccessibleRole() { 359 AccessibilityTypes::Role Textfield::GetAccessibleRole() {
356 return AccessibilityTypes::ROLE_TEXT; 360 return AccessibilityTypes::ROLE_TEXT;
357 } 361 }
358 362
359 AccessibilityTypes::State Textfield::GetAccessibleState() { 363 AccessibilityTypes::State Textfield::GetAccessibleState() {
360 int state = 0; 364 int state = 0;
361 if (read_only()) 365 if (read_only())
362 state |= AccessibilityTypes::STATE_READONLY; 366 state |= AccessibilityTypes::STATE_READONLY;
363 if (IsPassword()) 367 if (IsPassword())
364 state |= AccessibilityTypes::STATE_PROTECTED; 368 state |= AccessibilityTypes::STATE_PROTECTED;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 } 415 }
412 #endif 416 #endif
413 } 417 }
414 } 418 }
415 419
416 std::string Textfield::GetClassName() const { 420 std::string Textfield::GetClassName() const {
417 return kViewClassName; 421 return kViewClassName;
418 } 422 }
419 423
420 } // namespace views 424 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698