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

Side by Side Diff: extensions/browser/mojo/keep_alive_impl.cc

Issue 1148703002: Remove mojo::InterfaceImpl from extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 "extensions/browser/mojo/keep_alive_impl.h" 5 #include "extensions/browser/mojo/keep_alive_impl.h"
6 6
7 #include "extensions/browser/process_manager.h" 7 #include "extensions/browser/process_manager.h"
8 8
9 namespace extensions { 9 namespace extensions {
10 10
11 // static 11 // static
12 void KeepAliveImpl::Create(content::BrowserContext* context, 12 void KeepAliveImpl::Create(content::BrowserContext* context,
13 const Extension* extension, 13 const Extension* extension,
14 mojo::InterfaceRequest<KeepAlive> request) { 14 mojo::InterfaceRequest<KeepAlive> request) {
15 mojo::BindToRequest(new KeepAliveImpl(context, extension), &request); 15 new KeepAliveImpl(context, extension, request.Pass());
16 } 16 }
17 17
18 KeepAliveImpl::KeepAliveImpl(content::BrowserContext* context, 18 KeepAliveImpl::KeepAliveImpl(content::BrowserContext* context,
19 const Extension* extension) 19 const Extension* extension,
20 : context_(context), extension_(extension) { 20 mojo::InterfaceRequest<KeepAlive> request)
21 : context_(context), extension_(extension), binding_(this, request.Pass()) {
21 ProcessManager::Get(context_)->IncrementLazyKeepaliveCount(extension_); 22 ProcessManager::Get(context_)->IncrementLazyKeepaliveCount(extension_);
22 } 23 }
23 24
24 KeepAliveImpl::~KeepAliveImpl() { 25 KeepAliveImpl::~KeepAliveImpl() {
25 ProcessManager::Get(context_)->DecrementLazyKeepaliveCount(extension_); 26 ProcessManager::Get(context_)->DecrementLazyKeepaliveCount(extension_);
26 } 27 }
27 28
28 } // namespace extensions 29 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/mojo/keep_alive_impl.h ('k') | extensions/renderer/mojo/keep_alive_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698