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 #ifndef EXTENSIONS_RENDERER_GUEST_VIEW_GUEST_VIEW_INTERNAL_CUSTOM_BINDINGS_H_ | 5 #ifndef EXTENSIONS_RENDERER_GUEST_VIEW_GUEST_VIEW_INTERNAL_CUSTOM_BINDINGS_H_ |
6 #define EXTENSIONS_RENDERER_GUEST_VIEW_GUEST_VIEW_INTERNAL_CUSTOM_BINDINGS_H_ | 6 #define EXTENSIONS_RENDERER_GUEST_VIEW_GUEST_VIEW_INTERNAL_CUSTOM_BINDINGS_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "extensions/renderer/object_backed_native_handler.h" | 10 #include "extensions/renderer/object_backed_native_handler.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 void AttachGuest(const v8::FunctionCallbackInfo<v8::Value>& args); | 40 void AttachGuest(const v8::FunctionCallbackInfo<v8::Value>& args); |
41 | 41 |
42 // DetachGuest detaches the container container specified from the associated | 42 // DetachGuest detaches the container container specified from the associated |
43 // GuestViewBase. DetachGuest takes two parameters: | 43 // GuestViewBase. DetachGuest takes two parameters: |
44 // |element_instance_id| uniquely identifies a container within the content | 44 // |element_instance_id| uniquely identifies a container within the content |
45 // module is able to host GuestViews. | 45 // module is able to host GuestViews. |
46 // |callback| is an optional callback that is called once the container has | 46 // |callback| is an optional callback that is called once the container has |
47 // been detached. | 47 // been detached. |
48 void DetachGuest(const v8::FunctionCallbackInfo<v8::Value>& args); | 48 void DetachGuest(const v8::FunctionCallbackInfo<v8::Value>& args); |
49 | 49 |
| 50 // AttachIframeGuest is --site-per-process variant of AttachGuest(). |
| 51 // |
| 52 // AttachIframeGuest takes a |contentWindow| parameter in addition to the |
| 53 // parameters to AttachGuest. That parameter is used to identify the |
| 54 // RenderFrame of the <iframe> container element. |
| 55 void AttachIframeGuest(const v8::FunctionCallbackInfo<v8::Value>& args); |
| 56 |
50 // GetContentWindow takes in a RenderView routing ID and returns the | 57 // GetContentWindow takes in a RenderView routing ID and returns the |
51 // Window JavaScript object for that RenderView. | 58 // Window JavaScript object for that RenderView. |
52 void GetContentWindow(const v8::FunctionCallbackInfo<v8::Value>& args); | 59 void GetContentWindow(const v8::FunctionCallbackInfo<v8::Value>& args); |
53 | 60 |
54 // Destroys the GuestViewContainer given an element instance ID in |args|. | 61 // Destroys the GuestViewContainer given an element instance ID in |args|. |
55 void DestroyContainer(const v8::FunctionCallbackInfo<v8::Value>& args); | 62 void DestroyContainer(const v8::FunctionCallbackInfo<v8::Value>& args); |
56 | 63 |
57 // GetViewFromID takes a view ID, and returns the GuestView element associated | 64 // GetViewFromID takes a view ID, and returns the GuestView element associated |
58 // with that ID, if one exists. Otherwise, null is returned. | 65 // with that ID, if one exists. Otherwise, null is returned. |
59 void GetViewFromID(const v8::FunctionCallbackInfo<v8::Value>& args); | 66 void GetViewFromID(const v8::FunctionCallbackInfo<v8::Value>& args); |
(...skipping 22 matching lines...) Expand all Loading... |
82 // Note that the guest requesting fullscreen means it has already been | 89 // Note that the guest requesting fullscreen means it has already been |
83 // triggered by a user gesture and we get to this point if embedder allows | 90 // triggered by a user gesture and we get to this point if embedder allows |
84 // the fullscreen request to proceed. | 91 // the fullscreen request to proceed. |
85 void RunWithGesture( | 92 void RunWithGesture( |
86 const v8::FunctionCallbackInfo<v8::Value>& args); | 93 const v8::FunctionCallbackInfo<v8::Value>& args); |
87 }; | 94 }; |
88 | 95 |
89 } // namespace extensions | 96 } // namespace extensions |
90 | 97 |
91 #endif // EXTENSIONS_RENDERER_GUEST_VIEW_GUEST_VIEW_INTERNAL_CUSTOM_BINDINGS_H_ | 98 #endif // EXTENSIONS_RENDERER_GUEST_VIEW_GUEST_VIEW_INTERNAL_CUSTOM_BINDINGS_H_ |
OLD | NEW |