| 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 #include "chrome/renderer/plugins/chrome_plugin_placeholder.h" | 5 #include "chrome/renderer/plugins/chrome_plugin_placeholder.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 IDR_BLOCKED_PLUGIN_HTML)); | 97 IDR_BLOCKED_PLUGIN_HTML)); |
| 98 | 98 |
| 99 base::DictionaryValue values; | 99 base::DictionaryValue values; |
| 100 values.SetString("message", | 100 values.SetString("message", |
| 101 l10n_util::GetStringUTF8(IDS_PLUGIN_NOT_SUPPORTED)); | 101 l10n_util::GetStringUTF8(IDS_PLUGIN_NOT_SUPPORTED)); |
| 102 | 102 |
| 103 std::string html_data = webui::GetI18nTemplateHtml(template_html, &values); | 103 std::string html_data = webui::GetI18nTemplateHtml(template_html, &values); |
| 104 | 104 |
| 105 // Will destroy itself when its WebViewPlugin is going away. | 105 // Will destroy itself when its WebViewPlugin is going away. |
| 106 return new ChromePluginPlaceholder(render_frame, frame, params, html_data, | 106 return new ChromePluginPlaceholder(render_frame, frame, params, html_data, |
| 107 params.mimeType); | 107 params.mimeType.utf16()); |
| 108 } | 108 } |
| 109 | 109 |
| 110 // static | 110 // static |
| 111 ChromePluginPlaceholder* ChromePluginPlaceholder::CreateBlockedPlugin( | 111 ChromePluginPlaceholder* ChromePluginPlaceholder::CreateBlockedPlugin( |
| 112 content::RenderFrame* render_frame, | 112 content::RenderFrame* render_frame, |
| 113 blink::WebLocalFrame* frame, | 113 blink::WebLocalFrame* frame, |
| 114 const blink::WebPluginParams& params, | 114 const blink::WebPluginParams& params, |
| 115 const content::WebPluginInfo& info, | 115 const content::WebPluginInfo& info, |
| 116 const std::string& identifier, | 116 const std::string& identifier, |
| 117 const base::string16& name, | 117 const base::string16& name, |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 | 413 |
| 414 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 414 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 415 switches::kEnablePluginPlaceholderTesting)) { | 415 switches::kEnablePluginPlaceholderTesting)) { |
| 416 builder.SetMethod<void (ChromePluginPlaceholder::*)()>( | 416 builder.SetMethod<void (ChromePluginPlaceholder::*)()>( |
| 417 "didFinishIconRepositionForTesting", | 417 "didFinishIconRepositionForTesting", |
| 418 &ChromePluginPlaceholder::DidFinishIconRepositionForTestingCallback); | 418 &ChromePluginPlaceholder::DidFinishIconRepositionForTestingCallback); |
| 419 } | 419 } |
| 420 | 420 |
| 421 return builder; | 421 return builder; |
| 422 } | 422 } |
| OLD | NEW |