| OLD | NEW | 
|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "modules/imagecapture/PhotoCapabilities.h" | 5 #include "modules/imagecapture/PhotoCapabilities.h" | 
| 6 | 6 | 
| 7 namespace blink { | 7 namespace blink { | 
| 8 | 8 | 
| 9 // static | 9 // static | 
| 10 PhotoCapabilities* PhotoCapabilities::create() { | 10 PhotoCapabilities* PhotoCapabilities::create() { | 
| 11   return new PhotoCapabilities(); | 11   return new PhotoCapabilities(); | 
| 12 } | 12 } | 
| 13 | 13 | 
| 14 String PhotoCapabilities::fillLightMode() const { | 14 Vector<String> PhotoCapabilities::fillLightMode() const { | 
| 15   switch (m_fillLightMode) { | 15   Vector<String> fillLightModes; | 
| 16     case media::mojom::blink::FillLightMode::NONE: | 16   for (const auto& mode : m_fillLightModes) { | 
| 17       return "none"; | 17     switch (mode) { | 
| 18     case media::mojom::blink::FillLightMode::OFF: | 18       case media::mojom::blink::FillLightMode::OFF: | 
| 19       return "off"; | 19         fillLightModes.push_back("off"); | 
| 20     case media::mojom::blink::FillLightMode::AUTO: | 20         break; | 
| 21       return "auto"; | 21       case media::mojom::blink::FillLightMode::AUTO: | 
| 22     case media::mojom::blink::FillLightMode::FLASH: | 22         fillLightModes.push_back("auto"); | 
| 23       return "flash"; | 23         break; | 
| 24     case media::mojom::blink::FillLightMode::TORCH: | 24       case media::mojom::blink::FillLightMode::FLASH: | 
| 25       return "torch"; | 25         fillLightModes.push_back("flash"); | 
| 26     default: | 26         break; | 
| 27       NOTREACHED(); | 27       default: | 
|  | 28         NOTREACHED(); | 
|  | 29     } | 
| 28   } | 30   } | 
| 29   return emptyString; | 31   return fillLightModes; | 
|  | 32 } | 
|  | 33 | 
|  | 34 String PhotoCapabilities::redEyeReduction() const { | 
|  | 35   return m_redEyeReduction ? "controllable" : "never"; | 
| 30 } | 36 } | 
| 31 | 37 | 
| 32 DEFINE_TRACE(PhotoCapabilities) { | 38 DEFINE_TRACE(PhotoCapabilities) { | 
| 33   visitor->trace(m_imageHeight); | 39   visitor->trace(m_imageHeight); | 
| 34   visitor->trace(m_imageWidth); | 40   visitor->trace(m_imageWidth); | 
| 35 } | 41 } | 
| 36 | 42 | 
| 37 }  // namespace blink | 43 }  // namespace blink | 
| OLD | NEW | 
|---|