| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chrome/browser/extensions/api/webcam_private/webcam_private_api.h" | 5 #include "chrome/browser/extensions/api/webcam_private/webcam_private_api.h" |
| 6 | 6 |
| 7 #include "chrome/common/extensions/api/webcam_private.h" | 7 #include "chrome/common/extensions/api/webcam_private.h" |
| 8 | 8 |
| 9 namespace extensions { | 9 namespace extensions { |
| 10 | 10 |
| 11 WebcamPrivateSetFunction::WebcamPrivateSetFunction() { | 11 WebcamPrivateSetFunction::WebcamPrivateSetFunction() { |
| 12 } | 12 } |
| 13 | 13 |
| 14 WebcamPrivateSetFunction::~WebcamPrivateSetFunction() { | 14 WebcamPrivateSetFunction::~WebcamPrivateSetFunction() { |
| 15 } | 15 } |
| 16 | 16 |
| 17 bool WebcamPrivateSetFunction::RunImpl() { | 17 bool WebcamPrivateSetFunction::RunSync() { |
| 18 // Get parameters | 18 // Get parameters |
| 19 scoped_ptr<api::webcam_private::Set::Params> params( | 19 scoped_ptr<api::webcam_private::Set::Params> params( |
| 20 api::webcam_private::Set::Params::Create(*args_)); | 20 api::webcam_private::Set::Params::Create(*args_)); |
| 21 EXTENSION_FUNCTION_VALIDATE(params.get()); | 21 EXTENSION_FUNCTION_VALIDATE(params.get()); |
| 22 | 22 |
| 23 // TODO(zork): Send the value to the webcam. | 23 // TODO(zork): Send the value to the webcam. |
| 24 | 24 |
| 25 return true; | 25 return true; |
| 26 } | 26 } |
| 27 | 27 |
| 28 WebcamPrivateGetFunction::WebcamPrivateGetFunction() { | 28 WebcamPrivateGetFunction::WebcamPrivateGetFunction() { |
| 29 } | 29 } |
| 30 | 30 |
| 31 WebcamPrivateGetFunction::~WebcamPrivateGetFunction() { | 31 WebcamPrivateGetFunction::~WebcamPrivateGetFunction() { |
| 32 } | 32 } |
| 33 | 33 |
| 34 bool WebcamPrivateGetFunction::RunImpl() { | 34 bool WebcamPrivateGetFunction::RunSync() { |
| 35 // Get parameters | 35 // Get parameters |
| 36 scoped_ptr<api::webcam_private::Get::Params> params( | 36 scoped_ptr<api::webcam_private::Get::Params> params( |
| 37 api::webcam_private::Get::Params::Create(*args_)); | 37 api::webcam_private::Get::Params::Create(*args_)); |
| 38 EXTENSION_FUNCTION_VALIDATE(params.get()); | 38 EXTENSION_FUNCTION_VALIDATE(params.get()); |
| 39 | 39 |
| 40 // TODO(zork): Get the value from the webcam. | 40 // TODO(zork): Get the value from the webcam. |
| 41 | 41 |
| 42 return false; | 42 return false; |
| 43 } | 43 } |
| 44 | 44 |
| 45 WebcamPrivateResetFunction::WebcamPrivateResetFunction() { | 45 WebcamPrivateResetFunction::WebcamPrivateResetFunction() { |
| 46 } | 46 } |
| 47 | 47 |
| 48 WebcamPrivateResetFunction::~WebcamPrivateResetFunction() { | 48 WebcamPrivateResetFunction::~WebcamPrivateResetFunction() { |
| 49 } | 49 } |
| 50 | 50 |
| 51 bool WebcamPrivateResetFunction::RunImpl() { | 51 bool WebcamPrivateResetFunction::RunSync() { |
| 52 // Get parameters | 52 // Get parameters |
| 53 scoped_ptr<api::webcam_private::Reset::Params> params( | 53 scoped_ptr<api::webcam_private::Reset::Params> params( |
| 54 api::webcam_private::Reset::Params::Create(*args_)); | 54 api::webcam_private::Reset::Params::Create(*args_)); |
| 55 EXTENSION_FUNCTION_VALIDATE(params.get()); | 55 EXTENSION_FUNCTION_VALIDATE(params.get()); |
| 56 | 56 |
| 57 // TODO(zork): Reset the webcam state. | 57 // TODO(zork): Reset the webcam state. |
| 58 | 58 |
| 59 return true; | 59 return true; |
| 60 } | 60 } |
| 61 | 61 |
| 62 } // namespace extensions | 62 } // namespace extensions |
| OLD | NEW |