summaryrefslogtreecommitdiffstats
path: root/cloud_print
diff options
context:
space:
mode:
authorloislo@chromium.org <loislo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-06 10:04:07 +0000
committerloislo@chromium.org <loislo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-06 10:04:07 +0000
commitfeb8adba1e61a87e1827baaf6fe6eaa77bdb5793 (patch)
tree25a01bb2b0e164e4d45e062610ea0c2f8cf2ef55 /cloud_print
parent8782425d38f3a4e20385f7170041d27403531578 (diff)
downloadchromium_src-feb8adba1e61a87e1827baaf6fe6eaa77bdb5793.zip
chromium_src-feb8adba1e61a87e1827baaf6fe6eaa77bdb5793.tar.gz
chromium_src-feb8adba1e61a87e1827baaf6fe6eaa77bdb5793.tar.bz2
Temporary revert "Single binary for unittests."
This reverts commit e1a31ac75aa84f07134de78fc0cec6a49added50. BUG=none TEST=none TBR=vitalybuka Review URL: https://chromiumcodereview.appspot.com/10543020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140731 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cloud_print')
-rw-r--r--cloud_print/cloud_print.gyp48
-rw-r--r--cloud_print/service/win/DEPS (renamed from cloud_print/service/DEPS)0
-rw-r--r--cloud_print/service/win/chrome_launcher.cc2
-rw-r--r--cloud_print/service/win/cloud_print_service.cc4
-rw-r--r--cloud_print/service/win/service.gyp (renamed from cloud_print/service/service.gyp)35
-rw-r--r--cloud_print/service/win/service_state.cc (renamed from cloud_print/service/service_state.cc)2
-rw-r--r--cloud_print/service/win/service_state.h (renamed from cloud_print/service/service_state.h)0
-rw-r--r--cloud_print/service/win/service_state_unittest.cc (renamed from cloud_print/service/service_state_unittest.cc)2
-rw-r--r--cloud_print/service/win/service_switches.cc (renamed from cloud_print/service/service_switches.cc)2
-rw-r--r--cloud_print/service/win/service_switches.h (renamed from cloud_print/service/service_switches.h)0
-rw-r--r--cloud_print/virtual_driver/virtual_driver.gyp15
-rw-r--r--cloud_print/virtual_driver/win/install/virtual_driver_install.gyp9
-rw-r--r--cloud_print/virtual_driver/win/port_monitor/port_monitor.cc73
-rw-r--r--cloud_print/virtual_driver/win/port_monitor/port_monitor.h4
-rw-r--r--cloud_print/virtual_driver/win/port_monitor/port_monitor_dll.cc103
-rw-r--r--cloud_print/virtual_driver/win/port_monitor/port_monitor_unittest.cc11
-rw-r--r--cloud_print/virtual_driver/win/port_monitor/virtual_driver_port_monitor.gyp66
-rw-r--r--cloud_print/virtual_driver/win/virtual_driver.gyp18
-rw-r--r--cloud_print/virtual_driver/win/virtual_driver.gypi53
-rw-r--r--cloud_print/virtual_driver/win/virtual_driver64.gyp26
20 files changed, 189 insertions, 284 deletions
diff --git a/cloud_print/cloud_print.gyp b/cloud_print/cloud_print.gyp
deleted file mode 100644
index bb15405..0000000
--- a/cloud_print/cloud_print.gyp
+++ /dev/null
@@ -1,48 +0,0 @@
-# Copyright (c) 2012 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_print',
- 'type': 'none',
- 'dependencies': [
- 'service/service.gyp:*',
- ],
- 'conditions': [
- ['OS=="win"', {
- 'dependencies': [
- 'virtual_driver/win/install/virtual_driver_install.gyp:*',
- 'virtual_driver/win/virtual_driver.gyp:*',
- 'virtual_driver/win/virtual_driver64.gyp:*',
- ],
- }],
- ],
- },
- {
- 'target_name': 'cloud_print_unittests',
- 'type': 'executable',
- 'sources': [
- 'service/service_state_unittest.cc',
- ],
- 'dependencies': [
- '<(DEPTH)/base/base.gyp:base',
- '<(DEPTH)/base/base.gyp:run_all_unittests',
- '<(DEPTH)/base/base.gyp:test_support_base',
- '<(DEPTH)/testing/gmock.gyp:gmock',
- '<(DEPTH)/testing/gtest.gyp:gtest',
- 'service/service.gyp:cloud_print_service_lib',
- ],
- 'conditions': [
- ['OS=="win"', {
- 'sources': [
- 'virtual_driver/win/port_monitor/port_monitor_unittest.cc',
- ],
- 'dependencies': [
- 'virtual_driver/win/virtual_driver.gyp:gcp_portmon_lib',
- ],
- }],
- ],
- },
- ],
-}
diff --git a/cloud_print/service/DEPS b/cloud_print/service/win/DEPS
index 8fa9d48..8fa9d48 100644
--- a/cloud_print/service/DEPS
+++ b/cloud_print/service/win/DEPS
diff --git a/cloud_print/service/win/chrome_launcher.cc b/cloud_print/service/win/chrome_launcher.cc
index 5921fd0..8b984f0 100644
--- a/cloud_print/service/win/chrome_launcher.cc
+++ b/cloud_print/service/win/chrome_launcher.cc
@@ -12,7 +12,7 @@
#include "base/win/registry.h"
#include "base/win/scoped_handle.h"
#include "base/win/scoped_process_information.h"
-#include "cloud_print/service/service_switches.h"
+#include "cloud_print/service/win/service_switches.h"
namespace {
diff --git a/cloud_print/service/win/cloud_print_service.cc b/cloud_print/service/win/cloud_print_service.cc
index f87c2888..c0948c4 100644
--- a/cloud_print/service/win/cloud_print_service.cc
+++ b/cloud_print/service/win/cloud_print_service.cc
@@ -15,10 +15,10 @@
#include "base/path_service.h"
#include "base/string_util.h"
#include "base/win/scoped_handle.h"
-#include "cloud_print/service/service_state.h"
-#include "cloud_print/service/service_switches.h"
#include "cloud_print/service/win/chrome_launcher.h"
#include "cloud_print/service/win/resource.h"
+#include "cloud_print/service/win/service_state.h"
+#include "cloud_print/service/win/service_switches.h"
namespace {
diff --git a/cloud_print/service/service.gyp b/cloud_print/service/win/service.gyp
index 096e0d8..b365e83 100644
--- a/cloud_print/service/service.gyp
+++ b/cloud_print/service/win/service.gyp
@@ -7,7 +7,7 @@
'chromium_code': 1,
},
'include_dirs': [
- '<(DEPTH)',
+ '../../..',
],
},
'targets': [
@@ -15,27 +15,27 @@
'target_name': 'cloud_print_service_lib',
'type': 'static_library',
'dependencies': [
- '<(DEPTH)/base/base.gyp:base',
- '<(DEPTH)/build/temp_gyp/googleurl.gyp:googleurl',
- '<(DEPTH)/net/net.gyp:net',
+ '../../../base/base.gyp:base',
+ '../../../build/temp_gyp/googleurl.gyp:googleurl',
+ '../../../net/net.gyp:net',
],
'sources': [
+ 'chrome_launcher.cc',
+ 'chrome_launcher.h',
'service_state.cc',
'service_state.h',
'service_switches.cc',
'service_switches.h',
- 'win/chrome_launcher.cc',
- 'win/chrome_launcher.h',
]
},
{
'target_name': 'cloud_print_service',
'type': 'executable',
'sources': [
- 'win/cloud_print_service.cc',
- 'win/cloud_print_service.h',
- 'win/cloud_print_service.rc',
- 'win/resource.h',
+ 'cloud_print_service.cc',
+ 'cloud_print_service.h',
+ 'cloud_print_service.rc',
+ 'resource.h',
],
'dependencies': [
'cloud_print_service_lib',
@@ -47,5 +47,20 @@
},
},
},
+ {
+ 'target_name': 'cloud_print_service_unittests',
+ 'type': 'executable',
+ 'sources': [
+ 'service_state_unittest.cc',
+ ],
+ 'dependencies': [
+ '../../../base/base.gyp:run_all_unittests',
+ '../../../base/base.gyp:base',
+ '../../../base/base.gyp:test_support_base',
+ '../../../testing/gmock.gyp:gmock',
+ '../../../testing/gtest.gyp:gtest',
+ 'cloud_print_service_lib',
+ ],
+ },
],
}
diff --git a/cloud_print/service/service_state.cc b/cloud_print/service/win/service_state.cc
index 545210d..8641000 100644
--- a/cloud_print/service/service_state.cc
+++ b/cloud_print/service/win/service_state.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "cloud_print/service/service_state.h"
+#include "cloud_print/service/win/service_state.h"
#include "base/json/json_reader.h"
#include "base/json/json_writer.h"
diff --git a/cloud_print/service/service_state.h b/cloud_print/service/win/service_state.h
index ef037bb..ef037bb 100644
--- a/cloud_print/service/service_state.h
+++ b/cloud_print/service/win/service_state.h
diff --git a/cloud_print/service/service_state_unittest.cc b/cloud_print/service/win/service_state_unittest.cc
index 4e5d2d0..00c651e 100644
--- a/cloud_print/service/service_state_unittest.cc
+++ b/cloud_print/service/win/service_state_unittest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "cloud_print/service/service_state.h"
+#include "cloud_print/service/win/service_state.h"
#include "base/string_util.h"
#include "testing/gmock/include/gmock/gmock.h"
diff --git a/cloud_print/service/service_switches.cc b/cloud_print/service/win/service_switches.cc
index a03c89c..296eae0 100644
--- a/cloud_print/service/service_switches.cc
+++ b/cloud_print/service/win/service_switches.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "cloud_print/service/service_switches.h"
+#include "cloud_print/service/win/service_switches.h"
const char kChromeTypeSwitch[] = "type";
const char kConsoleSwitch[] = "console";
diff --git a/cloud_print/service/service_switches.h b/cloud_print/service/win/service_switches.h
index 17af981..17af981 100644
--- a/cloud_print/service/service_switches.h
+++ b/cloud_print/service/win/service_switches.h
diff --git a/cloud_print/virtual_driver/virtual_driver.gyp b/cloud_print/virtual_driver/virtual_driver.gyp
new file mode 100644
index 0000000..8368ffb
--- /dev/null
+++ b/cloud_print/virtual_driver/virtual_driver.gyp
@@ -0,0 +1,15 @@
+# Copyright (c) 2011 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': 'virtual_driver',
+ 'type': 'none',
+ 'dependencies': [
+ 'win/install/virtual_driver_install.gyp:*',
+ 'win/port_monitor/virtual_driver_port_monitor.gyp:*',
+ ],
+ },
+ ],
+}
diff --git a/cloud_print/virtual_driver/win/install/virtual_driver_install.gyp b/cloud_print/virtual_driver/win/install/virtual_driver_install.gyp
index deb36e7..5318f99 100644
--- a/cloud_print/virtual_driver/win/install/virtual_driver_install.gyp
+++ b/cloud_print/virtual_driver/win/install/virtual_driver_install.gyp
@@ -8,7 +8,7 @@
'chromium_code': 1,
},
'include_dirs': [
- '<(DEPTH)',
+ '../../../..',
],
},
'targets' : [
@@ -16,12 +16,15 @@
'target_name': 'virtual_driver_setup',
'type': 'executable',
'dependencies': [
- '../virtual_driver.gyp:virtual_driver_lib',
- '<(DEPTH)/base/base.gyp:base',
+ '../../../../base/base.gyp:base',
'virtual_driver_setup_resources',
],
'sources': [
'setup.cc',
+ '../virtual_driver_consts.h',
+ '../virtual_driver_consts.cc',
+ '../virtual_driver_helpers.h',
+ '../virtual_driver_helpers.cc',
'../virtual_driver_common_resources.rc',
'<(SHARED_INTERMEDIATE_DIR)/virtual_driver_setup_resources/virtual_driver_setup_resources_ar.rc',
'<(SHARED_INTERMEDIATE_DIR)/virtual_driver_setup_resources/virtual_driver_setup_resources_bg.rc',
diff --git a/cloud_print/virtual_driver/win/port_monitor/port_monitor.cc b/cloud_print/virtual_driver/win/port_monitor/port_monitor.cc
index dc46b95d..335b6a8 100644
--- a/cloud_print/virtual_driver/win/port_monitor/port_monitor.cc
+++ b/cloud_print/virtual_driver/win/port_monitor/port_monitor.cc
@@ -30,15 +30,17 @@
namespace cloud_print {
-namespace {
-
+#ifndef UNIT_TEST
+const wchar_t kChromeExePath[] = L"google\\chrome\\application\\chrome.exe";
+const wchar_t kChromePathRegValue[] = L"PathToChromeExe";
+#endif
const wchar_t kIePath[] = L"Internet Explorer\\iexplore.exe";
-
const char kChromeInstallUrl[] =
"http://google.com/cloudprint/learn/chrome.html";
const wchar_t kChromePathRegKey[] = L"Software\\Google\\CloudPrint";
+namespace {
const wchar_t kXpsMimeType[] = L"application/vnd.ms-xpsdocument";
const size_t kMaxCommandLineLen = 0x7FFF;
@@ -89,6 +91,36 @@ MONITOR2 g_monitor_2 = {
Monitor2Shutdown
};
+// Returns true if Xps support is installed.
+bool XpsIsInstalled() {
+ FilePath xps_path;
+ if (!SUCCEEDED(GetPrinterDriverDir(&xps_path))) {
+ return false;
+ }
+ xps_path = xps_path.Append(L"mxdwdrv.dll");
+ if (!file_util::PathExists(xps_path)) {
+ return false;
+ }
+ return true;
+}
+
+// Returns true if registration/unregistration can be attempted.
+bool CanRegister() {
+ if (!XpsIsInstalled()) {
+ return false;
+ }
+ if (base::win::GetVersion() >= base::win::VERSION_VISTA) {
+ base::IntegrityLevel level = base::INTEGRITY_UNKNOWN;
+ if (!GetProcessIntegrityLevel(base::GetCurrentProcessHandle(), &level)) {
+ return false;
+ }
+ if (level != base::HIGH_INTEGRITY) {
+ return false;
+ }
+ }
+ return true;
+}
+
// Frees any objects referenced by port_data and sets pointers to NULL.
void CleanupPortData(PortData* port_data) {
delete port_data->file_path;
@@ -202,8 +234,8 @@ bool LaunchPrintDialog(const string16& xps_path,
// rather than the generic chrome download page. See
// http://code.google.com/p/chromium/issues/detail?id=112019
void LaunchChromeDownloadPage() {
- if (kIsUnittest)
- return;
+// Probably best to NOT launch IE from a unit test.
+#ifndef UNIT_TEST
HANDLE token = NULL;
if (!GetUserToken(&token)) {
LOG(ERROR) << "Unable to get user token.";
@@ -220,6 +252,7 @@ void LaunchChromeDownloadPage() {
base::LaunchOptions options;
options.as_user = token_scoped;
base::LaunchProcess(command_line, options, NULL);
+#endif
}
// Returns false if the print job is being run in a context
@@ -620,3 +653,33 @@ MONITORUI* WINAPI InitializePrintMonitorUI(void) {
return &cloud_print::g_monitor_ui;
}
+HRESULT WINAPI DllRegisterServer(void) {
+ base::AtExitManager at_exit_manager;
+ if (!cloud_print::CanRegister()) {
+ return E_ACCESSDENIED;
+ }
+ MONITOR_INFO_2 monitor_info = {0};
+ // YUCK!!! I can either copy the constant, const_cast, or define my own
+ // MONITOR_INFO_2 that will take const strings.
+ FilePath dll_path(cloud_print::GetPortMonitorDllName());
+ monitor_info.pDLLName = const_cast<LPWSTR>(dll_path.value().c_str());
+ monitor_info.pName = const_cast<LPWSTR>(dll_path.value().c_str());
+ if (AddMonitor(NULL, 2, reinterpret_cast<BYTE*>(&monitor_info))) {
+ return S_OK;
+ }
+ return cloud_print::GetLastHResult();
+}
+
+HRESULT WINAPI DllUnregisterServer(void) {
+ base::AtExitManager at_exit_manager;
+ if (!cloud_print::CanRegister()) {
+ return E_ACCESSDENIED;
+ }
+ FilePath dll_path(cloud_print::GetPortMonitorDllName());
+ if (DeleteMonitor(NULL,
+ NULL,
+ const_cast<LPWSTR>(dll_path.value().c_str()))) {
+ return S_OK;
+ }
+ return cloud_print::GetLastHResult();
+}
diff --git a/cloud_print/virtual_driver/win/port_monitor/port_monitor.h b/cloud_print/virtual_driver/win/port_monitor/port_monitor.h
index e9e83f0..5b3c1b9 100644
--- a/cloud_print/virtual_driver/win/port_monitor/port_monitor.h
+++ b/cloud_print/virtual_driver/win/port_monitor/port_monitor.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -79,8 +79,8 @@ BOOL WINAPI MonitorUiConfigureOrDeletePortUI(const wchar_t*,
const wchar_t* port_name);
extern const wchar_t kChromeExePath[];
+extern const wchar_t kChromePathRegKey[];
extern const wchar_t kChromePathRegValue[];
-extern const bool kIsUnittest;
} // namespace cloud_print
diff --git a/cloud_print/virtual_driver/win/port_monitor/port_monitor_dll.cc b/cloud_print/virtual_driver/win/port_monitor/port_monitor_dll.cc
deleted file mode 100644
index 39fc604..0000000
--- a/cloud_print/virtual_driver/win/port_monitor/port_monitor_dll.cc
+++ /dev/null
@@ -1,103 +0,0 @@
-// Copyright (c) 2012 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 "cloud_print/virtual_driver/win/port_monitor/port_monitor.h"
-
-#include <lmcons.h>
-#include <shellapi.h>
-#include <shlobj.h>
-#include <strsafe.h>
-#include <userenv.h>
-#include <windows.h>
-#include <winspool.h>
-
-#include "base/at_exit.h"
-#include "base/command_line.h"
-#include "base/file_util.h"
-#include "base/logging.h"
-#include "base/path_service.h"
-#include "base/process.h"
-#include "base/process_util.h"
-#include "base/string16.h"
-#include "base/win/registry.h"
-#include "base/win/scoped_handle.h"
-#include "base/win/windows_version.h"
-#include "cloud_print/virtual_driver/virtual_driver_switches.h"
-#include "cloud_print/virtual_driver/win/port_monitor/spooler_win.h"
-#include "cloud_print/virtual_driver/win/virtual_driver_consts.h"
-#include "cloud_print/virtual_driver/win/virtual_driver_helpers.h"
-
-namespace cloud_print {
-
-const wchar_t kChromeExePath[] = L"google\\chrome\\application\\chrome.exe";
-const wchar_t kChromePathRegValue[] = L"PathToChromeExe";
-const bool kIsUnittest = false;
-
-namespace {
-
-// Returns true if Xps support is installed.
-bool XpsIsInstalled() {
- FilePath xps_path;
- if (!SUCCEEDED(GetPrinterDriverDir(&xps_path))) {
- return false;
- }
- xps_path = xps_path.Append(L"mxdwdrv.dll");
- if (!file_util::PathExists(xps_path)) {
- return false;
- }
- return true;
-}
-
-// Returns true if registration/unregistration can be attempted.
-bool CanRegister() {
- if (!XpsIsInstalled()) {
- return false;
- }
- if (base::win::GetVersion() >= base::win::VERSION_VISTA) {
- base::IntegrityLevel level = base::INTEGRITY_UNKNOWN;
- if (!GetProcessIntegrityLevel(base::GetCurrentProcessHandle(), &level)) {
- return false;
- }
- if (level != base::HIGH_INTEGRITY) {
- return false;
- }
- }
- return true;
-}
-
-} // namespace
-
-
-} // namespace cloud_print
-
-HRESULT WINAPI DllRegisterServer(void) {
- base::AtExitManager at_exit_manager;
- if (!cloud_print::CanRegister()) {
- return E_ACCESSDENIED;
- }
- MONITOR_INFO_2 monitor_info = {0};
- // YUCK!!! I can either copy the constant, const_cast, or define my own
- // MONITOR_INFO_2 that will take const strings.
- FilePath dll_path(cloud_print::GetPortMonitorDllName());
- monitor_info.pDLLName = const_cast<LPWSTR>(dll_path.value().c_str());
- monitor_info.pName = const_cast<LPWSTR>(dll_path.value().c_str());
- if (AddMonitor(NULL, 2, reinterpret_cast<BYTE*>(&monitor_info))) {
- return S_OK;
- }
- return cloud_print::GetLastHResult();
-}
-
-HRESULT WINAPI DllUnregisterServer(void) {
- base::AtExitManager at_exit_manager;
- if (!cloud_print::CanRegister()) {
- return E_ACCESSDENIED;
- }
- FilePath dll_path(cloud_print::GetPortMonitorDllName());
- if (DeleteMonitor(NULL,
- NULL,
- const_cast<LPWSTR>(dll_path.value().c_str()))) {
- return S_OK;
- }
- return cloud_print::GetLastHResult();
-}
diff --git a/cloud_print/virtual_driver/win/port_monitor/port_monitor_unittest.cc b/cloud_print/virtual_driver/win/port_monitor/port_monitor_unittest.cc
index 5148276..93de765 100644
--- a/cloud_print/virtual_driver/win/port_monitor/port_monitor_unittest.cc
+++ b/cloud_print/virtual_driver/win/port_monitor/port_monitor_unittest.cc
@@ -13,19 +13,10 @@
#include "testing/gtest/include/gtest/gtest.h"
namespace cloud_print {
-
const wchar_t kChromeExePath[] = L"google\\chrome\\application\\chrometest.exe";
-const wchar_t kChromePathRegValue[] =L"PathToChromeTestExe";
-const bool kIsUnittest = true;
-
-namespace {
-
const wchar_t kAlternateChromeExePath[] =
L"google\\chrome\\application\\chrometestalternate.exe";
-
-const wchar_t kChromePathRegKey[] = L"Software\\Google\\CloudPrint";
-
-} // namespace
+const wchar_t kChromePathRegValue[] =L"PathToChromeTestExe";
class PortMonitorTest : public testing::Test {
public:
diff --git a/cloud_print/virtual_driver/win/port_monitor/virtual_driver_port_monitor.gyp b/cloud_print/virtual_driver/win/port_monitor/virtual_driver_port_monitor.gyp
new file mode 100644
index 0000000..630b5e4
--- /dev/null
+++ b/cloud_print/virtual_driver/win/port_monitor/virtual_driver_port_monitor.gyp
@@ -0,0 +1,66 @@
+# Copyright (c) 2012 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.
+
+{
+ 'target_defaults': {
+ 'variables': {
+ 'chromium_code': 1,
+ },
+ 'include_dirs': [
+ '../..',
+ ],
+ 'libraries': [
+ 'userenv.lib',
+ ],
+ 'sources': [
+ '../../virtual_driver_switches.cc',
+ '../../virtual_driver_switches.h',
+ '../virtual_driver_consts.cc',
+ '../virtual_driver_consts.h',
+ '../virtual_driver_helpers.cc',
+ '../virtual_driver_helpers.h',
+ '../virtual_driver_common_resources.rc',
+ 'port_monitor.cc',
+ 'port_monitor.h',
+ 'port_monitor.def',
+ ],
+ },
+ 'targets' : [
+ {
+ 'target_name': 'gcp_portmon',
+ 'type': 'loadable_module',
+ 'dependencies': [
+ '../../../../base/base.gyp:base',
+ ],
+ },
+ {
+ 'target_name': 'gcp_portmon64',
+ 'type': 'loadable_module',
+ 'defines': [
+ '<@(nacl_win64_defines)',
+ ],
+ 'dependencies': [
+ '../../../../base/base.gyp:base_nacl_win64',
+ ],
+ 'configurations': {
+ 'Common_Base': {
+ 'msvs_target_platform': 'x64',
+ },
+ },
+ },
+ {
+ 'target_name': 'virtual_driver_unittests',
+ 'type': 'executable',
+ 'dependencies': [
+ '../../../../base/base.gyp:base',
+ '../../../../base/base.gyp:run_all_unittests',
+ '../../../../testing/gmock.gyp:gmock',
+ '../../../../testing/gtest.gyp:gtest',
+ ],
+ 'sources': [
+ 'port_monitor_unittest.cc',
+ ],
+ },
+ ],
+}
diff --git a/cloud_print/virtual_driver/win/virtual_driver.gyp b/cloud_print/virtual_driver/win/virtual_driver.gyp
deleted file mode 100644
index d1bc0da0..0000000
--- a/cloud_print/virtual_driver/win/virtual_driver.gyp
+++ /dev/null
@@ -1,18 +0,0 @@
-# Copyright (c) 2012 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.
-
-{
- 'variables': {
- 'virtual_driver_suffix': '',
- },
- 'target_defaults': {
- 'dependencies': [
- '<(DEPTH)/base/base.gyp:base',
- ],
-
- },
- 'includes': [
- 'virtual_driver.gypi',
- ],
-}
diff --git a/cloud_print/virtual_driver/win/virtual_driver.gypi b/cloud_print/virtual_driver/win/virtual_driver.gypi
deleted file mode 100644
index 2367dbd..0000000
--- a/cloud_print/virtual_driver/win/virtual_driver.gypi
+++ /dev/null
@@ -1,53 +0,0 @@
-# Copyright (c) 2012 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.
-
-{
- 'variables': {
- 'chromium_code': 1,
- },
- 'target_defaults': {
- 'include_dirs': [
- '<(DEPTH)',
- ],
- 'libraries': [
- 'userenv.lib',
- ],
- },
- 'targets' : [
- {
- 'target_name': 'virtual_driver_lib<(virtual_driver_suffix)',
- 'type': 'static_library',
- 'sources': [
- '../virtual_driver_switches.cc',
- '../virtual_driver_switches.h',
- 'virtual_driver_consts.cc',
- 'virtual_driver_consts.h',
- 'virtual_driver_helpers.cc',
- 'virtual_driver_helpers.h',
- ],
- },
- {
- 'target_name': 'gcp_portmon_lib<(virtual_driver_suffix)',
- 'type': 'static_library',
- 'sources': [
- 'port_monitor/port_monitor.cc',
- 'port_monitor/port_monitor.h',
- ],
- 'dependencies': [
- 'virtual_driver_lib<(virtual_driver_suffix)',
- ],
- },
- {
- 'target_name': 'gcp_portmon<(virtual_driver_suffix)',
- 'type': 'loadable_module',
- 'sources': [
- 'port_monitor/port_monitor_dll.cc',
- 'virtual_driver_common_resources.rc',
- ],
- 'dependencies': [
- 'gcp_portmon_lib<(virtual_driver_suffix)',
- ],
- },
- ],
-}
diff --git a/cloud_print/virtual_driver/win/virtual_driver64.gyp b/cloud_print/virtual_driver/win/virtual_driver64.gyp
deleted file mode 100644
index 885fb7c..0000000
--- a/cloud_print/virtual_driver/win/virtual_driver64.gyp
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright (c) 2012 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.
-
-{
- 'variables': {
- 'virtual_driver_suffix': '64',
- },
- 'target_defaults': {
- 'defines': [
- '<@(nacl_win64_defines)',
- ],
- 'dependencies': [
- '<(DEPTH)/base/base.gyp:base_nacl_win64',
- ],
- 'configurations': {
- 'Common_Base': {
- 'msvs_target_platform': 'x64',
- },
- },
- },
- 'includes': [
- 'virtual_driver.gypi',
- ],
-}
-