| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 | 69 |
| 70 // Javascript callbacks: | 70 // Javascript callbacks: |
| 71 void LoadCallback(); | 71 void LoadCallback(); |
| 72 void DidFinishLoadingCallback(); | 72 void DidFinishLoadingCallback(); |
| 73 | 73 |
| 74 private: | 74 private: |
| 75 // WebViewPlugin::Delegate methods: | 75 // WebViewPlugin::Delegate methods: |
| 76 void PluginDestroyed() override; | 76 void PluginDestroyed() override; |
| 77 v8::Local<v8::Object> GetV8ScriptableObject( | 77 v8::Local<v8::Object> GetV8ScriptableObject( |
| 78 v8::Isolate* isolate) const override; | 78 v8::Isolate* isolate) const override; |
| 79 void OnUnobscuredSizeUpdate(const gfx::Size& unobscured_size) override; | 79 void OnUnobscuredRectUpdate(const gfx::Rect& unobscured_rect) override; |
| 80 | 80 |
| 81 // RenderFrameObserver methods: | 81 // RenderFrameObserver methods: |
| 82 void WasShown() override; | 82 void WasShown() override; |
| 83 | 83 |
| 84 void UpdateMessage(); | 84 void UpdateMessage(); |
| 85 | 85 |
| 86 bool LoadingBlocked() const; | 86 bool LoadingBlocked() const; |
| 87 void RecheckSizeAndMaybeUnthrottle(); | 87 void RecheckSizeAndMaybeUnthrottle(); |
| 88 | 88 |
| 89 // Plugin creation is embedder-specific. | 89 // Plugin creation is embedder-specific. |
| (...skipping 21 matching lines...) Expand all Loading... |
| 111 // When we load, uses this premade plugin instead of creating a new one. | 111 // When we load, uses this premade plugin instead of creating a new one. |
| 112 content::PluginInstanceThrottler* premade_throttler_; | 112 content::PluginInstanceThrottler* premade_throttler_; |
| 113 | 113 |
| 114 bool allow_loading_; | 114 bool allow_loading_; |
| 115 | 115 |
| 116 bool finished_loading_; | 116 bool finished_loading_; |
| 117 std::string identifier_; | 117 std::string identifier_; |
| 118 | 118 |
| 119 // Used to prevent re-entrancy during the size recheck for throttled plugins. | 119 // Used to prevent re-entrancy during the size recheck for throttled plugins. |
| 120 bool in_size_recheck_; | 120 bool in_size_recheck_; |
| 121 gfx::Size unobscured_size_; | 121 gfx::Rect unobscured_rect_; |
| 122 base::OneShotTimer<LoadablePluginPlaceholder> size_update_timer_; | 122 base::OneShotTimer<LoadablePluginPlaceholder> size_update_timer_; |
| 123 | 123 |
| 124 base::WeakPtrFactory<LoadablePluginPlaceholder> weak_factory_; | 124 base::WeakPtrFactory<LoadablePluginPlaceholder> weak_factory_; |
| 125 | 125 |
| 126 DISALLOW_COPY_AND_ASSIGN(LoadablePluginPlaceholder); | 126 DISALLOW_COPY_AND_ASSIGN(LoadablePluginPlaceholder); |
| 127 }; | 127 }; |
| 128 | 128 |
| 129 } // namespace plugins | 129 } // namespace plugins |
| 130 | 130 |
| 131 #endif // COMPONENTS_PLUGINS_RENDERER_LOADABLE_PLUGIN_PLACEHOLDER_H_ | 131 #endif // COMPONENTS_PLUGINS_RENDERER_LOADABLE_PLUGIN_PLACEHOLDER_H_ |
| OLD | NEW |