| 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 CHROME_RENDERER_PLUGINS_CHROME_PLUGIN_PLACEHOLDER_H_ | 5 #ifndef CHROME_RENDERER_PLUGINS_CHROME_PLUGIN_PLACEHOLDER_H_ |
| 6 #define CHROME_RENDERER_PLUGINS_CHROME_PLUGIN_PLACEHOLDER_H_ | 6 #define CHROME_RENDERER_PLUGINS_CHROME_PLUGIN_PLACEHOLDER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 content::RenderFrame* render_frame, | 30 content::RenderFrame* render_frame, |
| 31 blink::WebLocalFrame* frame, | 31 blink::WebLocalFrame* frame, |
| 32 const blink::WebPluginParams& params, | 32 const blink::WebPluginParams& params, |
| 33 const content::WebPluginInfo& info, | 33 const content::WebPluginInfo& info, |
| 34 const std::string& identifier, | 34 const std::string& identifier, |
| 35 const base::string16& name, | 35 const base::string16& name, |
| 36 int resource_id, | 36 int resource_id, |
| 37 const base::string16& message, | 37 const base::string16& message, |
| 38 const PowerSaverInfo& power_saver_info); | 38 const PowerSaverInfo& power_saver_info); |
| 39 | 39 |
| 40 // Create a plugin placeholder that delays until sizing is known. | |
| 41 static ChromePluginPlaceholder* CreateDelayedPlugin( | |
| 42 content::RenderFrame* render_frame, | |
| 43 blink::WebLocalFrame* frame, | |
| 44 const blink::WebPluginParams& params, | |
| 45 const content::WebPluginInfo& info, | |
| 46 const std::string& identifier, | |
| 47 const base::string16& name, | |
| 48 const PowerSaverInfo& power_saver_info); | |
| 49 | |
| 50 // Creates a new WebViewPlugin with a MissingPlugin as a delegate. | 40 // Creates a new WebViewPlugin with a MissingPlugin as a delegate. |
| 51 static ChromePluginPlaceholder* CreateLoadableMissingPlugin( | 41 static ChromePluginPlaceholder* CreateLoadableMissingPlugin( |
| 52 content::RenderFrame* render_frame, | 42 content::RenderFrame* render_frame, |
| 53 blink::WebLocalFrame* frame, | 43 blink::WebLocalFrame* frame, |
| 54 const blink::WebPluginParams& params); | 44 const blink::WebPluginParams& params); |
| 55 | 45 |
| 56 void SetStatus(ChromeViewHostMsg_GetPluginInfo_Status status); | 46 void SetStatus(ChromeViewHostMsg_GetPluginInfo_Status status); |
| 57 | 47 |
| 58 #if defined(ENABLE_PLUGIN_INSTALLATION) | 48 #if defined(ENABLE_PLUGIN_INSTALLATION) |
| 59 int32_t CreateRoutingId(); | 49 int32_t CreateRoutingId(); |
| 60 #endif | 50 #endif |
| 61 | 51 |
| 62 private: | 52 private: |
| 63 ChromePluginPlaceholder(content::RenderFrame* render_frame, | 53 ChromePluginPlaceholder(content::RenderFrame* render_frame, |
| 64 blink::WebLocalFrame* frame, | 54 blink::WebLocalFrame* frame, |
| 65 const blink::WebPluginParams& params, | 55 const blink::WebPluginParams& params, |
| 66 const std::string& html_data, | 56 const std::string& html_data, |
| 67 const base::string16& title); | 57 const base::string16& title); |
| 68 ~ChromePluginPlaceholder() override; | 58 ~ChromePluginPlaceholder() override; |
| 69 | 59 |
| 70 // content::LoadablePluginPlaceholder overrides. | 60 // content::LoadablePluginPlaceholder overrides. |
| 71 blink::WebPlugin* CreatePlugin() override; | 61 blink::WebPlugin* CreatePlugin() override; |
| 72 void OnLoadedRectUpdate( | 62 void OnBlockedTinyContent() override; |
| 73 const gfx::Rect& unobscured_rect, | |
| 74 content::RenderFrame::PeripheralContentStatus status) override; | |
| 75 | 63 |
| 76 // gin::Wrappable (via PluginPlaceholder) method | 64 // gin::Wrappable (via PluginPlaceholder) method |
| 77 gin::ObjectTemplateBuilder GetObjectTemplateBuilder( | 65 gin::ObjectTemplateBuilder GetObjectTemplateBuilder( |
| 78 v8::Isolate* isolate) final; | 66 v8::Isolate* isolate) final; |
| 79 | 67 |
| 80 // content::RenderViewObserver (via PluginPlaceholder) override: | 68 // content::RenderViewObserver (via PluginPlaceholder) override: |
| 81 bool OnMessageReceived(const IPC::Message& message) override; | 69 bool OnMessageReceived(const IPC::Message& message) override; |
| 82 | 70 |
| 83 // WebViewPlugin::Delegate (via PluginPlaceholder) methods: | 71 // WebViewPlugin::Delegate (via PluginPlaceholder) methods: |
| 84 v8::Local<v8::Value> GetV8Handle(v8::Isolate* isolate) override; | 72 v8::Local<v8::Value> GetV8Handle(v8::Isolate* isolate) override; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 113 // |routing_id()| is the routing ID of our associated RenderView, but we have | 101 // |routing_id()| is the routing ID of our associated RenderView, but we have |
| 114 // a separate routing ID for messages specific to this placeholder. | 102 // a separate routing ID for messages specific to this placeholder. |
| 115 int32_t placeholder_routing_id_ = MSG_ROUTING_NONE; | 103 int32_t placeholder_routing_id_ = MSG_ROUTING_NONE; |
| 116 | 104 |
| 117 bool has_host_ = false; | 105 bool has_host_ = false; |
| 118 #endif | 106 #endif |
| 119 | 107 |
| 120 int context_menu_request_id_; // Nonzero when request pending. | 108 int context_menu_request_id_; // Nonzero when request pending. |
| 121 base::string16 plugin_name_; | 109 base::string16 plugin_name_; |
| 122 | 110 |
| 123 bool ignore_updates_; | 111 bool did_send_blocked_content_notification_; |
| 124 | 112 |
| 125 DISALLOW_COPY_AND_ASSIGN(ChromePluginPlaceholder); | 113 DISALLOW_COPY_AND_ASSIGN(ChromePluginPlaceholder); |
| 126 }; | 114 }; |
| 127 | 115 |
| 128 #endif // CHROME_RENDERER_PLUGINS_CHROME_PLUGIN_PLACEHOLDER_H_ | 116 #endif // CHROME_RENDERER_PLUGINS_CHROME_PLUGIN_PLACEHOLDER_H_ |
| OLD | NEW |