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

Unified Diff: sky/framework/embedder.dart

Issue 1088793003: Expose sky KeyboardService in android mojo_shell (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: sky/framework/embedder.dart
diff --git a/sky/framework/embedder.dart b/sky/framework/embedder.dart
index d91f8c4e15b1c74b95d9d06bb615a65382e12c5a..4a87d20d8d4f2473af1688b1b654c476b8583760 100644
--- a/sky/framework/embedder.dart
+++ b/sky/framework/embedder.dart
@@ -15,9 +15,20 @@ final _EmbedderImpl embedder = new _EmbedderImpl();
class _EmbedderImpl {
ApplicationConnection _connection;
ServiceRegistryProxy _serviceRegistry;
+ ShellProxy _shell;
+ bool _internalsHasNoShell;
- final ShellProxy shell = new ShellProxy.fromHandle(
- new core.MojoHandle(internals.takeShellProxyHandle()));
+ ShellProxy get shell {
+ if (_internalsHasNoShell || _shell != null) return _shell;
+
+ try {
+ _shell = new ShellProxy.fromHandle(
+ new core.MojoHandle(internals.takeShellProxyHandle()));
+ } catch (e) {
+ _internalsHasNoShell = true;
+ }
+ return _shell;
+ }
ApplicationConnection get connection {
if (_connection == null) {

Powered by Google App Engine
This is Rietveld 408576698