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 15 matching lines...) Expand all Loading... |
26 #ifndef ValidationMessageClientImpl_h | 26 #ifndef ValidationMessageClientImpl_h |
27 #define ValidationMessageClientImpl_h | 27 #define ValidationMessageClientImpl_h |
28 | 28 |
29 #include "core/page/ValidationMessageClient.h" | 29 #include "core/page/ValidationMessageClient.h" |
30 #include "platform/Timer.h" | 30 #include "platform/Timer.h" |
31 #include "platform/geometry/IntRect.h" | 31 #include "platform/geometry/IntRect.h" |
32 #include "platform/heap/Handle.h" | 32 #include "platform/heap/Handle.h" |
33 #include "wtf/text/WTFString.h" | 33 #include "wtf/text/WTFString.h" |
34 | 34 |
35 namespace blink { | 35 namespace blink { |
| 36 |
36 class FrameView; | 37 class FrameView; |
37 } | |
38 | |
39 namespace blink { | |
40 | |
41 class WebViewImpl; | 38 class WebViewImpl; |
42 | 39 |
43 class ValidationMessageClientImpl FINAL : public NoBaseWillBeGarbageCollectedFin
alized<ValidationMessageClientImpl>, public blink::ValidationMessageClient { | 40 class ValidationMessageClientImpl FINAL : public NoBaseWillBeGarbageCollectedFin
alized<ValidationMessageClientImpl>, public ValidationMessageClient { |
44 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(ValidationMessageClientImpl); | 41 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(ValidationMessageClientImpl); |
45 public: | 42 public: |
46 static PassOwnPtrWillBeRawPtr<ValidationMessageClientImpl> create(WebViewImp
l&); | 43 static PassOwnPtrWillBeRawPtr<ValidationMessageClientImpl> create(WebViewImp
l&); |
47 virtual ~ValidationMessageClientImpl(); | 44 virtual ~ValidationMessageClientImpl(); |
48 | 45 |
49 virtual void trace(blink::Visitor*) OVERRIDE; | 46 virtual void trace(Visitor*) OVERRIDE; |
50 | 47 |
51 private: | 48 private: |
52 ValidationMessageClientImpl(WebViewImpl&); | 49 ValidationMessageClientImpl(WebViewImpl&); |
53 void checkAnchorStatus(blink::Timer<ValidationMessageClientImpl>*); | 50 void checkAnchorStatus(Timer<ValidationMessageClientImpl>*); |
54 blink::FrameView* currentView(); | 51 FrameView* currentView(); |
55 | 52 |
56 virtual void showValidationMessage(const blink::Element& anchor, const Strin
g& message, TextDirection messageDir, const String& subMessage, TextDirection su
bMessageDir) OVERRIDE; | 53 virtual void showValidationMessage(const Element& anchor, const String& mess
age, TextDirection messageDir, const String& subMessage, TextDirection subMessag
eDir) OVERRIDE; |
57 virtual void hideValidationMessage(const blink::Element& anchor) OVERRIDE; | 54 virtual void hideValidationMessage(const Element& anchor) OVERRIDE; |
58 virtual bool isValidationMessageVisible(const blink::Element& anchor) OVERRI
DE; | 55 virtual bool isValidationMessageVisible(const Element& anchor) OVERRIDE; |
59 virtual void documentDetached(const blink::Document&) OVERRIDE; | 56 virtual void documentDetached(const Document&) OVERRIDE; |
60 virtual void willBeDestroyed() OVERRIDE; | 57 virtual void willBeDestroyed() OVERRIDE; |
61 | 58 |
62 WebViewImpl& m_webView; | 59 WebViewImpl& m_webView; |
63 RawPtrWillBeMember<const blink::Element> m_currentAnchor; | 60 RawPtrWillBeMember<const Element> m_currentAnchor; |
64 String m_message; | 61 String m_message; |
65 blink::IntRect m_lastAnchorRectInScreen; | 62 IntRect m_lastAnchorRectInScreen; |
66 float m_lastPageScaleFactor; | 63 float m_lastPageScaleFactor; |
67 double m_finishTime; | 64 double m_finishTime; |
68 blink::Timer<ValidationMessageClientImpl> m_timer; | 65 Timer<ValidationMessageClientImpl> m_timer; |
69 }; | 66 }; |
70 | 67 |
71 } | 68 } |
72 | 69 |
73 #endif | 70 #endif |
OLD | NEW |