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

Side by Side Diff: content/browser/mojo/mojo_application_host.h

Issue 563373002: Always activate MojoApplicationHost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Re-landing Created 6 years, 2 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_BROWSER_MOJO_MOJO_APPLICATION_HOST_H_ 5 #ifndef CONTENT_BROWSER_MOJO_MOJO_APPLICATION_HOST_H_
6 #define CONTENT_BROWSER_MOJO_MOJO_APPLICATION_HOST_H_ 6 #define CONTENT_BROWSER_MOJO_MOJO_APPLICATION_HOST_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/process/process_handle.h" 9 #include "base/process/process_handle.h"
10 #include "content/common/mojo/service_registry_impl.h" 10 #include "content/common/mojo/service_registry_impl.h"
(...skipping 17 matching lines...) Expand all
28 // available so that child-provided services can be invoked. 28 // available so that child-provided services can be invoked.
29 class MojoApplicationHost { 29 class MojoApplicationHost {
30 public: 30 public:
31 MojoApplicationHost(); 31 MojoApplicationHost();
32 virtual ~MojoApplicationHost(); 32 virtual ~MojoApplicationHost();
33 33
34 // Two-phase initialization: 34 // Two-phase initialization:
35 // 1- Init makes service_registry() available synchronously. 35 // 1- Init makes service_registry() available synchronously.
36 // 2- Activate establishes the actual connection to the peer process. 36 // 2- Activate establishes the actual connection to the peer process.
37 bool Init(); 37 bool Init();
38 bool Activate(IPC::Sender* sender, base::ProcessHandle process_handle); 38 void Activate(IPC::Sender* sender, base::ProcessHandle process_handle);
39 39
40 void WillDestroySoon(); 40 void WillDestroySoon();
41 41
42 bool did_activate() const { return did_activate_; }
43
44 ServiceRegistry* service_registry() { return &service_registry_; } 42 ServiceRegistry* service_registry() { return &service_registry_; }
45 43
46 private: 44 private:
47 mojo::embedder::ChannelInit channel_init_; 45 mojo::embedder::ChannelInit channel_init_;
48 mojo::embedder::ScopedPlatformHandle client_handle_; 46 mojo::embedder::ScopedPlatformHandle client_handle_;
49 47
50 bool did_activate_; 48 bool did_activate_;
51 49
52 ServiceRegistryImpl service_registry_; 50 ServiceRegistryImpl service_registry_;
53 51
54 #if defined(OS_ANDROID) 52 #if defined(OS_ANDROID)
55 scoped_ptr<ServiceRegistryAndroid> service_registry_android_; 53 scoped_ptr<ServiceRegistryAndroid> service_registry_android_;
56 #endif 54 #endif
57 55
58 DISALLOW_COPY_AND_ASSIGN(MojoApplicationHost); 56 DISALLOW_COPY_AND_ASSIGN(MojoApplicationHost);
59 }; 57 };
60 58
61 } // namespace content 59 } // namespace content
62 60
63 #endif // CONTENT_BROWSER_MOJO_MOJO_APPLICATION_HOST_H_ 61 #endif // CONTENT_BROWSER_MOJO_MOJO_APPLICATION_HOST_H_
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.cc ('k') | content/browser/mojo/mojo_application_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698