OLD | NEW |
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 APPS_APP_SHIM_APP_SHIM_HOST_MAC_H_ | 5 #ifndef APPS_APP_SHIM_APP_SHIM_HOST_MAC_H_ |
6 #define APPS_APP_SHIM_APP_SHIM_HOST_MAC_H_ | 6 #define APPS_APP_SHIM_APP_SHIM_HOST_MAC_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 16 matching lines...) Expand all Loading... |
27 // connected to the app shim is closed. | 27 // connected to the app shim is closed. |
28 class AppShimHost : public IPC::Listener, | 28 class AppShimHost : public IPC::Listener, |
29 public IPC::Sender, | 29 public IPC::Sender, |
30 public apps::AppShimHandler::Host, | 30 public apps::AppShimHandler::Host, |
31 public base::NonThreadSafe { | 31 public base::NonThreadSafe { |
32 public: | 32 public: |
33 AppShimHost(); | 33 AppShimHost(); |
34 virtual ~AppShimHost(); | 34 virtual ~AppShimHost(); |
35 | 35 |
36 // Creates a new server-side IPC channel at |handle|, which should contain a | 36 // Creates a new server-side IPC channel at |handle|, which should contain a |
37 // file descriptor of a channel created by an IPC::ChannelFactory, and begins | 37 // file descriptor of a channel created by an UnixDomainSocketAcceptor, |
38 // listening for messages on it. | 38 // and begins listening for messages on it. |
39 void ServeChannel(const IPC::ChannelHandle& handle); | 39 void ServeChannel(const IPC::ChannelHandle& handle); |
40 | 40 |
41 protected: | 41 protected: |
42 // IPC::Listener implementation. | 42 // IPC::Listener implementation. |
43 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 43 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
44 virtual void OnChannelError() OVERRIDE; | 44 virtual void OnChannelError() OVERRIDE; |
45 | 45 |
46 // IPC::Sender implementation. | 46 // IPC::Sender implementation. |
47 virtual bool Send(IPC::Message* message) OVERRIDE; | 47 virtual bool Send(IPC::Message* message) OVERRIDE; |
48 | 48 |
(...skipping 27 matching lines...) Expand all Loading... |
76 // Closes the channel and destroys the AppShimHost. | 76 // Closes the channel and destroys the AppShimHost. |
77 void Close(); | 77 void Close(); |
78 | 78 |
79 scoped_ptr<IPC::ChannelProxy> channel_; | 79 scoped_ptr<IPC::ChannelProxy> channel_; |
80 std::string app_id_; | 80 std::string app_id_; |
81 base::FilePath profile_path_; | 81 base::FilePath profile_path_; |
82 bool initial_launch_finished_; | 82 bool initial_launch_finished_; |
83 }; | 83 }; |
84 | 84 |
85 #endif // APPS_APP_SHIM_APP_SHIM_HOST_MAC_H_ | 85 #endif // APPS_APP_SHIM_APP_SHIM_HOST_MAC_H_ |
OLD | NEW |