OLD | NEW |
---|---|
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 module content.mojom; | 5 module content.mojom; |
6 | 6 |
7 import "mojo/common/string16.mojom"; | |
8 | |
7 import "services/service_manager/public/interfaces/interface_provider.mojom"; | 9 import "services/service_manager/public/interfaces/interface_provider.mojom"; |
8 | 10 |
9 // The name of the InterfaceProviderSpec in service manifests used by the | 11 // The name of the InterfaceProviderSpec in service manifests used by the |
10 // frame tree to expose frame-specific interfaces between renderer and browser. | 12 // frame tree to expose frame-specific interfaces between renderer and browser. |
11 const string kNavigation_FrameSpec = "navigation:frame"; | 13 const string kNavigation_FrameSpec = "navigation:frame"; |
12 | 14 |
13 // Implemented by the frame provider (e.g. renderer processes). | 15 // Implemented by the frame provider (e.g. renderer processes). |
14 interface Frame { | 16 interface Frame { |
15 GetInterfaceProvider(service_manager.mojom.InterfaceProvider& interfaces); | 17 GetInterfaceProvider(service_manager.mojom.InterfaceProvider& interfaces); |
16 }; | 18 }; |
17 | 19 |
18 // Implemented by the frame (e.g. renderer processes). | 20 // Implemented by the frame (e.g. renderer processes). |
19 // Instances of this interface must be associated with (i.e., FIFO with) the | 21 // Instances of this interface must be associated with (i.e., FIFO with) the |
20 // legacy IPC channel. | 22 // legacy IPC channel. |
21 interface FrameBindingsControl { | 23 interface FrameBindingsControl { |
22 // Used to tell a render frame whether it should expose various bindings | 24 // Used to tell a render frame whether it should expose various bindings |
23 // that allow JS content extended privileges. See BindingsPolicy for valid | 25 // that allow JS content extended privileges. See BindingsPolicy for valid |
24 // flag values. | 26 // flag values. |
25 AllowBindings(int32 enabled_bindings_flags); | 27 AllowBindings(int32 enabled_bindings_flags); |
26 }; | 28 }; |
27 | 29 |
28 // Implemented by the frame server (i.e. the browser process). | 30 // Implemented by the frame server (i.e. the browser process). |
29 interface FrameHost { | 31 interface FrameHost { |
30 GetInterfaceProvider(service_manager.mojom.InterfaceProvider& interfaces); | 32 GetInterfaceProvider(service_manager.mojom.InterfaceProvider& interfaces); |
33 | |
34 RequestKeyLock(array<string> key_codes) | |
whywhat
2017/04/11 14:52:33
I think the intention here is for various APIs to
Hzj_jie
2017/04/12 02:51:05
Got you, thank you.
The code has been updated.
| |
35 => (bool allowed_by_user_or_browser, mojo.common.mojom.String16 reason); | |
36 | |
37 CancelKeyLock() => (); | |
whywhat
2017/04/11 14:52:33
nit: I believe you can just omit => () if it's not
Hzj_jie
2017/04/12 02:51:05
The plan is to let browser tell renderer the finis
| |
31 }; | 38 }; |
32 | 39 |
33 // Implemented by a service that provides implementations of the Frame | 40 // Implemented by a service that provides implementations of the Frame |
34 // interface. (e.g. renderer processes). | 41 // interface. (e.g. renderer processes). |
35 interface FrameFactory { | 42 interface FrameFactory { |
36 CreateFrame(int32 frame_routing_id, Frame& frame, FrameHost host); | 43 CreateFrame(int32 frame_routing_id, Frame& frame, FrameHost host); |
37 }; | 44 }; |
OLD | NEW |