1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "extensions/browser/mojo/keep_alive_impl.h"
7 #include "extensions/browser/process_manager.h"
12 void KeepAliveImpl::Create(content::BrowserContext
* context
,
13 const Extension
* extension
,
14 mojo::InterfaceRequest
<KeepAlive
> request
) {
15 mojo::BindToRequest(new KeepAliveImpl(context
, extension
), &request
);
18 KeepAliveImpl::KeepAliveImpl(content::BrowserContext
* context
,
19 const Extension
* extension
)
20 : context_(context
), extension_(extension
) {
21 ProcessManager::Get(context_
)->IncrementLazyKeepaliveCount(extension_
);
24 KeepAliveImpl::~KeepAliveImpl() {
25 ProcessManager::Get(context_
)->DecrementLazyKeepaliveCount(extension_
);
28 } // namespace extensions