| 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 "base/timer/timer.h" | 9 #include "base/timer/timer.h" |
| 10 #include "components/plugins/renderer/plugin_placeholder.h" | 10 #include "components/plugins/renderer/plugin_placeholder.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 // Replace this placeholder with a different plugin (which could be | 65 // Replace this placeholder with a different plugin (which could be |
| 66 // a placeholder again). | 66 // a placeholder again). |
| 67 void ReplacePlugin(blink::WebPlugin* new_plugin); | 67 void ReplacePlugin(blink::WebPlugin* new_plugin); |
| 68 | 68 |
| 69 // Load the blocked plugin. | 69 // Load the blocked plugin. |
| 70 void LoadPlugin(); | 70 void LoadPlugin(); |
| 71 | 71 |
| 72 // Javascript callbacks: | 72 // Javascript callbacks: |
| 73 void LoadCallback(); | 73 void LoadCallback(); |
| 74 void DidFinishLoadingCallback(); | 74 void DidFinishLoadingCallback(); |
| 75 void DidFinishIconRepositionForTestingCallback(); |
| 75 | 76 |
| 76 private: | 77 private: |
| 77 // WebViewPlugin::Delegate methods: | 78 // WebViewPlugin::Delegate methods: |
| 78 void PluginDestroyed() override; | 79 void PluginDestroyed() override; |
| 79 v8::Local<v8::Object> GetV8ScriptableObject( | 80 v8::Local<v8::Object> GetV8ScriptableObject( |
| 80 v8::Isolate* isolate) const override; | 81 v8::Isolate* isolate) const override; |
| 81 void OnUnobscuredRectUpdate(const gfx::Rect& unobscured_rect) override; | 82 void OnUnobscuredRectUpdate(const gfx::Rect& unobscured_rect) override; |
| 82 | 83 |
| 83 // RenderFrameObserver methods: | 84 // RenderFrameObserver methods: |
| 84 void WasShown() override; | 85 void WasShown() override; |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 bool heuristic_run_before_; | 128 bool heuristic_run_before_; |
| 128 | 129 |
| 129 base::WeakPtrFactory<LoadablePluginPlaceholder> weak_factory_; | 130 base::WeakPtrFactory<LoadablePluginPlaceholder> weak_factory_; |
| 130 | 131 |
| 131 DISALLOW_COPY_AND_ASSIGN(LoadablePluginPlaceholder); | 132 DISALLOW_COPY_AND_ASSIGN(LoadablePluginPlaceholder); |
| 132 }; | 133 }; |
| 133 | 134 |
| 134 } // namespace plugins | 135 } // namespace plugins |
| 135 | 136 |
| 136 #endif // COMPONENTS_PLUGINS_RENDERER_LOADABLE_PLUGIN_PLACEHOLDER_H_ | 137 #endif // COMPONENTS_PLUGINS_RENDERER_LOADABLE_PLUGIN_PLACEHOLDER_H_ |
| OLD | NEW |