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

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

Issue 584173002: Revert "Always activate MojoApplicationHost" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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/process/process_handle.h" 8 #include "base/process/process_handle.h"
9 #include "content/common/mojo/service_registry_impl.h" 9 #include "content/common/mojo/service_registry_impl.h"
10 #include "mojo/embedder/channel_init.h" 10 #include "mojo/embedder/channel_init.h"
(...skipping 12 matching lines...) Expand all
23 // available so that child-provided services can be invoked. 23 // available so that child-provided services can be invoked.
24 class MojoApplicationHost { 24 class MojoApplicationHost {
25 public: 25 public:
26 MojoApplicationHost(); 26 MojoApplicationHost();
27 virtual ~MojoApplicationHost(); 27 virtual ~MojoApplicationHost();
28 28
29 // Two-phase initialization: 29 // Two-phase initialization:
30 // 1- Init makes service_registry() available synchronously. 30 // 1- Init makes service_registry() available synchronously.
31 // 2- Activate establishes the actual connection to the peer process. 31 // 2- Activate establishes the actual connection to the peer process.
32 bool Init(); 32 bool Init();
33 void Activate(IPC::Sender* sender, base::ProcessHandle process_handle); 33 bool Activate(IPC::Sender* sender, base::ProcessHandle process_handle);
34 34
35 void WillDestroySoon(); 35 void WillDestroySoon();
36 36
37 bool did_activate() const { return did_activate_; }
38
37 ServiceRegistry* service_registry() { return &service_registry_; } 39 ServiceRegistry* service_registry() { return &service_registry_; }
38 40
39 private: 41 private:
40 mojo::embedder::ChannelInit channel_init_; 42 mojo::embedder::ChannelInit channel_init_;
41 mojo::embedder::ScopedPlatformHandle client_handle_; 43 mojo::embedder::ScopedPlatformHandle client_handle_;
42 44
43 bool did_activate_; 45 bool did_activate_;
44 46
45 ServiceRegistryImpl service_registry_; 47 ServiceRegistryImpl service_registry_;
46 48
47 DISALLOW_COPY_AND_ASSIGN(MojoApplicationHost); 49 DISALLOW_COPY_AND_ASSIGN(MojoApplicationHost);
48 }; 50 };
49 51
50 } // namespace content 52 } // namespace content
51 53
52 #endif // CONTENT_BROWSER_MOJO_MOJO_APPLICATION_HOST_H_ 54 #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