| 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 namespace gfx { | 
|  | 13 class Size; | 
|  | 14 } | 
|  | 15 | 
| 12 struct ChromeViewHostMsg_GetPluginInfo_Status; | 16 struct ChromeViewHostMsg_GetPluginInfo_Status; | 
| 13 | 17 | 
| 14 class ChromePluginPlaceholder : public plugins::LoadablePluginPlaceholder, | 18 class ChromePluginPlaceholder : public plugins::LoadablePluginPlaceholder, | 
| 15                                 public content::RenderProcessObserver, | 19                                 public content::RenderProcessObserver, | 
| 16                                 public content::ContextMenuClient { | 20                                 public content::ContextMenuClient { | 
| 17  public: | 21  public: | 
| 18   static const char kPluginPlaceholderDataURL[]; | 22   static const char kPluginPlaceholderDataURL[]; | 
| 19 | 23 | 
| 20   // If |poster_attribute| contains relative paths, |base_url| must be | 24   // If |poster_attribute| contains relative paths, |base_url| must be | 
| 21   // non-empty. This is so the placeholder can resolve the relative paths. | 25   // non-empty. This is so the placeholder can resolve the relative paths. | 
|  | 26   // |custom_poster_size| is ignored if it is an empty gfx::Size. | 
| 22   static ChromePluginPlaceholder* CreateBlockedPlugin( | 27   static ChromePluginPlaceholder* CreateBlockedPlugin( | 
| 23       content::RenderFrame* render_frame, | 28       content::RenderFrame* render_frame, | 
| 24       blink::WebLocalFrame* frame, | 29       blink::WebLocalFrame* frame, | 
| 25       const blink::WebPluginParams& params, | 30       const blink::WebPluginParams& params, | 
| 26       const content::WebPluginInfo& info, | 31       const content::WebPluginInfo& info, | 
| 27       const std::string& identifier, | 32       const std::string& identifier, | 
| 28       const base::string16& name, | 33       const base::string16& name, | 
| 29       int resource_id, | 34       int resource_id, | 
| 30       const base::string16& message, | 35       const base::string16& message, | 
| 31       const std::string& poster_attribute, | 36       const std::string& poster_attribute, | 
| 32       const GURL& base_url); | 37       const GURL& base_url, | 
|  | 38       const gfx::Size& custom_poster_size); | 
| 33 | 39 | 
| 34   // Creates a new WebViewPlugin with a MissingPlugin as a delegate. | 40   // Creates a new WebViewPlugin with a MissingPlugin as a delegate. | 
| 35   static ChromePluginPlaceholder* CreateMissingPlugin( | 41   static ChromePluginPlaceholder* CreateMissingPlugin( | 
| 36       content::RenderFrame* render_frame, | 42       content::RenderFrame* render_frame, | 
| 37       blink::WebLocalFrame* frame, | 43       blink::WebLocalFrame* frame, | 
| 38       const blink::WebPluginParams& params); | 44       const blink::WebPluginParams& params); | 
| 39 | 45 | 
| 40   static ChromePluginPlaceholder* CreateErrorPlugin( | 46   static ChromePluginPlaceholder* CreateErrorPlugin( | 
| 41       content::RenderFrame* render_frame, | 47       content::RenderFrame* render_frame, | 
| 42       const base::FilePath& plugin_path); | 48       const base::FilePath& plugin_path); | 
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 100 #endif | 106 #endif | 
| 101 | 107 | 
| 102   bool has_host_; | 108   bool has_host_; | 
| 103   int context_menu_request_id_;  // Nonzero when request pending. | 109   int context_menu_request_id_;  // Nonzero when request pending. | 
| 104   base::string16 plugin_name_; | 110   base::string16 plugin_name_; | 
| 105 | 111 | 
| 106   DISALLOW_COPY_AND_ASSIGN(ChromePluginPlaceholder); | 112   DISALLOW_COPY_AND_ASSIGN(ChromePluginPlaceholder); | 
| 107 }; | 113 }; | 
| 108 | 114 | 
| 109 #endif  // CHROME_RENDERER_PLUGINS_CHROME_PLUGIN_PLACEHOLDER_H_ | 115 #endif  // CHROME_RENDERER_PLUGINS_CHROME_PLUGIN_PLACEHOLDER_H_ | 
| OLD | NEW | 
|---|