| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 // FieldOwner implementer must call removeEventHandler when | 48 // FieldOwner implementer must call removeEventHandler when |
| 49 // it doesn't handle event, e.g. at destruction. | 49 // it doesn't handle event, e.g. at destruction. |
| 50 class FieldOwner { | 50 class FieldOwner { |
| 51 public: | 51 public: |
| 52 virtual ~FieldOwner(); | 52 virtual ~FieldOwner(); |
| 53 virtual void didBlurFromField() = 0; | 53 virtual void didBlurFromField() = 0; |
| 54 virtual void didFocusOnField() = 0; | 54 virtual void didFocusOnField() = 0; |
| 55 virtual void fieldValueChanged() = 0; | 55 virtual void fieldValueChanged() = 0; |
| 56 virtual bool focusOnNextField(const DateTimeFieldElement&) = 0; | 56 virtual bool focusOnNextField(const DateTimeFieldElement&) = 0; |
| 57 virtual bool focusOnPreviousField(const DateTimeFieldElement&) = 0; | 57 virtual bool focusOnPreviousField(const DateTimeFieldElement&) = 0; |
| 58 virtual bool isFieldOwnerDisabledOrReadOnly() const = 0; |
| 58 }; | 59 }; |
| 59 | 60 |
| 60 virtual void defaultEventHandler(Event*) OVERRIDE; | 61 virtual void defaultEventHandler(Event*) OVERRIDE; |
| 61 virtual bool hasValue() const = 0; | 62 virtual bool hasValue() const = 0; |
| 62 bool isReadOnly() const; | 63 bool isReadOnly() const; |
| 63 virtual void populateDateTimeFieldsState(DateTimeFieldsState&) = 0; | 64 virtual void populateDateTimeFieldsState(DateTimeFieldsState&) = 0; |
| 64 void removeEventHandler() { m_fieldOwner = 0; } | 65 void removeEventHandler() { m_fieldOwner = 0; } |
| 65 void setReadOnly(); | 66 void setReadOnly(); |
| 66 virtual void setEmptyValue(const DateComponents& dateForReadOnlyField, Event
Behavior = DispatchNoEvent) = 0; | 67 virtual void setEmptyValue(const DateComponents& dateForReadOnlyField, Event
Behavior = DispatchNoEvent) = 0; |
| 67 virtual void setValueAsDate(const DateComponents&) = 0; | 68 virtual void setValueAsDate(const DateComponents&) = 0; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 92 bool isRTL() const; | 93 bool isRTL() const; |
| 93 virtual bool supportsFocus() const OVERRIDE FINAL; | 94 virtual bool supportsFocus() const OVERRIDE FINAL; |
| 94 | 95 |
| 95 FieldOwner* m_fieldOwner; | 96 FieldOwner* m_fieldOwner; |
| 96 }; | 97 }; |
| 97 | 98 |
| 98 } // namespace WebCore | 99 } // namespace WebCore |
| 99 | 100 |
| 100 #endif | 101 #endif |
| 101 #endif | 102 #endif |
| OLD | NEW |