| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_TESTPLUGIN_H_ | 5 #ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_TESTPLUGIN_H_ |
| 6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_TESTPLUGIN_H_ | 6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_TESTPLUGIN_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 // opacity: [0.0 - 1.0]. Default is 1.0. | 30 // opacity: [0.0 - 1.0]. Default is 1.0. |
| 31 // | 31 // |
| 32 // Whether the plugin accepts touch events or not can be customized using the | 32 // Whether the plugin accepts touch events or not can be customized using the |
| 33 // 'accepts-touch' plugin parameter (defaults to false). | 33 // 'accepts-touch' plugin parameter (defaults to false). |
| 34 class TestPlugin : public blink::WebPlugin, public blink::WebExternalTextureLaye
rClient { | 34 class TestPlugin : public blink::WebPlugin, public blink::WebExternalTextureLaye
rClient { |
| 35 public: | 35 public: |
| 36 static TestPlugin* create(blink::WebFrame*, const blink::WebPluginParams&, W
ebTestDelegate*); | 36 static TestPlugin* create(blink::WebFrame*, const blink::WebPluginParams&, W
ebTestDelegate*); |
| 37 virtual ~TestPlugin(); | 37 virtual ~TestPlugin(); |
| 38 | 38 |
| 39 static const blink::WebString& mimeType(); | 39 static const blink::WebString& mimeType(); |
| 40 static const blink::WebString& canCreateWithoutRendererMimeType(); |
| 41 static const blink::WebString& pluginPersistsMimeType(); |
| 42 static bool isSupportedMimeType(const blink::WebString& mimeType); |
| 40 | 43 |
| 41 // WebPlugin methods: | 44 // WebPlugin methods: |
| 42 virtual bool initialize(blink::WebPluginContainer*); | 45 virtual bool initialize(blink::WebPluginContainer*); |
| 43 virtual void destroy(); | 46 virtual void destroy(); |
| 44 virtual NPObject* scriptableObject(); | 47 virtual NPObject* scriptableObject(); |
| 45 virtual bool canProcessDrag() const; | 48 virtual bool canProcessDrag() const; |
| 46 virtual void paint(blink::WebCanvas*, const blink::WebRect&) { } | 49 virtual void paint(blink::WebCanvas*, const blink::WebRect&) { } |
| 47 virtual void updateGeometry(const blink::WebRect& frameRect, const blink::We
bRect& clipRect, const blink::WebVector<blink::WebRect>& cutOutsRects, bool isVi
sible); | 50 virtual void updateGeometry(const blink::WebRect& frameRect, const blink::We
bRect& clipRect, const blink::WebVector<blink::WebRect>& cutOutsRects, bool isVi
sible); |
| 48 virtual void updateFocus(bool) { } | 51 virtual void updateFocus(bool) { } |
| 49 virtual void updateVisibility(bool) { } | 52 virtual void updateVisibility(bool) { } |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 Scene m_scene; | 127 Scene m_scene; |
| 125 scoped_ptr<blink::WebExternalTextureLayer> m_layer; | 128 scoped_ptr<blink::WebExternalTextureLayer> m_layer; |
| 126 | 129 |
| 127 blink::WebPluginContainer::TouchEventRequestType m_touchEventRequest; | 130 blink::WebPluginContainer::TouchEventRequestType m_touchEventRequest; |
| 128 // Requests touch events from the WebPluginContainerImpl multiple times to t
ickle webkit.org/b/108381 | 131 // Requests touch events from the WebPluginContainerImpl multiple times to t
ickle webkit.org/b/108381 |
| 129 bool m_reRequestTouchEvents; | 132 bool m_reRequestTouchEvents; |
| 130 bool m_printEventDetails; | 133 bool m_printEventDetails; |
| 131 bool m_printUserGestureStatus; | 134 bool m_printUserGestureStatus; |
| 132 bool m_canProcessDrag; | 135 bool m_canProcessDrag; |
| 133 | 136 |
| 137 bool m_isPersistent; |
| 138 bool m_canCreateWithoutRenderer; |
| 139 |
| 134 DISALLOW_COPY_AND_ASSIGN(TestPlugin); | 140 DISALLOW_COPY_AND_ASSIGN(TestPlugin); |
| 135 }; | 141 }; |
| 136 | 142 |
| 137 } | 143 } |
| 138 | 144 |
| 139 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_TESTPLUGIN_H_ | 145 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_TESTPLUGIN_H_ |
| OLD | NEW |