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

Side by Side Diff: components/plugins/renderer/plugin_placeholder.cc

Issue 107383002: Use base namespace for string16 in components and cloud_print. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | Annotate | Revision Log
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 "components/plugins/renderer/plugin_placeholder.h" 5 #include "components/plugins/renderer/plugin_placeholder.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/json/string_escape.h" 9 #include "base/json/string_escape.h"
10 #include "base/strings/string_piece.h" 10 #include "base/strings/string_piece.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 if (RE2::PartialMatch(style_str, width_str) && 150 if (RE2::PartialMatch(style_str, width_str) &&
151 RE2::PartialMatch(style_str, height_str)) 151 RE2::PartialMatch(style_str, height_str))
152 element.setAttribute("style", "display: none;"); 152 element.setAttribute("style", "display: none;");
153 } 153 }
154 } 154 }
155 } 155 }
156 } 156 }
157 157
158 void PluginPlaceholder::WillDestroyPlugin() { delete this; } 158 void PluginPlaceholder::WillDestroyPlugin() { delete this; }
159 159
160 void PluginPlaceholder::SetMessage(const string16& message) { 160 void PluginPlaceholder::SetMessage(const base::string16& message) {
161 message_ = message; 161 message_ = message;
162 if (finished_loading_) 162 if (finished_loading_)
163 UpdateMessage(); 163 UpdateMessage();
164 } 164 }
165 165
166 void PluginPlaceholder::UpdateMessage() { 166 void PluginPlaceholder::UpdateMessage() {
167 std::string script = 167 std::string script =
168 "window.setMessage(" + base::GetDoubleQuotedJson(message_) + ")"; 168 "window.setMessage(" + base::GetDoubleQuotedJson(message_) + ")";
169 plugin_->web_view()->mainFrame()->executeScript( 169 plugin_->web_view()->mainFrame()->executeScript(
170 WebScriptSource(ASCIIToUTF16(script))); 170 WebScriptSource(ASCIIToUTF16(script)));
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 return render_frame_; 246 return render_frame_;
247 } 247 }
248 248
249 blink::WebFrame* PluginPlaceholder::GetFrame() { return frame_; } 249 blink::WebFrame* PluginPlaceholder::GetFrame() { return frame_; }
250 250
251 const blink::WebPluginParams& PluginPlaceholder::GetPluginParams() const { 251 const blink::WebPluginParams& PluginPlaceholder::GetPluginParams() const {
252 return plugin_params_; 252 return plugin_params_;
253 } 253 }
254 254
255 } // namespace plugins 255 } // namespace plugins
OLDNEW
« no previous file with comments | « components/plugins/renderer/plugin_placeholder.h ('k') | components/policy/core/browser/policy_error_map.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698