| 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 #include "apps/app_shim/app_shim_host_mac.h" | 5 #include "apps/app_shim/app_shim_host_mac.h" |
| 6 | 6 |
| 7 #include "apps/app_shim/app_shim_handler_mac.h" | 7 #include "apps/app_shim/app_shim_handler_mac.h" |
| 8 #include "apps/app_shim/app_shim_messages.h" | 8 #include "apps/app_shim/app_shim_messages.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "chrome/browser/browser_process.h" | 12 #include "chrome/browser/browser_process.h" |
| 13 #include "chrome/browser/profiles/profile_manager.h" | 13 #include "chrome/browser/profiles/profile_manager.h" |
| 14 #include "content/public/browser/browser_thread.h" | 14 #include "content/public/browser/browser_thread.h" |
| 15 #include "ipc/ipc_channel_proxy.h" | 15 #include "ipc/ipc_channel_proxy.h" |
| 16 | 16 |
| 17 AppShimHost::AppShimHost() | 17 AppShimHost::AppShimHost() : profile_(NULL) {} |
| 18 : channel_(NULL), profile_(NULL) { | |
| 19 } | |
| 20 | 18 |
| 21 AppShimHost::~AppShimHost() { | 19 AppShimHost::~AppShimHost() { |
| 22 DCHECK(CalledOnValidThread()); | 20 DCHECK(CalledOnValidThread()); |
| 23 apps::AppShimHandler* handler = apps::AppShimHandler::GetForAppMode(app_id_); | 21 apps::AppShimHandler* handler = apps::AppShimHandler::GetForAppMode(app_id_); |
| 24 if (handler) | 22 if (handler) |
| 25 handler->OnShimClose(this); | 23 handler->OnShimClose(this); |
| 26 } | 24 } |
| 27 | 25 |
| 28 void AppShimHost::ServeChannel(const IPC::ChannelHandle& handle) { | 26 void AppShimHost::ServeChannel(const IPC::ChannelHandle& handle) { |
| 29 DCHECK(CalledOnValidThread()); | 27 DCHECK(CalledOnValidThread()); |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 } | 123 } |
| 126 | 124 |
| 127 void AppShimHost::OnAppClosed() { | 125 void AppShimHost::OnAppClosed() { |
| 128 Close(); | 126 Close(); |
| 129 } | 127 } |
| 130 | 128 |
| 131 void AppShimHost::Close() { | 129 void AppShimHost::Close() { |
| 132 DCHECK(CalledOnValidThread()); | 130 DCHECK(CalledOnValidThread()); |
| 133 delete this; | 131 delete this; |
| 134 } | 132 } |
| OLD | NEW |