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

Side by Side Diff: media/capture/video/video_capture_device.cc

Issue 2005753006: ImageCapture: ScopedResultCallback (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: reillyg@ second round of comments Created 4 years, 7 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
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 "media/capture/video/video_capture_device.h" 5 #include "media/capture/video/video_capture_device.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/i18n/timezone.h" 8 #include "base/i18n/timezone.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 } 134 }
135 } 135 }
136 #endif 136 #endif
137 137
138 VideoCaptureDevice::Client::Buffer::~Buffer() { 138 VideoCaptureDevice::Client::Buffer::~Buffer() {
139 } 139 }
140 140
141 VideoCaptureDevice::~VideoCaptureDevice() { 141 VideoCaptureDevice::~VideoCaptureDevice() {
142 } 142 }
143 143
144 bool VideoCaptureDevice::TakePhoto(const TakePhotoCallback& photo_callback) { 144 void VideoCaptureDevice::TakePhoto(ScopedCallback<TakePhotoCallback> callback) {
145 NOTIMPLEMENTED();
146 return false;
147 } 145 }
148 146
149 PowerLineFrequency VideoCaptureDevice::GetPowerLineFrequencyForLocation() 147 PowerLineFrequency VideoCaptureDevice::GetPowerLineFrequencyForLocation()
150 const { 148 const {
151 const std::string current_country = base::CountryCodeForCurrentTimezone(); 149 const std::string current_country = base::CountryCodeForCurrentTimezone();
152 if (current_country.empty()) 150 if (current_country.empty())
153 return PowerLineFrequency::FREQUENCY_DEFAULT; 151 return PowerLineFrequency::FREQUENCY_DEFAULT;
154 // Sorted out list of countries with 60Hz power line frequency, from 152 // Sorted out list of countries with 60Hz power line frequency, from
155 // http://en.wikipedia.org/wiki/Mains_electricity_by_country 153 // http://en.wikipedia.org/wiki/Mains_electricity_by_country
156 const char* countries_using_60Hz[] = { 154 const char* countries_using_60Hz[] = {
(...skipping 15 matching lines...) Expand all
172 switch (params.power_line_frequency) { 170 switch (params.power_line_frequency) {
173 case media::PowerLineFrequency::FREQUENCY_50HZ: // fall through 171 case media::PowerLineFrequency::FREQUENCY_50HZ: // fall through
174 case media::PowerLineFrequency::FREQUENCY_60HZ: 172 case media::PowerLineFrequency::FREQUENCY_60HZ:
175 return params.power_line_frequency; 173 return params.power_line_frequency;
176 default: 174 default:
177 return GetPowerLineFrequencyForLocation(); 175 return GetPowerLineFrequencyForLocation();
178 } 176 }
179 } 177 }
180 178
181 } // namespace media 179 } // namespace media
OLDNEW
« media/capture/video/scoped_callback.h ('K') | « media/capture/video/video_capture_device.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698