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

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

Issue 981623003: Plugin Power Saver: Implement srcset syntax for posters. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
OLDNEW
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 // If |poster_attribute| contains relative paths, |base_url| must be
21 // non-empty. This is so the placeholder can resolve the relative paths.
20 static ChromePluginPlaceholder* CreateBlockedPlugin( 22 static ChromePluginPlaceholder* CreateBlockedPlugin(
21 content::RenderFrame* render_frame, 23 content::RenderFrame* render_frame,
22 blink::WebLocalFrame* frame, 24 blink::WebLocalFrame* frame,
23 const blink::WebPluginParams& params, 25 const blink::WebPluginParams& params,
24 const content::WebPluginInfo& info, 26 const content::WebPluginInfo& info,
25 const std::string& identifier, 27 const std::string& identifier,
26 const base::string16& name, 28 const base::string16& name,
27 int resource_id, 29 int resource_id,
28 const base::string16& message, 30 const base::string16& message,
29 const GURL& poster_url); 31 const std::string& poster_attribute,
32 const GURL& base_url);
30 33
31 // Creates a new WebViewPlugin with a MissingPlugin as a delegate. 34 // Creates a new WebViewPlugin with a MissingPlugin as a delegate.
32 static ChromePluginPlaceholder* CreateMissingPlugin( 35 static ChromePluginPlaceholder* CreateMissingPlugin(
33 content::RenderFrame* render_frame, 36 content::RenderFrame* render_frame,
34 blink::WebLocalFrame* frame, 37 blink::WebLocalFrame* frame,
35 const blink::WebPluginParams& params); 38 const blink::WebPluginParams& params);
36 39
37 static ChromePluginPlaceholder* CreateErrorPlugin( 40 static ChromePluginPlaceholder* CreateErrorPlugin(
38 content::RenderFrame* render_frame, 41 content::RenderFrame* render_frame,
39 const base::FilePath& plugin_path); 42 const base::FilePath& plugin_path);
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 #endif 100 #endif
98 101
99 bool has_host_; 102 bool has_host_;
100 int context_menu_request_id_; // Nonzero when request pending. 103 int context_menu_request_id_; // Nonzero when request pending.
101 base::string16 plugin_name_; 104 base::string16 plugin_name_;
102 105
103 DISALLOW_COPY_AND_ASSIGN(ChromePluginPlaceholder); 106 DISALLOW_COPY_AND_ASSIGN(ChromePluginPlaceholder);
104 }; 107 };
105 108
106 #endif // CHROME_RENDERER_PLUGINS_CHROME_PLUGIN_PLACEHOLDER_H_ 109 #endif // CHROME_RENDERER_PLUGINS_CHROME_PLUGIN_PLACEHOLDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698