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 17 matching lines...) Expand all Loading... |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
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 WebCoalescedInputEvent; |
38 class WebDragData; | 39 class WebDragData; |
39 class WebFrame; | 40 class WebFrame; |
40 class WebInputEvent; | |
41 class WebPluginContainer; | 41 class WebPluginContainer; |
42 class WebURLResponse; | 42 class WebURLResponse; |
43 struct WebPluginParams; | 43 struct WebPluginParams; |
44 | 44 |
45 class FakeWebPlugin : public WebPlugin { | 45 class FakeWebPlugin : public WebPlugin { |
46 public: | 46 public: |
47 FakeWebPlugin(WebFrame*, const WebPluginParams&); | 47 FakeWebPlugin(WebFrame*, const WebPluginParams&); |
48 | 48 |
49 // WebPlugin methods: | 49 // WebPlugin methods: |
50 bool Initialize(WebPluginContainer*) override; | 50 bool Initialize(WebPluginContainer*) override; |
51 void Destroy() override; | 51 void Destroy() override; |
52 bool CanProcessDrag() const override { return false; } | 52 bool CanProcessDrag() const override { return false; } |
53 void UpdateAllLifecyclePhases() override {} | 53 void UpdateAllLifecyclePhases() override {} |
54 void Paint(WebCanvas*, const WebRect&) override {} | 54 void Paint(WebCanvas*, const WebRect&) override {} |
55 void UpdateGeometry(const WebRect& client_rect, | 55 void UpdateGeometry(const WebRect& client_rect, |
56 const WebRect& clip_rect, | 56 const WebRect& clip_rect, |
57 const WebRect& window_clip_rect, | 57 const WebRect& window_clip_rect, |
58 const WebVector<WebRect>& cut_outs_rects, | 58 const WebVector<WebRect>& cut_outs_rects, |
59 bool is_visible) override {} | 59 bool is_visible) override {} |
60 void UpdateFocus(bool, WebFocusType) override {} | 60 void UpdateFocus(bool, WebFocusType) override {} |
61 void UpdateVisibility(bool) override {} | 61 void UpdateVisibility(bool) override {} |
62 WebInputEventResult HandleInputEvent(const WebInputEvent&, | 62 WebInputEventResult HandleInputEvent(const WebCoalescedInputEvent&, |
63 WebCursorInfo&) override { | 63 WebCursorInfo&) override { |
64 return WebInputEventResult::kNotHandled; | 64 return WebInputEventResult::kNotHandled; |
65 } | 65 } |
66 bool HandleDragStatusUpdate(WebDragStatus, | 66 bool HandleDragStatusUpdate(WebDragStatus, |
67 const WebDragData&, | 67 const WebDragData&, |
68 WebDragOperationsMask, | 68 WebDragOperationsMask, |
69 const WebPoint& position, | 69 const WebPoint& position, |
70 const WebPoint& screen_position) override { | 70 const WebPoint& screen_position) override { |
71 return false; | 71 return false; |
72 } | 72 } |
73 void DidReceiveResponse(const WebURLResponse&) override {} | 73 void DidReceiveResponse(const WebURLResponse&) override {} |
74 void DidReceiveData(const char* data, int data_length) override {} | 74 void DidReceiveData(const char* data, int data_length) override {} |
75 void DidFinishLoading() override {} | 75 void DidFinishLoading() override {} |
76 void DidFailLoading(const WebURLError&) override {} | 76 void DidFailLoading(const WebURLError&) override {} |
77 bool IsPlaceholder() override { return false; } | 77 bool IsPlaceholder() override { return false; } |
78 | 78 |
79 protected: | 79 protected: |
80 virtual ~FakeWebPlugin(); | 80 virtual ~FakeWebPlugin(); |
81 | 81 |
82 WebPluginContainer* Container() const { return container_; } | 82 WebPluginContainer* Container() const { return container_; } |
83 | 83 |
84 private: | 84 private: |
85 WebFrame* frame_; | 85 WebFrame* frame_; |
86 WebPluginContainer* container_; | 86 WebPluginContainer* container_; |
87 }; | 87 }; |
88 | 88 |
89 } // namespace blink | 89 } // namespace blink |
90 | 90 |
91 #endif // FakeWebPlugin_h | 91 #endif // FakeWebPlugin_h |
OLD | NEW |