| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 COMPONENTS_PLUGINS_RENDERER_LOADABLE_PLUGIN_PLACEHOLDER_H_ | 5 #ifndef COMPONENTS_PLUGINS_RENDERER_LOADABLE_PLUGIN_PLACEHOLDER_H_ |
| 6 #define COMPONENTS_PLUGINS_RENDERER_LOADABLE_PLUGIN_PLACEHOLDER_H_ | 6 #define COMPONENTS_PLUGINS_RENDERER_LOADABLE_PLUGIN_PLACEHOLDER_H_ |
| 7 | 7 |
| 8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
| 9 #include "components/plugins/renderer/plugin_placeholder.h" | 9 #include "components/plugins/renderer/plugin_placeholder.h" |
| 10 #include "content/public/common/webplugininfo.h" | 10 #include "content/public/common/webplugininfo.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 // Replace this placeholder with a different plugin (which could be | 66 // Replace this placeholder with a different plugin (which could be |
| 67 // a placeholder again). | 67 // a placeholder again). |
| 68 void ReplacePlugin(blink::WebPlugin* new_plugin); | 68 void ReplacePlugin(blink::WebPlugin* new_plugin); |
| 69 | 69 |
| 70 // Hide this placeholder. | 70 // Hide this placeholder. |
| 71 void HidePlugin(); | 71 void HidePlugin(); |
| 72 | 72 |
| 73 // Load the blocked plugin. | 73 // Load the blocked plugin. |
| 74 void LoadPlugin(); | 74 void LoadPlugin(); |
| 75 | 75 |
| 76 // WebViewPlugin::Delegate (via PluginPlaceholder) method | |
| 77 void BindWebFrame(blink::WebFrame* frame) override; | |
| 78 | |
| 79 // gin::Wrappable method: | 76 // gin::Wrappable method: |
| 80 gin::ObjectTemplateBuilder GetObjectTemplateBuilder( | 77 gin::ObjectTemplateBuilder GetObjectTemplateBuilder( |
| 81 v8::Isolate* isolate) override; | 78 v8::Isolate* isolate) override; |
| 82 | 79 |
| 83 private: | 80 private: |
| 84 // WebViewPlugin::Delegate methods: | 81 // WebViewPlugin::Delegate methods: |
| 85 void PluginDestroyed() override; | 82 void PluginDestroyed() override; |
| 86 v8::Local<v8::Object> GetV8ScriptableObject( | 83 v8::Local<v8::Object> GetV8ScriptableObject( |
| 87 v8::Isolate* isolate) const override; | 84 v8::Isolate* isolate) const override; |
| 88 | 85 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 std::string identifier_; | 127 std::string identifier_; |
| 131 | 128 |
| 132 base::WeakPtrFactory<LoadablePluginPlaceholder> weak_factory_; | 129 base::WeakPtrFactory<LoadablePluginPlaceholder> weak_factory_; |
| 133 | 130 |
| 134 DISALLOW_COPY_AND_ASSIGN(LoadablePluginPlaceholder); | 131 DISALLOW_COPY_AND_ASSIGN(LoadablePluginPlaceholder); |
| 135 }; | 132 }; |
| 136 | 133 |
| 137 } // namespace plugins | 134 } // namespace plugins |
| 138 | 135 |
| 139 #endif // COMPONENTS_PLUGINS_RENDERER_LOADABLE_PLUGIN_PLACEHOLDER_H_ | 136 #endif // COMPONENTS_PLUGINS_RENDERER_LOADABLE_PLUGIN_PLACEHOLDER_H_ |
| OLD | NEW |