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

Side by Side Diff: apps/app_shim/app_shim_host_manager_mac.h

Issue 15269003: Refactor extension handling code from AppShimHost into ExtensionAppShimHandler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync and rebase Created 7 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « apps/app_shim/app_shim_host_mac_unittest.cc ('k') | apps/app_shim/app_shim_host_manager_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_WEB_APPLICATIONS_APP_SHIM_HOST_MANAGER_MAC_H_ 5 #ifndef CHROME_BROWSER_WEB_APPLICATIONS_APP_SHIM_HOST_MANAGER_MAC_H_
6 #define CHROME_BROWSER_WEB_APPLICATIONS_APP_SHIM_HOST_MANAGER_MAC_H_ 6 #define CHROME_BROWSER_WEB_APPLICATIONS_APP_SHIM_HOST_MANAGER_MAC_H_
7 7
8 #include "base/mac/scoped_cftyperef.h" 8 #include "apps/app_shim/extension_app_shim_handler_mac.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/threading/thread.h"
11 #include "ipc/ipc_channel_factory.h" 10 #include "ipc/ipc_channel_factory.h"
12 11
13 // The AppShimHostManager receives connections from app shims on a UNIX 12 // The AppShimHostManager receives connections from app shims on a UNIX
14 // socket (|factory_|) and creates a helper object to manage the connection. 13 // socket (|factory_|) and creates a helper object to manage the connection.
15 class AppShimHostManager 14 class AppShimHostManager
16 : public IPC::ChannelFactory::Delegate, 15 : public IPC::ChannelFactory::Delegate,
17 public base::SupportsWeakPtr<AppShimHostManager> { 16 public base::SupportsWeakPtr<AppShimHostManager> {
18 public: 17 public:
19 AppShimHostManager(); 18 AppShimHostManager();
20 virtual ~AppShimHostManager(); 19 virtual ~AppShimHostManager();
21 20
22 private: 21 private:
23 // IPC::ChannelFactory::Delegate implementation. 22 // IPC::ChannelFactory::Delegate implementation.
24 virtual void OnClientConnected(const IPC::ChannelHandle& handle) OVERRIDE; 23 virtual void OnClientConnected(const IPC::ChannelHandle& handle) OVERRIDE;
25 virtual void OnListenError() OVERRIDE; 24 virtual void OnListenError() OVERRIDE;
26 25
27 // The |factory_| must be created on a thread which allows blocking I/O, so 26 // The |factory_| must be created on a thread which allows blocking I/O, so
28 // part of the initialization of this class must be carried out on the file 27 // part of the initialization of this class must be carried out on the file
29 // thread. 28 // thread.
30 void InitOnFileThread(); 29 void InitOnFileThread();
31 30
32 // Called on the IO thread to begin listening for connections from app shims. 31 // Called on the IO thread to begin listening for connections from app shims.
33 void ListenOnIOThread(); 32 void ListenOnIOThread();
34 33
35 scoped_ptr<IPC::ChannelFactory> factory_; 34 scoped_ptr<IPC::ChannelFactory> factory_;
36 35
36 apps::ExtensionAppShimHandler extension_app_shim_handler_;
37
37 DISALLOW_COPY_AND_ASSIGN(AppShimHostManager); 38 DISALLOW_COPY_AND_ASSIGN(AppShimHostManager);
38 }; 39 };
39 40
40 #endif // CHROME_BROWSER_WEB_APPLICATIONS_APP_SHIM_HOST_MANAGER_MAC_H_ 41 #endif // CHROME_BROWSER_WEB_APPLICATIONS_APP_SHIM_HOST_MANAGER_MAC_H_
OLDNEW
« no previous file with comments | « apps/app_shim/app_shim_host_mac_unittest.cc ('k') | apps/app_shim/app_shim_host_manager_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698