| 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 <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 | 84 |
| 85 // True if the power saver heuristic has already been run on this content. | 85 // True if the power saver heuristic has already been run on this content. |
| 86 bool heuristic_run_before_; | 86 bool heuristic_run_before_; |
| 87 | 87 |
| 88 private: | 88 private: |
| 89 // WebViewPlugin::Delegate methods: | 89 // WebViewPlugin::Delegate methods: |
| 90 void PluginDestroyed() override; | 90 void PluginDestroyed() override; |
| 91 v8::Local<v8::Object> GetV8ScriptableObject( | 91 v8::Local<v8::Object> GetV8ScriptableObject( |
| 92 v8::Isolate* isolate) const override; | 92 v8::Isolate* isolate) const override; |
| 93 void OnUnobscuredRectUpdate(const gfx::Rect& unobscured_rect) override; | 93 void OnUnobscuredRectUpdate(const gfx::Rect& unobscured_rect) override; |
| 94 bool IsErrorPlaceholder() override; |
| 94 | 95 |
| 95 // RenderFrameObserver methods: | 96 // RenderFrameObserver methods: |
| 96 void WasShown() override; | 97 void WasShown() override; |
| 97 | 98 |
| 98 void UpdateMessage(); | 99 void UpdateMessage(); |
| 99 | 100 |
| 100 bool LoadingBlocked() const; | 101 bool LoadingBlocked() const; |
| 101 | 102 |
| 102 // Plugin creation is embedder-specific. | 103 // Plugin creation is embedder-specific. |
| 103 virtual blink::WebPlugin* CreatePlugin() = 0; | 104 virtual blink::WebPlugin* CreatePlugin() = 0; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 gfx::Rect unobscured_rect_; | 140 gfx::Rect unobscured_rect_; |
| 140 | 141 |
| 141 base::WeakPtrFactory<LoadablePluginPlaceholder> weak_factory_; | 142 base::WeakPtrFactory<LoadablePluginPlaceholder> weak_factory_; |
| 142 | 143 |
| 143 DISALLOW_COPY_AND_ASSIGN(LoadablePluginPlaceholder); | 144 DISALLOW_COPY_AND_ASSIGN(LoadablePluginPlaceholder); |
| 144 }; | 145 }; |
| 145 | 146 |
| 146 } // namespace plugins | 147 } // namespace plugins |
| 147 | 148 |
| 148 #endif // COMPONENTS_PLUGINS_RENDERER_LOADABLE_PLUGIN_PLACEHOLDER_H_ | 149 #endif // COMPONENTS_PLUGINS_RENDERER_LOADABLE_PLUGIN_PLACEHOLDER_H_ |
| OLD | NEW |