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

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

Issue 2655853002: Use explicit WebString conversions in plugins code (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « no previous file | components/plugins/renderer/loadable_plugin_placeholder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | components/plugins/renderer/loadable_plugin_placeholder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698