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

Side by Side Diff: content/renderer/browser_plugin/browser_plugin.cc

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « content/public/test/test_launcher.cc ('k') | content/renderer/date_time_formatter.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 (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 #include "content/renderer/browser_plugin/browser_plugin.h" 5 #include "content/renderer/browser_plugin/browser_plugin.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/json/json_string_value_serializer.h" 8 #include "base/json/json_string_value_serializer.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 return browser_plugin::kPermissionTypeMedia; 103 return browser_plugin::kPermissionTypeMedia;
104 case BrowserPluginPermissionTypeNewWindow: 104 case BrowserPluginPermissionTypeNewWindow:
105 return browser_plugin::kPermissionTypeNewWindow; 105 return browser_plugin::kPermissionTypeNewWindow;
106 case BrowserPluginPermissionTypePointerLock: 106 case BrowserPluginPermissionTypePointerLock:
107 return browser_plugin::kPermissionTypePointerLock; 107 return browser_plugin::kPermissionTypePointerLock;
108 case BrowserPluginPermissionTypeUnknown: 108 case BrowserPluginPermissionTypeUnknown:
109 default: 109 default:
110 NOTREACHED(); 110 NOTREACHED();
111 break; 111 break;
112 } 112 }
113 return ""; 113 return std::string();
114 } 114 }
115 115
116 typedef std::map<WebKit::WebPluginContainer*, 116 typedef std::map<WebKit::WebPluginContainer*,
117 BrowserPlugin*> PluginContainerMap; 117 BrowserPlugin*> PluginContainerMap;
118 static base::LazyInstance<PluginContainerMap> g_plugin_container_map = 118 static base::LazyInstance<PluginContainerMap> g_plugin_container_map =
119 LAZY_INSTANCE_INITIALIZER; 119 LAZY_INSTANCE_INITIALIZER;
120 120
121 } // namespace 121 } // namespace
122 122
123 BrowserPlugin::BrowserPlugin( 123 BrowserPlugin::BrowserPlugin(
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 if (!container()) 220 if (!container())
221 return; 221 return;
222 222
223 container()->element().removeAttribute( 223 container()->element().removeAttribute(
224 WebKit::WebString::fromUTF8(attribute_name)); 224 WebKit::WebString::fromUTF8(attribute_name));
225 } 225 }
226 226
227 std::string BrowserPlugin::GetDOMAttributeValue( 227 std::string BrowserPlugin::GetDOMAttributeValue(
228 const std::string& attribute_name) const { 228 const std::string& attribute_name) const {
229 if (!container()) 229 if (!container())
230 return ""; 230 return std::string();
231 231
232 return container()->element().getAttribute( 232 return container()->element().getAttribute(
233 WebKit::WebString::fromUTF8(attribute_name)).utf8(); 233 WebKit::WebString::fromUTF8(attribute_name)).utf8();
234 } 234 }
235 235
236 bool BrowserPlugin::HasDOMAttribute(const std::string& attribute_name) const { 236 bool BrowserPlugin::HasDOMAttribute(const std::string& attribute_name) const {
237 if (!container()) 237 if (!container())
238 return false; 238 return false;
239 239
240 return container()->element().hasAttribute( 240 return container()->element().hasAttribute(
(...skipping 1295 matching lines...) Expand 10 before | Expand all | Expand 10 after
1536 const WebKit::WebMouseEvent& event) { 1536 const WebKit::WebMouseEvent& event) {
1537 browser_plugin_manager()->Send( 1537 browser_plugin_manager()->Send(
1538 new BrowserPluginHostMsg_HandleInputEvent(render_view_routing_id_, 1538 new BrowserPluginHostMsg_HandleInputEvent(render_view_routing_id_,
1539 instance_id_, 1539 instance_id_,
1540 plugin_rect_, 1540 plugin_rect_,
1541 &event)); 1541 &event));
1542 return true; 1542 return true;
1543 } 1543 }
1544 1544
1545 } // namespace content 1545 } // namespace content
OLDNEW
« no previous file with comments | « content/public/test/test_launcher.cc ('k') | content/renderer/date_time_formatter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698