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

Unified Diff: apps/app_shim/app_shim_host_controller.h

Issue 12623005: [mac] App shims (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move app_shim code to apps/ Created 7 years, 9 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: apps/app_shim/app_shim_host_controller.h
diff --git a/apps/app_shim/app_shim_host_controller.h b/apps/app_shim/app_shim_host_controller.h
new file mode 100644
index 0000000000000000000000000000000000000000..e6db6161acc9219f52b92c57265f7f7fe6cf3809
--- /dev/null
+++ b/apps/app_shim/app_shim_host_controller.h
@@ -0,0 +1,38 @@
+// Copyright 2013 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.
+
+#ifndef CHROME_BROWSER_WEB_APPLICATIONS_APP_SHIM_HOST_CONTROLLER_H_
+#define CHROME_BROWSER_WEB_APPLICATIONS_APP_SHIM_HOST_CONTROLLER_H_
+
+#include "base/mac/scoped_cftyperef.h"
+#include "base/memory/weak_ptr.h"
+#include "base/threading/thread.h"
+#include "ipc/ipc_channel_factory.h"
+
+// The AppShimHostController receives connections from app shims on a UNIX
+// socket (|factory_|) and creates a helper object to manage the connection.
+class AppShimHostController
koz (OOO until 15th September) 2013/03/14 23:51:05 As far as meaningless noun suffixes go, I think Ma
jeremya 2013/03/15 02:24:14 Done.
+ : public IPC::ChannelFactory::Delegate,
+ public base::SupportsWeakPtr<AppShimHostController> {
+ public:
+ AppShimHostController();
+ virtual ~AppShimHostController();
+
+ private:
+ // IPC::ChannelFactory::Delegate implementation.
+ virtual void OnClientConnected(const IPC::ChannelHandle& handle) OVERRIDE;
+ virtual void OnListenError() OVERRIDE;
+
+ // The |factory_| must be created on a thread which allows blocking I/O, so
+ // part of the initialization of this class must be carried out on the file
+ // thread.
+ void InitOnFileThread();
+
+ // Called on the IO thread to begin listening for connections from app shims.
+ void ListenOnIOThread();
+
+ IPC::ChannelFactory* factory_;
+};
+
+#endif // CHROME_BROWSER_WEB_APPLICATIONS_APP_SHIM_HOST_CONTROLLER_H_

Powered by Google App Engine
This is Rietveld 408576698