Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: chrome/renderer/plugins/plugin_placeholder.h

Issue 10274020: Revert 134620 - Show a replacement plug-in for loading errors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:mergeinfo
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_PLUGIN_PLACEHOLDER_H_ 5 #ifndef CHROME_RENDERER_PLUGINS_PLUGIN_PLACEHOLDER_H_
6 #define CHROME_RENDERER_PLUGINS_PLUGIN_PLACEHOLDER_H_ 6 #define CHROME_RENDERER_PLUGINS_PLUGIN_PLACEHOLDER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "content/public/renderer/render_process_observer.h" 9 #include "content/public/renderer/render_process_observer.h"
10 #include "content/public/renderer/render_view_observer.h" 10 #include "content/public/renderer/render_view_observer.h"
11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginParams.h" 11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginParams.h"
12 #include "webkit/glue/cpp_bound_class.h" 12 #include "webkit/glue/cpp_bound_class.h"
13 #include "webkit/plugins/webplugininfo.h" 13 #include "webkit/plugins/webplugininfo.h"
14 #include "webkit/plugins/webview_plugin.h" 14 #include "webkit/plugins/webview_plugin.h"
15 15
16 struct ChromeViewHostMsg_GetPluginInfo_Status; 16 struct ChromeViewHostMsg_GetPluginInfo_Status;
17 17
18 namespace webkit { 18 namespace webkit {
19 struct WebPluginInfo;
19 namespace npapi { 20 namespace npapi {
20 class PluginGroup; 21 class PluginGroup;
21 } 22 }
22 struct WebPluginInfo;
23 } 23 }
24 24
25 // Placeholders can be used if a plug-in is missing or not available 25 // Placeholders can be used if a plug-in is missing or not available
26 // (blocked or disabled). 26 // (blocked or disabled).
27 class PluginPlaceholder : public content::RenderViewObserver, 27 class PluginPlaceholder : public content::RenderViewObserver,
28 public content::RenderProcessObserver, 28 public content::RenderProcessObserver,
29 public CppBoundClass, 29 public CppBoundClass,
30 public webkit::WebViewPlugin::Delegate { 30 public webkit::WebViewPlugin::Delegate {
31 public: 31 public:
32 // Creates a new WebViewPlugin with a MissingPlugin as a delegate. 32 // Creates a new WebViewPlugin with a MissingPlugin as a delegate.
33 static PluginPlaceholder* CreateMissingPlugin( 33 static PluginPlaceholder* CreateMissingPlugin(
34 content::RenderView* render_view, 34 content::RenderView* render_view,
35 WebKit::WebFrame* frame, 35 WebKit::WebFrame* frame,
36 const WebKit::WebPluginParams& params); 36 const WebKit::WebPluginParams& params);
37 37
38 static PluginPlaceholder* CreateErrorPlugin(
39 content::RenderView* render_view,
40 const FilePath& plugin_path);
41
42 static PluginPlaceholder* CreateBlockedPlugin( 38 static PluginPlaceholder* CreateBlockedPlugin(
43 content::RenderView* render_view, 39 content::RenderView* render_view,
44 WebKit::WebFrame* frame, 40 WebKit::WebFrame* frame,
45 const WebKit::WebPluginParams& params, 41 const WebKit::WebPluginParams& params,
46 const webkit::WebPluginInfo& info, 42 const webkit::WebPluginInfo& info,
47 const string16& name, 43 const string16& name,
48 int resource_id, 44 int resource_id,
49 int message_id); 45 int message_id);
50 46
51 webkit::WebViewPlugin* plugin() { return plugin_; } 47 webkit::WebViewPlugin* plugin() { return plugin_; }
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 148
153 bool hidden_; 149 bool hidden_;
154 bool has_host_; 150 bool has_host_;
155 bool finished_loading_; 151 bool finished_loading_;
156 string16 plugin_name_; 152 string16 plugin_name_;
157 153
158 DISALLOW_COPY_AND_ASSIGN(PluginPlaceholder); 154 DISALLOW_COPY_AND_ASSIGN(PluginPlaceholder);
159 }; 155 };
160 156
161 #endif // CHROME_RENDERER_PLUGINS_PLUGIN_PLACEHOLDER_H_ 157 #endif // CHROME_RENDERER_PLUGINS_PLUGIN_PLACEHOLDER_H_
OLDNEW
« no previous file with comments | « chrome/renderer/chrome_content_renderer_client.cc ('k') | chrome/renderer/plugins/plugin_placeholder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698