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

Unified Diff: chrome/browser/extensions/api/webcam_private/webcam_private_api.cc

Issue 205243005: Add chrome.webcamPrivate idl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix unittest Created 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/webcam_private/webcam_private_api.cc
diff --git a/chrome/browser/extensions/api/webcam_private/webcam_private_api.cc b/chrome/browser/extensions/api/webcam_private/webcam_private_api.cc
new file mode 100644
index 0000000000000000000000000000000000000000..f956ba4a11d4f056906d3fec1168d3f802cca9c6
--- /dev/null
+++ b/chrome/browser/extensions/api/webcam_private/webcam_private_api.cc
@@ -0,0 +1,62 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/extensions/api/webcam_private/webcam_private_api.h"
+
+#include "chrome/common/extensions/api/webcam_private.h"
+
+namespace extensions {
+
+WebcamPrivateSetFunction::WebcamPrivateSetFunction() {
+}
+
+WebcamPrivateSetFunction::~WebcamPrivateSetFunction() {
+}
+
+bool WebcamPrivateSetFunction::RunImpl() {
+ // Get parameters
+ scoped_ptr<api::webcam_private::Set::Params> params(
+ api::webcam_private::Set::Params::Create(*args_));
+ EXTENSION_FUNCTION_VALIDATE(params.get());
+
+ // TODO(zork): Send the value to the webcam.
+
+ return true;
+}
+
+WebcamPrivateGetFunction::WebcamPrivateGetFunction() {
+}
+
+WebcamPrivateGetFunction::~WebcamPrivateGetFunction() {
+}
+
+bool WebcamPrivateGetFunction::RunImpl() {
+ // Get parameters
+ scoped_ptr<api::webcam_private::Get::Params> params(
+ api::webcam_private::Get::Params::Create(*args_));
+ EXTENSION_FUNCTION_VALIDATE(params.get());
+
+ // TODO(zork): Get the value from the webcam.
+
+ return false;
+}
+
+WebcamPrivateResetFunction::WebcamPrivateResetFunction() {
+}
+
+WebcamPrivateResetFunction::~WebcamPrivateResetFunction() {
+}
+
+bool WebcamPrivateResetFunction::RunImpl() {
+ // Get parameters
+ scoped_ptr<api::webcam_private::Reset::Params> params(
+ api::webcam_private::Reset::Params::Create(*args_));
+ EXTENSION_FUNCTION_VALIDATE(params.get());
+
+ // TODO(zork): Reset the webcam state.
+
+ return true;
+}
+
+} // namespace extensions
« no previous file with comments | « chrome/browser/extensions/api/webcam_private/webcam_private_api.h ('k') | chrome/chrome_browser_extensions.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698