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 "components/plugins/renderer/loadable_plugin_placeholder.h" | 8 #include "components/plugins/renderer/loadable_plugin_placeholder.h" |
9 #include "content/public/renderer/context_menu_client.h" | 9 #include "content/public/renderer/context_menu_client.h" |
10 #include "content/public/renderer/render_process_observer.h" | 10 #include "content/public/renderer/render_process_observer.h" |
11 | 11 |
12 struct ChromeViewHostMsg_GetPluginInfo_Status; | 12 struct ChromeViewHostMsg_GetPluginInfo_Status; |
13 | 13 |
14 class ChromePluginPlaceholder : public plugins::LoadablePluginPlaceholder, | 14 class ChromePluginPlaceholder : public plugins::LoadablePluginPlaceholder, |
15 public content::RenderProcessObserver, | 15 public content::RenderProcessObserver, |
16 public content::ContextMenuClient { | 16 public content::ContextMenuClient { |
17 public: | 17 public: |
18 static const char kPluginPlaceholderDataURL[]; | 18 static const char kPluginPlaceholderDataURL[]; |
19 | 19 |
20 static ChromePluginPlaceholder* CreateBlockedPlugin( | 20 static ChromePluginPlaceholder* CreateBlockedPlugin( |
21 content::RenderFrame* render_frame, | 21 content::RenderFrame* render_frame, |
22 blink::WebLocalFrame* frame, | 22 blink::WebLocalFrame* frame, |
23 const blink::WebPluginParams& params, | 23 const blink::WebPluginParams& params, |
24 const content::WebPluginInfo& info, | 24 const content::WebPluginInfo& info, |
25 const std::string& identifier, | 25 const std::string& identifier, |
26 const base::string16& name, | 26 const base::string16& name, |
27 int resource_id, | 27 int resource_id, |
28 const base::string16& message, | 28 const base::string16& message, |
29 const GURL& poster_url); | 29 const GURL& poster_url, |
| 30 blink::WebPlugin* premade_plugin, |
| 31 content::PluginInstanceThrottler* premade_throttler); |
30 | 32 |
31 // Creates a new WebViewPlugin with a MissingPlugin as a delegate. | 33 // Creates a new WebViewPlugin with a MissingPlugin as a delegate. |
32 static ChromePluginPlaceholder* CreateMissingPlugin( | 34 static ChromePluginPlaceholder* CreateMissingPlugin( |
33 content::RenderFrame* render_frame, | 35 content::RenderFrame* render_frame, |
34 blink::WebLocalFrame* frame, | 36 blink::WebLocalFrame* frame, |
35 const blink::WebPluginParams& params); | 37 const blink::WebPluginParams& params); |
36 | 38 |
37 static ChromePluginPlaceholder* CreateErrorPlugin( | 39 static ChromePluginPlaceholder* CreateErrorPlugin( |
38 content::RenderFrame* render_frame, | 40 content::RenderFrame* render_frame, |
39 const base::FilePath& plugin_path); | 41 const base::FilePath& plugin_path); |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 #endif | 99 #endif |
98 | 100 |
99 bool has_host_; | 101 bool has_host_; |
100 int context_menu_request_id_; // Nonzero when request pending. | 102 int context_menu_request_id_; // Nonzero when request pending. |
101 base::string16 plugin_name_; | 103 base::string16 plugin_name_; |
102 | 104 |
103 DISALLOW_COPY_AND_ASSIGN(ChromePluginPlaceholder); | 105 DISALLOW_COPY_AND_ASSIGN(ChromePluginPlaceholder); |
104 }; | 106 }; |
105 | 107 |
106 #endif // CHROME_RENDERER_PLUGINS_CHROME_PLUGIN_PLACEHOLDER_H_ | 108 #endif // CHROME_RENDERER_PLUGINS_CHROME_PLUGIN_PLACEHOLDER_H_ |
OLD | NEW |