Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
f2d78aed
Commit
f2d78aed
authored
Mar 18, 2016
by
Adam Barth
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2784 from abarth/view_services
Look for the keyboard in the view services
parents
5fc9a9cf
addc87dc
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
30 additions
and
12 deletions
+30
-12
engine.version
bin/cache/engine.version
+1
-1
shell.dart
packages/flutter/lib/shell.dart
+25
-7
child_view.dart
packages/flutter/lib/src/rendering/child_view.dart
+1
-1
asset_bundle.dart
packages/flutter/lib/src/services/asset_bundle.dart
+1
-1
keyboard.dart
packages/flutter/lib/src/services/keyboard.dart
+1
-1
raw_keyboard_listener.dart
packages/flutter/lib/src/widgets/raw_keyboard_listener.dart
+1
-1
No files found.
bin/cache/engine.version
View file @
f2d78aed
138fae117a19b6c7a9ae1a098daf35275a3002e
7
5114eade633fa9d08355d3e7a67b4c9f983d435
7
packages/flutter/lib/shell.dart
View file @
f2d78aed
...
...
@@ -30,7 +30,7 @@ class MojoShell {
static
MojoShell
_instance
;
static
mojom
.
ShellProxy
_initShellProxy
()
{
core
.
MojoHandle
shellHandle
=
new
core
.
MojoHandle
(
ui
.
takeShellProxyHandle
());
core
.
MojoHandle
shellHandle
=
new
core
.
MojoHandle
(
ui
.
MojoServices
.
takeShell
());
if
(!
shellHandle
.
isValid
)
return
null
;
return
new
mojom
.
ShellProxy
.
fromHandle
(
shellHandle
);
...
...
@@ -38,13 +38,13 @@ class MojoShell {
final
mojom
.
Shell
_shell
=
_initShellProxy
()?.
ptr
;
static
ApplicationConnection
_initEmbedderConnection
()
{
core
.
MojoHandle
servicesHandle
=
new
core
.
MojoHandle
(
ui
.
takeServicesProvidedByEmbedder
());
core
.
MojoHandle
exposedServicesHandle
=
new
core
.
MojoHandle
(
ui
.
takeServicesProvidedToEmbedder
());
if
(!
servicesHandle
.
isValid
||
!
exposed
ServicesHandle
.
isValid
)
core
.
MojoHandle
incomingServicesHandle
=
new
core
.
MojoHandle
(
ui
.
MojoServices
.
takeIncomingServices
());
core
.
MojoHandle
outgoingServicesHandle
=
new
core
.
MojoHandle
(
ui
.
MojoServices
.
takeOutgoingServices
());
if
(!
incomingServicesHandle
.
isValid
||
!
outgoing
ServicesHandle
.
isValid
)
return
null
;
mojom
.
ServiceProviderProxy
services
=
new
mojom
.
ServiceProviderProxy
.
fromHandle
(
s
ervicesHandle
);
mojom
.
ServiceProviderStub
exposedServices
=
new
mojom
.
ServiceProviderStub
.
fromHandle
(
exposed
ServicesHandle
);
return
new
ApplicationConnection
(
exposedServices
,
s
ervices
);
mojom
.
ServiceProviderProxy
incomingServices
=
new
mojom
.
ServiceProviderProxy
.
fromHandle
(
incomingS
ervicesHandle
);
mojom
.
ServiceProviderStub
outgoingServices
=
new
mojom
.
ServiceProviderStub
.
fromHandle
(
outgoing
ServicesHandle
);
return
new
ApplicationConnection
(
outgoingServices
,
incomingS
ervices
);
}
final
ApplicationConnection
_embedderConnection
=
_initEmbedderConnection
();
...
...
@@ -92,6 +92,24 @@ class MojoShell {
services
.
close
();
}
static
mojom
.
ServiceProviderProxy
_takeViewServices
()
{
core
.
MojoHandle
services
=
new
core
.
MojoHandle
(
ui
.
MojoServices
.
takeViewServices
());
if
(!
services
.
isValid
)
return
null
;
return
new
mojom
.
ServiceProviderProxy
.
fromHandle
(
services
);
}
final
mojom
.
ServiceProviderProxy
_viewServices
=
_takeViewServices
();
void
connectToViewAssociatedService
(
bindings
.
ProxyBase
proxy
)
{
if
(
overrideConnectToService
!=
null
&&
overrideConnectToService
(
null
,
proxy
))
return
;
if
(
_viewServices
==
null
)
return
;
core
.
MojoMessagePipe
pipe
=
new
core
.
MojoMessagePipe
();
proxy
.
impl
.
bind
(
pipe
.
endpoints
[
0
]);
_viewServices
.
ptr
.
connectToService
(
proxy
.
serviceName
,
pipe
.
endpoints
[
1
]);
}
/// Registers a service to expose to the embedder.
void
provideService
(
String
interfaceName
,
ServiceFactory
factory
)
{
_embedderConnection
?.
provideService
(
interfaceName
,
factory
);
...
...
packages/flutter/lib/src/rendering/child_view.dart
View file @
f2d78aed
...
...
@@ -18,7 +18,7 @@ import 'box.dart';
import
'object.dart'
;
mojom
.
ViewProxy
_initViewProxy
(
)
{
int
viewHandle
=
ui
.
takeViewHandle
();
int
viewHandle
=
ui
.
MojoServices
.
takeView
();
if
(
viewHandle
==
core
.
MojoHandle
.
INVALID
)
return
null
;
return
new
mojom
.
ViewProxy
.
fromHandle
(
new
core
.
MojoHandle
(
viewHandle
));
...
...
packages/flutter/lib/src/services/asset_bundle.dart
View file @
f2d78aed
...
...
@@ -105,7 +105,7 @@ class MojoAssetBundle extends CachingAssetBundle {
}
AssetBundle
_initRootBundle
(
)
{
int
h
=
ui
.
takeRootBundleHa
ndle
();
int
h
=
ui
.
MojoServices
.
takeRootBu
ndle
();
if
(
h
==
core
.
MojoHandle
.
INVALID
)
return
null
;
core
.
MojoHandle
handle
=
new
core
.
MojoHandle
(
h
);
...
...
packages/flutter/lib/src/services/keyboard.dart
View file @
f2d78aed
...
...
@@ -84,7 +84,7 @@ class KeyboardHandle {
mojom
.
KeyboardProxy
_initKeyboardProxy
(
)
{
mojom
.
KeyboardProxy
proxy
=
new
mojom
.
KeyboardProxy
.
unbound
();
shell
.
connectTo
Service
(
null
,
proxy
);
shell
.
connectTo
ViewAssociatedService
(
proxy
);
return
proxy
;
}
...
...
packages/flutter/lib/src/widgets/raw_keyboard_listener.dart
View file @
f2d78aed
...
...
@@ -59,7 +59,7 @@ class _RawKeyboardListenerState extends State<RawKeyboardListener> implements mo
return
;
_stub
=
new
mojom
.
RawKeyboardListenerStub
.
unbound
()..
impl
=
this
;
mojom
.
RawKeyboardServiceProxy
keyboard
=
new
mojom
.
RawKeyboardServiceProxy
.
unbound
();
shell
.
connectTo
Service
(
null
,
keyboard
);
shell
.
connectTo
ViewAssociatedService
(
keyboard
);
keyboard
.
ptr
.
addListener
(
_stub
);
keyboard
.
close
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment