| 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_TEST_PLUGIN_H_ | 5 #ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_TEST_PLUGIN_H_ |
| 6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_TEST_PLUGIN_H_ | 6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_TEST_PLUGIN_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 // primitive-color: black (default), red, green, blue. | 38 // primitive-color: black (default), red, green, blue. |
| 39 // opacity: [0.0 - 1.0]. Default is 1.0. | 39 // opacity: [0.0 - 1.0]. Default is 1.0. |
| 40 // | 40 // |
| 41 // Whether the plugin accepts touch events or not can be customized using the | 41 // Whether the plugin accepts touch events or not can be customized using the |
| 42 // 'accepts-touch' plugin parameter (defaults to false). | 42 // 'accepts-touch' plugin parameter (defaults to false). |
| 43 class TestPlugin : public blink::WebPlugin, public cc::TextureLayerClient { | 43 class TestPlugin : public blink::WebPlugin, public cc::TextureLayerClient { |
| 44 public: | 44 public: |
| 45 static TestPlugin* create(blink::WebFrame* frame, | 45 static TestPlugin* create(blink::WebFrame* frame, |
| 46 const blink::WebPluginParams& params, | 46 const blink::WebPluginParams& params, |
| 47 WebTestDelegate* delegate); | 47 WebTestDelegate* delegate); |
| 48 virtual ~TestPlugin(); | 48 ~TestPlugin() override; |
| 49 | 49 |
| 50 static const blink::WebString& MimeType(); | 50 static const blink::WebString& MimeType(); |
| 51 static const blink::WebString& CanCreateWithoutRendererMimeType(); | 51 static const blink::WebString& CanCreateWithoutRendererMimeType(); |
| 52 static const blink::WebString& PluginPersistsMimeType(); | 52 static const blink::WebString& PluginPersistsMimeType(); |
| 53 static bool IsSupportedMimeType(const blink::WebString& mime_type); | 53 static bool IsSupportedMimeType(const blink::WebString& mime_type); |
| 54 | 54 |
| 55 // WebPlugin methods: | 55 // WebPlugin methods: |
| 56 virtual bool initialize(blink::WebPluginContainer* container); | 56 virtual bool initialize(blink::WebPluginContainer* container); |
| 57 virtual void destroy(); | 57 virtual void destroy(); |
| 58 virtual NPObject* scriptableObject(); | 58 virtual NPObject* scriptableObject(); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 78 virtual void didFinishLoading() {} | 78 virtual void didFinishLoading() {} |
| 79 virtual void didFailLoading(const blink::WebURLError& error) {} | 79 virtual void didFailLoading(const blink::WebURLError& error) {} |
| 80 virtual void didFinishLoadingFrameRequest(const blink::WebURL& url, | 80 virtual void didFinishLoadingFrameRequest(const blink::WebURL& url, |
| 81 void* notify_data) {} | 81 void* notify_data) {} |
| 82 virtual void didFailLoadingFrameRequest(const blink::WebURL& url, | 82 virtual void didFailLoadingFrameRequest(const blink::WebURL& url, |
| 83 void* notify_data, | 83 void* notify_data, |
| 84 const blink::WebURLError& error) {} | 84 const blink::WebURLError& error) {} |
| 85 virtual bool isPlaceholder(); | 85 virtual bool isPlaceholder(); |
| 86 | 86 |
| 87 // cc::TextureLayerClient methods: | 87 // cc::TextureLayerClient methods: |
| 88 virtual bool PrepareTextureMailbox( | 88 bool PrepareTextureMailbox( |
| 89 cc::TextureMailbox* mailbox, | 89 cc::TextureMailbox* mailbox, |
| 90 scoped_ptr<cc::SingleReleaseCallback>* release_callback, | 90 scoped_ptr<cc::SingleReleaseCallback>* release_callback, |
| 91 bool use_shared_memory) override; | 91 bool use_shared_memory) override; |
| 92 | 92 |
| 93 private: | 93 private: |
| 94 TestPlugin(blink::WebFrame* frame, | 94 TestPlugin(blink::WebFrame* frame, |
| 95 const blink::WebPluginParams& params, | 95 const blink::WebPluginParams& params, |
| 96 WebTestDelegate* delegate); | 96 WebTestDelegate* delegate); |
| 97 | 97 |
| 98 enum Primitive { PrimitiveNone, PrimitiveTriangle }; | 98 enum Primitive { PrimitiveNone, PrimitiveTriangle }; |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 | 166 |
| 167 bool is_persistent_; | 167 bool is_persistent_; |
| 168 bool can_create_without_renderer_; | 168 bool can_create_without_renderer_; |
| 169 | 169 |
| 170 DISALLOW_COPY_AND_ASSIGN(TestPlugin); | 170 DISALLOW_COPY_AND_ASSIGN(TestPlugin); |
| 171 }; | 171 }; |
| 172 | 172 |
| 173 } // namespace content | 173 } // namespace content |
| 174 | 174 |
| 175 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_TEST_PLUGIN_H_ | 175 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_TEST_PLUGIN_H_ |
| OLD | NEW |