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

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

Issue 641703002: Rewrite the Android implementation of BatteryMonitor directly in Java. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@battery-status-api-to-mojo
Patch Set: Address Torne's comment. Created 6 years 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 23 matching lines...) Expand all
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 void 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 ServiceRegistry* service_registry() { return &service_registry_; } 42 ServiceRegistry* service_registry() { return &service_registry_; }
43 43
44 #if defined(OS_ANDROID)
45 ServiceRegistryAndroid* service_registry_android() {
46 return service_registry_android_.get();
47 }
48 #endif
49
44 private: 50 private:
45 mojo::embedder::ChannelInit channel_init_; 51 mojo::embedder::ChannelInit channel_init_;
46 mojo::embedder::ScopedPlatformHandle client_handle_; 52 mojo::embedder::ScopedPlatformHandle client_handle_;
47 53
48 bool did_activate_; 54 bool did_activate_;
49 55
50 ServiceRegistryImpl service_registry_; 56 ServiceRegistryImpl service_registry_;
51 57
52 #if defined(OS_ANDROID) 58 #if defined(OS_ANDROID)
53 scoped_ptr<ServiceRegistryAndroid> service_registry_android_; 59 scoped_ptr<ServiceRegistryAndroid> service_registry_android_;
54 #endif 60 #endif
55 61
56 DISALLOW_COPY_AND_ASSIGN(MojoApplicationHost); 62 DISALLOW_COPY_AND_ASSIGN(MojoApplicationHost);
57 }; 63 };
58 64
59 } // namespace content 65 } // namespace content
60 66
61 #endif // CONTENT_BROWSER_MOJO_MOJO_APPLICATION_HOST_H_ 67 #endif // CONTENT_BROWSER_MOJO_MOJO_APPLICATION_HOST_H_
OLDNEW
« no previous file with comments | « content/browser/android/browser_jni_registrar.cc ('k') | content/browser/mojo/service_registrar_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698