OLD | NEW |
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 CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ | 5 #ifndef CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ |
6 #define CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ | 6 #define CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/process.h" | 9 #include "base/process.h" |
10 #include "content/renderer/render_view_impl.h" | 10 #include "content/renderer/render_view_impl.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 | 62 |
63 RenderViewImpl* render_view() { return render_view_; } | 63 RenderViewImpl* render_view() { return render_view_; } |
64 | 64 |
65 private: | 65 private: |
66 BrowserPlugin(RenderViewImpl* render_view, | 66 BrowserPlugin(RenderViewImpl* render_view, |
67 WebKit::WebFrame* frame, | 67 WebKit::WebFrame* frame, |
68 const WebKit::WebPluginParams& params, | 68 const WebKit::WebPluginParams& params, |
69 const std::string& html_data); | 69 const std::string& html_data); |
70 virtual ~BrowserPlugin(); | 70 virtual ~BrowserPlugin(); |
71 | 71 |
72 // Parses the width, height, and source URL of the browser plugin | 72 // Parses the source URL of the browser plugin from the element's attributes |
73 // from the element's attributes and outputs them. If not found, it outputs | 73 // and outputs them. If not found, it outputs the defaults specified here as |
74 // the defaults specified here as parameters. | 74 // parameters. |
75 void ParsePluginParameters(int default_width, int default_height, | 75 void ParseSrcAttribute(const std::string& default_src, std::string* src); |
76 const std::string& default_src, | |
77 gfx::Size* size, | |
78 std::string* src); | |
79 // Replace the current guest with a new guest. | 76 // Replace the current guest with a new guest. |
80 void Replace(webkit::ppapi::WebPluginImpl* new_plugin); | 77 void Replace(webkit::ppapi::WebPluginImpl* new_plugin); |
81 | 78 |
82 RenderViewImpl* render_view_; | 79 RenderViewImpl* render_view_; |
83 WebKit::WebPluginParams plugin_params_; | 80 WebKit::WebPluginParams plugin_params_; |
84 webkit::WebViewPlugin* placeholder_; | 81 webkit::WebViewPlugin* placeholder_; |
85 webkit::ppapi::WebPluginImpl* plugin_; | 82 webkit::ppapi::WebPluginImpl* plugin_; |
86 int id_; | 83 int id_; |
87 | 84 |
88 DISALLOW_COPY_AND_ASSIGN(BrowserPlugin); | 85 DISALLOW_COPY_AND_ASSIGN(BrowserPlugin); |
89 }; | 86 }; |
90 | 87 |
91 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ | 88 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ |
OLD | NEW |