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

Side by Side Diff: content/renderer/pepper/pepper_device_enumeration_event_handler.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/renderer/p2p/port_allocator.cc ('k') | content/renderer/render_thread_impl.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/pepper/pepper_device_enumeration_event_handler.h" 5 #include "content/renderer/pepper/pepper_device_enumeration_event_handler.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ppapi/shared_impl/ppb_device_ref_shared.h" 8 #include "ppapi/shared_impl/ppb_device_ref_shared.h"
9 9
10 namespace content { 10 namespace content {
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 } 71 }
72 72
73 void PepperDeviceEnumerationEventHandler::OnDeviceOpened( 73 void PepperDeviceEnumerationEventHandler::OnDeviceOpened(
74 int request_id, 74 int request_id,
75 const std::string& label, 75 const std::string& label,
76 const StreamDeviceInfo& device_info) { 76 const StreamDeviceInfo& device_info) {
77 NotifyDeviceOpened(request_id, true, label); 77 NotifyDeviceOpened(request_id, true, label);
78 } 78 }
79 79
80 void PepperDeviceEnumerationEventHandler::OnDeviceOpenFailed(int request_id) { 80 void PepperDeviceEnumerationEventHandler::OnDeviceOpenFailed(int request_id) {
81 NotifyDeviceOpened(request_id, false, ""); 81 NotifyDeviceOpened(request_id, false, std::string());
82 } 82 }
83 83
84 // static 84 // static
85 MediaStreamType PepperDeviceEnumerationEventHandler::FromPepperDeviceType( 85 MediaStreamType PepperDeviceEnumerationEventHandler::FromPepperDeviceType(
86 PP_DeviceType_Dev type) { 86 PP_DeviceType_Dev type) {
87 switch (type) { 87 switch (type) {
88 case PP_DEVICETYPE_DEV_INVALID: 88 case PP_DEVICETYPE_DEV_INVALID:
89 return MEDIA_NO_SERVICE; 89 return MEDIA_NO_SERVICE;
90 case PP_DEVICETYPE_DEV_AUDIOCAPTURE: 90 case PP_DEVICETYPE_DEV_AUDIOCAPTURE:
91 return MEDIA_DEVICE_AUDIO_CAPTURE; 91 return MEDIA_DEVICE_AUDIO_CAPTURE;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 return; 148 return;
149 } 149 }
150 150
151 PepperPluginDelegateImpl::OpenDeviceCallback callback = iter->second; 151 PepperPluginDelegateImpl::OpenDeviceCallback callback = iter->second;
152 open_callbacks_.erase(iter); 152 open_callbacks_.erase(iter);
153 153
154 callback.Run(request_id, succeeded, label); 154 callback.Run(request_id, succeeded, label);
155 } 155 }
156 156
157 } // namespace content 157 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/p2p/port_allocator.cc ('k') | content/renderer/render_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698