| 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 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 #ifndef ValidationMessageClient_h | 26 #ifndef ValidationMessageClient_h |
| 27 #define ValidationMessageClient_h | 27 #define ValidationMessageClient_h |
| 28 | 28 |
| 29 #include "platform/heap/Handle.h" | 29 #include "platform/heap/Handle.h" |
| 30 #include "platform/text/TextDirection.h" | 30 #include "platform/text/TextDirection.h" |
| 31 #include "platform/wtf/Forward.h" | 31 #include "platform/wtf/Forward.h" |
| 32 | 32 |
| 33 namespace blink { | 33 namespace blink { |
| 34 | 34 |
| 35 class Document; | |
| 36 class Element; | 35 class Element; |
| 37 | 36 |
| 38 class ValidationMessageClient : public GarbageCollectedMixin { | 37 class ValidationMessageClient : public GarbageCollectedMixin { |
| 39 public: | 38 public: |
| 40 virtual ~ValidationMessageClient() {} | 39 virtual ~ValidationMessageClient() {} |
| 41 | 40 |
| 42 // Show validation message for the specified anchor element. An | 41 // Show validation message for the specified anchor element. An |
| 43 // implementation of this function may hide the message automatically after | 42 // implementation of this function may hide the message automatically after |
| 44 // some period. | 43 // some period. |
| 45 virtual void ShowValidationMessage(const Element& anchor, | 44 virtual void ShowValidationMessage(const Element& anchor, |
| 46 const String& main_message, | 45 const String& main_message, |
| 47 TextDirection, | 46 TextDirection, |
| 48 const String& sub_message, | 47 const String& sub_message, |
| 49 TextDirection) = 0; | 48 TextDirection) = 0; |
| 50 | 49 |
| 51 // Hide validation message for the specified anchor if the message for the | 50 // Hide validation message for the specified anchor if the message for the |
| 52 // anchor is already visible. | 51 // anchor is already visible. |
| 53 virtual void HideValidationMessage(const Element& anchor) = 0; | 52 virtual void HideValidationMessage(const Element& anchor) = 0; |
| 54 | 53 |
| 55 // Returns true if the validation message for the specified anchor element | 54 // Returns true if the validation message for the specified anchor element |
| 56 // is visible. | 55 // is visible. |
| 57 virtual bool IsValidationMessageVisible(const Element& anchor) = 0; | 56 virtual bool IsValidationMessageVisible(const Element& anchor) = 0; |
| 58 | 57 |
| 59 virtual void WillUnloadDocument(const Document&) = 0; | |
| 60 virtual void DocumentDetached(const Document&) = 0; | |
| 61 | |
| 62 virtual void WillBeDestroyed() = 0; | 58 virtual void WillBeDestroyed() = 0; |
| 63 | 59 |
| 64 DEFINE_INLINE_VIRTUAL_TRACE() {} | 60 DEFINE_INLINE_VIRTUAL_TRACE() {} |
| 65 }; | 61 }; |
| 66 | 62 |
| 67 } // namespace blink | 63 } // namespace blink |
| 68 | 64 |
| 69 #endif | 65 #endif |
| OLD | NEW |