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

Unified Diff: chrome/browser/printing/cloud_print/virtual_driver_install_helper.cc

Issue 7485011: Virtual Cloud Print Driver for Mac. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Style fixes Created 9 years, 5 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/printing/cloud_print/virtual_driver_install_helper.cc
diff --git a/chrome/browser/printing/cloud_print/virtual_driver_install_helper.cc b/chrome/browser/printing/cloud_print/virtual_driver_install_helper.cc
new file mode 100644
index 0000000000000000000000000000000000000000..ea051f8b4ea2a364dd4f6e7cd51afd4d9cb7bdce
--- /dev/null
+++ b/chrome/browser/printing/cloud_print/virtual_driver_install_helper.cc
@@ -0,0 +1,43 @@
+// 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.
+
+#include "chrome/browser/printing/cloud_print/virtual_driver_install_helper.h"
Nico 2011/08/01 21:31:12 One newline here. The standard format is #include
abeera 2011/08/02 01:21:02 Done.
+#include "chrome/browser/service/service_process_control.h"
+#include "chrome/common/service_messages.h"
+
+namespace cloud_print {
+
+void VirtualDriverInstallHelper::SetUpInstall() {
+ scoped_refptr<VirtualDriverInstallHelper> help =
Nico 2011/08/01 21:31:12 NewRunnableMethod() retains its argument, so no ne
abeera 2011/08/02 01:21:02 To post a task, a class needs to extend from RefCo
+ new VirtualDriverInstallHelper();
+ ServiceProcessControl::GetInstance()->Launch(
+ NewRunnableMethod(
+ help.get(), &VirtualDriverInstallHelper::InstallVirtualDriverTask),
+ NULL);
+}
+
+void VirtualDriverInstallHelper::SetUpUninstall() {
+ scoped_refptr<VirtualDriverInstallHelper> help =
+ new VirtualDriverInstallHelper();
+ ServiceProcessControl::GetInstance()->Launch(
+ NewRunnableMethod(
+ help.get(), &VirtualDriverInstallHelper::UninstallVirtualDriverTask),
+ NULL);
+}
+
+void VirtualDriverInstallHelper::InstallVirtualDriverTask() {
+ ServiceProcessControl* process_control =
+ ServiceProcessControl::GetInstance();
+ DCHECK(process_control->is_connected());
+ process_control->Send(new ServiceMsg_EnableVirtualDriver());
+}
+
+void VirtualDriverInstallHelper::UninstallVirtualDriverTask() {
+ ServiceProcessControl* process_control =
+ ServiceProcessControl::GetInstance();
+ DCHECK(process_control->is_connected());
+ process_control->Send(new ServiceMsg_DisableVirtualDriver());
+}
+
+} // namespace cloud_print

Powered by Google App Engine
This is Rietveld 408576698