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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 NPObject* scriptableObject() override { return 0; } | |
54 bool canProcessDrag() const override { return false; } | 53 bool canProcessDrag() const override { return false; } |
55 void updateAllLifecyclePhases() override { } | 54 void updateAllLifecyclePhases() override { } |
56 void paint(WebCanvas*, const WebRect&) override { } | 55 void paint(WebCanvas*, const WebRect&) override { } |
57 void updateGeometry(const WebRect& clientRect, const WebRect& clipRect, cons
t WebRect& windowClipRect, const WebVector<WebRect>& cutOutsRects, bool isVisibl
e) override { } | 56 void updateGeometry(const WebRect& clientRect, const WebRect& clipRect, cons
t WebRect& windowClipRect, const WebVector<WebRect>& cutOutsRects, bool isVisibl
e) override { } |
58 void updateFocus(bool, WebFocusType) override { } | 57 void updateFocus(bool, WebFocusType) override { } |
59 void updateVisibility(bool) override { } | 58 void updateVisibility(bool) override { } |
60 bool acceptsInputEvents() override { return true; } | 59 bool acceptsInputEvents() override { return true; } |
61 WebInputEventResult handleInputEvent(const WebInputEvent&, WebCursorInfo&) o
verride { return WebInputEventResult::NotHandled; } | 60 WebInputEventResult handleInputEvent(const WebInputEvent&, WebCursorInfo&) o
verride { return WebInputEventResult::NotHandled; } |
62 bool handleDragStatusUpdate(WebDragStatus, const WebDragData&, WebDragOperat
ionsMask, const WebPoint& position, const WebPoint& screenPosition) override { r
eturn false; } | 61 bool handleDragStatusUpdate(WebDragStatus, const WebDragData&, WebDragOperat
ionsMask, const WebPoint& position, const WebPoint& screenPosition) override { r
eturn false; } |
63 void didReceiveResponse(const WebURLResponse&) override { } | 62 void didReceiveResponse(const WebURLResponse&) override { } |
64 void didReceiveData(const char* data, int dataLength) override { } | 63 void didReceiveData(const char* data, int dataLength) override { } |
65 void didFinishLoading() override { } | 64 void didFinishLoading() override { } |
66 void didFailLoading(const WebURLError&) override { } | 65 void didFailLoading(const WebURLError&) override { } |
67 bool isPlaceholder() override { return false; } | 66 bool isPlaceholder() override { return false; } |
68 | 67 |
69 protected: | 68 protected: |
70 virtual ~FakeWebPlugin(); | 69 virtual ~FakeWebPlugin(); |
71 | 70 |
72 WebPluginContainer* container() const { return m_container; } | 71 WebPluginContainer* container() const { return m_container; } |
73 | 72 |
74 private: | 73 private: |
75 WebFrame* m_frame; | 74 WebFrame* m_frame; |
76 WebPluginContainer* m_container; | 75 WebPluginContainer* m_container; |
77 }; | 76 }; |
78 | 77 |
79 } // namespace blink | 78 } // namespace blink |
80 | 79 |
81 #endif // FakeWebPlugin_h | 80 #endif // FakeWebPlugin_h |
OLD | NEW |