summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-29 00:30:08 +0000
committervitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-29 00:30:08 +0000
commit9828e7da643f48e36a285b8067470b483cca0717 (patch)
tree7c066daa253584a58213cd03b646c91253bec731
parentd6113978cb5dae92f84a220079c25a5fd2ff0a7e (diff)
downloadchromium_src-9828e7da643f48e36a285b8067470b483cca0717.zip
chromium_src-9828e7da643f48e36a285b8067470b483cca0717.tar.gz
chromium_src-9828e7da643f48e36a285b8067470b483cca0717.tar.bz2
Added Cloud Devices component.
Goal is to move chrome independent code here from chrome/ and cloud_print/ to this directory. BUG=317027 Review URL: https://codereview.chromium.org/140323014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247538 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--components/OWNERS4
-rw-r--r--components/cloud_devices.gypi22
-rw-r--r--components/cloud_devices/OWNERS3
-rw-r--r--components/cloud_devices/cloud_devices_json_consts.cc74
-rw-r--r--components/cloud_devices/cloud_devices_json_consts.h84
-rw-r--r--components/components.gyp1
6 files changed, 188 insertions, 0 deletions
diff --git a/components/OWNERS b/components/OWNERS
index 5ffad98..3a85d8d 100644
--- a/components/OWNERS
+++ b/components/OWNERS
@@ -9,6 +9,10 @@ per-file breakpad.gypi=jochen@chromium.org
per-file breakpad.gypi=rsesek@chromium.org
per-file breakpad.gypi=thestig@chromium.org
+per-file cloud_devices*=gene@chromium.org
+per-file cloud_devices*=noamsml@chromium.org
+per-file cloud_devices*=vitalybuka@chromium.org
+
per-file dom_distiller*=bengr@chromium.org
per-file dom_distiller*=cjhopman@chromium.org
per-file dom_distiller*=nyquist@chromium.org
diff --git a/components/cloud_devices.gypi b/components/cloud_devices.gypi
new file mode 100644
index 0000000..d0ab6a8
--- /dev/null
+++ b/components/cloud_devices.gypi
@@ -0,0 +1,22 @@
+# 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.
+
+{
+ 'targets': [
+ {
+ 'target_name': 'cloud_devices',
+ 'type': 'static_library',
+ 'include_dirs': [
+ '..',
+ ],
+ 'dependencies': [
+ '../base/base.gyp:base',
+ ],
+ 'sources': [
+ 'cloud_devices/cloud_devices_json_consts.cc',
+ 'cloud_devices/cloud_devices_json_consts.h',
+ ],
+ },
+ ],
+}
diff --git a/components/cloud_devices/OWNERS b/components/cloud_devices/OWNERS
new file mode 100644
index 0000000..a0508fc
--- /dev/null
+++ b/components/cloud_devices/OWNERS
@@ -0,0 +1,3 @@
+gene@chromium.org
+noamsml@chromium.org
+vitalybuka@chromium.org
diff --git a/components/cloud_devices/cloud_devices_json_consts.cc b/components/cloud_devices/cloud_devices_json_consts.cc
new file mode 100644
index 0000000..a94c060
--- /dev/null
+++ b/components/cloud_devices/cloud_devices_json_consts.cc
@@ -0,0 +1,74 @@
+// 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 "components/cloud_devices/cloud_devices_json_consts.h"
+
+namespace cloud_devices {
+
+namespace cdd {
+
+const char kVersion[] = "version";
+const char kVersion10[] = "1.0";
+const char kSectionPrinter[] = "printer";
+
+const char kKeyContentType[] = "content_type";
+const char kKeyDefault[] = "default";
+const char kKeyIsDefault[] = "is_default";
+const char kKeyMax[] = "max";
+const char kKeyType[] = "type";
+const char kKeyOption[] = "option";
+const char kKeyVendorId[] = "vendor_id";
+const char kCustomName[] = "custom_display_name";
+
+const char kMargineBottomMicrons[] = "bottom_microns";
+const char kMargineLeftMicrons[] = "left_microns";
+const char kMargineRightMicrons[] = "right_microns";
+const char kMargineTopMicrons[] = "top_microns";
+
+const char kDpiHorizontal[] = "horizontal_dpi";
+const char kDpiVertical[] = "vertical_dpi";
+
+const char kOptionCollate[] = "collate";
+const char kOptionColor[] = "color";
+const char kOptionContentType[] = "supported_content_type";
+const char kOptionCopies[] = "copies";
+const char kOptionDpi[] = "dpi";
+const char kOptionDuplex[] = "duplex";
+const char kOptionFitToPage[] = "fit_to_page";
+const char kOptionMargins[] = "margins";
+const char kOptionMediaSize[] = "media_size";
+const char kOptionPageOrientation[] = "page_orientation";
+const char kOptionPageRange[] = "page_range";
+const char kOptionReverse[] = "reverse_order";
+
+const char kPageRangeEnd[] = "end";
+const char kPageRangeStart[] = "start";
+
+const char kTypeColorColor[] = "STANDARD_COLOR";
+const char kTypeColorMonochrome[] = "STANDARD_MONOCHROME";
+const char kTypeColorCustomColor[] = "CUSTOM_COLOR";
+const char kTypeColorCustomMonochrome[] = "CUSTOM_MONOCHROME";
+const char kTypeColorAuto[] = "AUTO";
+
+const char kTypeDuplexLongEdge[] = "LONG_EDGE";
+const char kTypeDuplexNoDuplex[] = "NO_DUPLEX";
+const char kTypeDuplexShortEdge[] = "SHORT_EDGE";
+
+const char kTypeFitToPageFillPage[] = "FILL_PAGE";
+const char kTypeFitToPageFitToPage[] = "FIT_TO_PAGE";
+const char kTypeFitToPageGrowToPage[] = "GROW_TO_PAGE";
+const char kTypeFitToPageNoFitting[] = "NO_FITTING";
+const char kTypeFitToPageShrinkToPage[] = "SHRINK_TO_PAGE";
+
+const char kTypeMarginsBorderless[] = "BORDERLESS";
+const char kTypeMarginsCustom[] = "CUSTOM";
+const char kTypeMarginsStandard[] = "STANDARD";
+const char kTypeOrientationAuto[] = "AUTO";
+
+const char kTypeOrientationLandscape[] = "LANDSCAPE";
+const char kTypeOrientationPortrait[] = "PORTRAIT";
+
+} // namespace cdd
+
+} // namespace cloud_devices
diff --git a/components/cloud_devices/cloud_devices_json_consts.h b/components/cloud_devices/cloud_devices_json_consts.h
new file mode 100644
index 0000000..5862a50
--- /dev/null
+++ b/components/cloud_devices/cloud_devices_json_consts.h
@@ -0,0 +1,84 @@
+// 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.
+
+// Defines strings constants for parsing Cloud Device Description.
+// https://developers.google.com/cloud-print/docs/cdd
+
+#ifndef COMPONENTS_CLOUD_DEVICES_CLOUD_DEVICES_JSON_CONSTANTS_H_
+#define COMPONENTS_CLOUD_DEVICES_CLOUD_DEVICES_JSON_CONSTANTS_H_
+
+#include <vector>
+
+#include "base/memory/scoped_ptr.h"
+
+namespace cloud_devices {
+
+namespace cdd {
+
+extern const char kVersion[];
+extern const char kVersion10[];
+extern const char kSectionPrinter[];
+
+extern const char kKeyContentType[];
+extern const char kKeyDefault[];
+extern const char kKeyIsDefault[];
+extern const char kKeyMax[];
+extern const char kKeyType[];
+extern const char kKeyOption[];
+extern const char kKeyVendorId[];
+extern const char kCustomName[];
+
+extern const char kMargineBottomMicrons[];
+extern const char kMargineLeftMicrons[];
+extern const char kMargineRightMicrons[];
+extern const char kMargineTopMicrons[];
+
+extern const char kDpiHorizontal[];
+extern const char kDpiVertical[];
+
+extern const char kOptionCollate[];
+extern const char kOptionColor[];
+extern const char kOptionContentType[];
+extern const char kOptionCopies[];
+extern const char kOptionDpi[];
+extern const char kOptionDuplex[];
+extern const char kOptionFitToPage[];
+extern const char kOptionMargins[];
+extern const char kOptionMediaSize[];
+extern const char kOptionPageOrientation[];
+extern const char kOptionPageRange[];
+extern const char kOptionReverse[];
+
+extern const char kPageRangeEnd[];
+extern const char kPageRangeStart[];
+
+extern const char kTypeColorColor[];
+extern const char kTypeColorMonochrome[];
+extern const char kTypeColorCustomColor[];
+extern const char kTypeColorCustomMonochrome[];
+extern const char kTypeColorAuto[];
+
+extern const char kTypeDuplexLongEdge[];
+extern const char kTypeDuplexNoDuplex[];
+extern const char kTypeDuplexShortEdge[];
+
+extern const char kTypeFitToPageFillPage[];
+extern const char kTypeFitToPageFitToPage[];
+extern const char kTypeFitToPageGrowToPage[];
+extern const char kTypeFitToPageNoFitting[];
+extern const char kTypeFitToPageShrinkToPage[];
+
+extern const char kTypeMarginsBorderless[];
+extern const char kTypeMarginsCustom[];
+extern const char kTypeMarginsStandard[];
+extern const char kTypeOrientationAuto[];
+
+extern const char kTypeOrientationLandscape[];
+extern const char kTypeOrientationPortrait[];
+
+} // namespace cdd
+
+} // namespace cloud_devices
+
+#endif // COMPONENTS_CLOUD_DEVICES_CLOUD_DEVICES_JSON_CONSTANTS_H_
diff --git a/components/components.gyp b/components/components.gyp
index 52984ad..c095893 100644
--- a/components/components.gyp
+++ b/components/components.gyp
@@ -13,6 +13,7 @@
'autofill.gypi',
'auto_login_parser.gypi',
'breakpad.gypi',
+ 'cloud_devices.gypi',
'dom_distiller.gypi',
'json_schema.gypi',
'language_usage_metrics.gypi',