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

Side by Side Diff: Source/core/page/ValidationMessageClient.h

Issue 389343002: Custom validation message to take into account text direction (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix failing test Created 6 years, 5 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
OLDNEW
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 16 matching lines...) Expand all
27 #define ValidationMessageClient_h 27 #define ValidationMessageClient_h
28 28
29 #include "platform/heap/Handle.h" 29 #include "platform/heap/Handle.h"
30 #include "wtf/Forward.h" 30 #include "wtf/Forward.h"
31 31
32 namespace WebCore { 32 namespace WebCore {
33 33
34 class Document; 34 class Document;
35 class Element; 35 class Element;
36 36
37
37 class ValidationMessageClient : public WillBeGarbageCollectedMixin { 38 class ValidationMessageClient : public WillBeGarbageCollectedMixin {
38 public: 39 public:
40 enum MessageType {
41 CannedMessage,
42 CustomMessage
43 };
44
39 virtual ~ValidationMessageClient() { } 45 virtual ~ValidationMessageClient() { }
40 46
41 // Show validation message for the specified anchor element. An 47 // Show validation message for the specified anchor element. An
42 // implementation of this function may hide the message automatically after 48 // implementation of this function may hide the message automatically after
43 // some period. 49 // some period.
44 virtual void showValidationMessage(const Element& anchor, const String& mess age) = 0; 50 virtual void showValidationMessage(const Element& anchor, const String& mess age, MessageType) = 0;
45 51
46 // Hide validation message for the specified anchor if the message for the 52 // Hide validation message for the specified anchor if the message for the
47 // anchor is already visible. 53 // anchor is already visible.
48 virtual void hideValidationMessage(const Element& anchor) = 0; 54 virtual void hideValidationMessage(const Element& anchor) = 0;
49 55
50 // Returns true if the validation message for the specified anchor element 56 // Returns true if the validation message for the specified anchor element
51 // is visible. 57 // is visible.
52 virtual bool isValidationMessageVisible(const Element& anchor) = 0; 58 virtual bool isValidationMessageVisible(const Element& anchor) = 0;
53 59
54 virtual void documentDetached(const Document&) = 0; 60 virtual void documentDetached(const Document&) = 0;
55 61
56 virtual void willBeDestroyed() = 0; 62 virtual void willBeDestroyed() = 0;
57 63
58 virtual void trace(Visitor*) { } 64 virtual void trace(Visitor*) { }
59 }; 65 };
60 66
61 } 67 }
62 68
63 #endif 69 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698