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 18 matching lines...) Expand all Loading... |
29 #include "core/page/PopupOpeningObserver.h" | 29 #include "core/page/PopupOpeningObserver.h" |
30 #include "core/page/ValidationMessageClient.h" | 30 #include "core/page/ValidationMessageClient.h" |
31 #include "platform/Timer.h" | 31 #include "platform/Timer.h" |
32 #include "platform/geometry/IntRect.h" | 32 #include "platform/geometry/IntRect.h" |
33 #include "platform/heap/Handle.h" | 33 #include "platform/heap/Handle.h" |
34 #include "platform/wtf/text/WTFString.h" | 34 #include "platform/wtf/text/WTFString.h" |
35 | 35 |
36 namespace blink { | 36 namespace blink { |
37 | 37 |
38 class FrameView; | 38 class FrameView; |
39 class WebViewImpl; | 39 class WebViewBase; |
40 | 40 |
41 class ValidationMessageClientImpl final | 41 class ValidationMessageClientImpl final |
42 : public GarbageCollectedFinalized<ValidationMessageClientImpl>, | 42 : public GarbageCollectedFinalized<ValidationMessageClientImpl>, |
43 public ValidationMessageClient, | 43 public ValidationMessageClient, |
44 private PopupOpeningObserver { | 44 private PopupOpeningObserver { |
45 USING_GARBAGE_COLLECTED_MIXIN(ValidationMessageClientImpl); | 45 USING_GARBAGE_COLLECTED_MIXIN(ValidationMessageClientImpl); |
46 | 46 |
47 public: | 47 public: |
48 static ValidationMessageClientImpl* Create(WebViewImpl&); | 48 static ValidationMessageClientImpl* Create(WebViewBase&); |
49 ~ValidationMessageClientImpl() override; | 49 ~ValidationMessageClientImpl() override; |
50 | 50 |
51 DECLARE_VIRTUAL_TRACE(); | 51 DECLARE_VIRTUAL_TRACE(); |
52 | 52 |
53 private: | 53 private: |
54 ValidationMessageClientImpl(WebViewImpl&); | 54 ValidationMessageClientImpl(WebViewBase&); |
55 void CheckAnchorStatus(TimerBase*); | 55 void CheckAnchorStatus(TimerBase*); |
56 FrameView* CurrentView(); | 56 FrameView* CurrentView(); |
57 | 57 |
58 void ShowValidationMessage(const Element& anchor, | 58 void ShowValidationMessage(const Element& anchor, |
59 const String& message, | 59 const String& message, |
60 TextDirection message_dir, | 60 TextDirection message_dir, |
61 const String& sub_message, | 61 const String& sub_message, |
62 TextDirection sub_message_dir) override; | 62 TextDirection sub_message_dir) override; |
63 void HideValidationMessage(const Element& anchor) override; | 63 void HideValidationMessage(const Element& anchor) override; |
64 bool IsValidationMessageVisible(const Element& anchor) override; | 64 bool IsValidationMessageVisible(const Element& anchor) override; |
65 void WillUnloadDocument(const Document&) override; | 65 void WillUnloadDocument(const Document&) override; |
66 void DocumentDetached(const Document&) override; | 66 void DocumentDetached(const Document&) override; |
67 void WillBeDestroyed() override; | 67 void WillBeDestroyed() override; |
68 | 68 |
69 // PopupOpeningObserver function | 69 // PopupOpeningObserver function |
70 void WillOpenPopup() override; | 70 void WillOpenPopup() override; |
71 | 71 |
72 WebViewImpl& web_view_; | 72 WebViewBase& web_view_; |
73 Member<const Element> current_anchor_; | 73 Member<const Element> current_anchor_; |
74 String message_; | 74 String message_; |
75 IntRect last_anchor_rect_in_screen_; | 75 IntRect last_anchor_rect_in_screen_; |
76 float last_page_scale_factor_; | 76 float last_page_scale_factor_; |
77 double finish_time_; | 77 double finish_time_; |
78 std::unique_ptr<TimerBase> timer_; | 78 std::unique_ptr<TimerBase> timer_; |
79 }; | 79 }; |
80 | 80 |
81 } // namespace blink | 81 } // namespace blink |
82 | 82 |
83 #endif | 83 #endif |
OLD | NEW |