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