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

Side by Side Diff: content/child/mojo/mojo_application.h

Issue 1585493002: [mojo] Ports EDK (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 #ifndef CONTENT_CHILD_MOJO_MOJO_APPLICATION_H_ 5 #ifndef CONTENT_CHILD_MOJO_MOJO_APPLICATION_H_
6 #define CONTENT_CHILD_MOJO_MOJO_APPLICATION_H_ 6 #define CONTENT_CHILD_MOJO_MOJO_APPLICATION_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/weak_ptr.h"
9 #include "content/common/mojo/channel_init.h" 10 #include "content/common/mojo/channel_init.h"
10 #include "content/common/mojo/service_registry_impl.h" 11 #include "content/common/mojo/service_registry_impl.h"
11 #include "ipc/ipc_platform_file.h" 12 #include "ipc/ipc_platform_file.h"
12 13
13 namespace base { 14 namespace base {
14 class SequencedTaskRunner; 15 class SequencedTaskRunner;
15 } 16 }
16 17
17 namespace IPC { 18 namespace IPC {
18 class Message; 19 class Message;
(...skipping 11 matching lines...) Expand all
30 scoped_refptr<base::SequencedTaskRunner> io_task_runner); 31 scoped_refptr<base::SequencedTaskRunner> io_task_runner);
31 virtual ~MojoApplication(); 32 virtual ~MojoApplication();
32 33
33 bool OnMessageReceived(const IPC::Message& msg); 34 bool OnMessageReceived(const IPC::Message& msg);
34 35
35 ServiceRegistry* service_registry() { return &service_registry_; } 36 ServiceRegistry* service_registry() { return &service_registry_; }
36 37
37 private: 38 private:
38 void OnActivate(const IPC::PlatformFileForTransit& file); 39 void OnActivate(const IPC::PlatformFileForTransit& file);
39 40
41 void OnMessagePipeCreated(mojo::ScopedMessagePipeHandle pipe);
42
40 scoped_refptr<base::SequencedTaskRunner> io_task_runner_; 43 scoped_refptr<base::SequencedTaskRunner> io_task_runner_;
41
42 ChannelInit channel_init_; 44 ChannelInit channel_init_;
43
44 ServiceRegistryImpl service_registry_; 45 ServiceRegistryImpl service_registry_;
46 base::WeakPtrFactory<MojoApplication> weak_factory_;
45 47
46 DISALLOW_COPY_AND_ASSIGN(MojoApplication); 48 DISALLOW_COPY_AND_ASSIGN(MojoApplication);
47 }; 49 };
48 50
49 } // namespace content 51 } // namespace content
50 52
51 #endif // CONTENT_CHILD_MOJO_MOJO_APPLICATION_H_ 53 #endif // CONTENT_CHILD_MOJO_MOJO_APPLICATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698