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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 19 matching lines...) Expand all Loading... |
30 | 30 |
31 #ifndef FakeWebPlugin_h | 31 #ifndef FakeWebPlugin_h |
32 #define FakeWebPlugin_h | 32 #define FakeWebPlugin_h |
33 | 33 |
34 #include "public/web/WebPlugin.h" | 34 #include "public/web/WebPlugin.h" |
35 | 35 |
36 namespace blink { | 36 namespace blink { |
37 | 37 |
38 class WebDragData; | 38 class WebDragData; |
39 class WebFrame; | 39 class WebFrame; |
40 class WebInputEvent; | 40 class CoalescedWebInputEvent; |
41 class WebPluginContainer; | 41 class WebPluginContainer; |
42 class WebURL; | 42 class WebURL; |
43 class WebURLResponse; | 43 class WebURLResponse; |
44 struct WebPluginParams; | 44 struct WebPluginParams; |
45 | 45 |
46 class FakeWebPlugin : public WebPlugin { | 46 class FakeWebPlugin : public WebPlugin { |
47 public: | 47 public: |
48 FakeWebPlugin(WebFrame*, const WebPluginParams&); | 48 FakeWebPlugin(WebFrame*, const WebPluginParams&); |
49 | 49 |
50 // WebPlugin methods: | 50 // WebPlugin methods: |
51 bool initialize(WebPluginContainer*) override; | 51 bool initialize(WebPluginContainer*) override; |
52 void destroy() override; | 52 void destroy() override; |
53 bool canProcessDrag() const override { return false; } | 53 bool canProcessDrag() const override { return false; } |
54 void updateAllLifecyclePhases() override {} | 54 void updateAllLifecyclePhases() override {} |
55 void paint(WebCanvas*, const WebRect&) override {} | 55 void paint(WebCanvas*, const WebRect&) override {} |
56 void updateGeometry(const WebRect& clientRect, | 56 void updateGeometry(const WebRect& clientRect, |
57 const WebRect& clipRect, | 57 const WebRect& clipRect, |
58 const WebRect& windowClipRect, | 58 const WebRect& windowClipRect, |
59 const WebVector<WebRect>& cutOutsRects, | 59 const WebVector<WebRect>& cutOutsRects, |
60 bool isVisible) override {} | 60 bool isVisible) override {} |
61 void updateFocus(bool, WebFocusType) override {} | 61 void updateFocus(bool, WebFocusType) override {} |
62 void updateVisibility(bool) override {} | 62 void updateVisibility(bool) override {} |
63 WebInputEventResult handleInputEvent(const WebInputEvent&, | 63 WebInputEventResult handleInputEvent(const CoalescedWebInputEvent&, |
64 WebCursorInfo&) override { | 64 WebCursorInfo&) override { |
65 return WebInputEventResult::NotHandled; | 65 return WebInputEventResult::NotHandled; |
66 } | 66 } |
67 bool handleDragStatusUpdate(WebDragStatus, | 67 bool handleDragStatusUpdate(WebDragStatus, |
68 const WebDragData&, | 68 const WebDragData&, |
69 WebDragOperationsMask, | 69 WebDragOperationsMask, |
70 const WebPoint& position, | 70 const WebPoint& position, |
71 const WebPoint& screenPosition) override { | 71 const WebPoint& screenPosition) override { |
72 return false; | 72 return false; |
73 } | 73 } |
74 void didReceiveResponse(const WebURLResponse&) override {} | 74 void didReceiveResponse(const WebURLResponse&) override {} |
75 void didReceiveData(const char* data, int dataLength) override {} | 75 void didReceiveData(const char* data, int dataLength) override {} |
76 void didFinishLoading() override {} | 76 void didFinishLoading() override {} |
77 void didFailLoading(const WebURLError&) override {} | 77 void didFailLoading(const WebURLError&) override {} |
78 bool isPlaceholder() override { return false; } | 78 bool isPlaceholder() override { return false; } |
79 | 79 |
80 protected: | 80 protected: |
81 virtual ~FakeWebPlugin(); | 81 virtual ~FakeWebPlugin(); |
82 | 82 |
83 WebPluginContainer* container() const { return m_container; } | 83 WebPluginContainer* container() const { return m_container; } |
84 | 84 |
85 private: | 85 private: |
86 WebFrame* m_frame; | 86 WebFrame* m_frame; |
87 WebPluginContainer* m_container; | 87 WebPluginContainer* m_container; |
88 }; | 88 }; |
89 | 89 |
90 } // namespace blink | 90 } // namespace blink |
91 | 91 |
92 #endif // FakeWebPlugin_h | 92 #endif // FakeWebPlugin_h |
OLD | NEW |