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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 // GetContentWindow takes in a RenderView routing ID and returns the | 50 // GetContentWindow takes in a RenderView routing ID and returns the |
51 // Window JavaScript object for that RenderView. | 51 // Window JavaScript object for that RenderView. |
52 void GetContentWindow(const v8::FunctionCallbackInfo<v8::Value>& args); | 52 void GetContentWindow(const v8::FunctionCallbackInfo<v8::Value>& args); |
53 | 53 |
| 54 // Destroys the GuestViewContainer given an element instance ID in |args|. |
| 55 void DestroyContainer(const v8::FunctionCallbackInfo<v8::Value>& args); |
| 56 |
54 // GetViewFromID takes a view ID, and returns the GuestView element associated | 57 // GetViewFromID takes a view ID, and returns the GuestView element associated |
55 // with that ID, if one exists. Otherwise, null is returned. | 58 // with that ID, if one exists. Otherwise, null is returned. |
56 void GetViewFromID(const v8::FunctionCallbackInfo<v8::Value>& args); | 59 void GetViewFromID(const v8::FunctionCallbackInfo<v8::Value>& args); |
57 | 60 |
58 // RegisterDestructionCallback registers a JavaScript callback function to be | 61 // RegisterDestructionCallback registers a JavaScript callback function to be |
59 // called when the guestview's container is destroyed. | 62 // called when the guestview's container is destroyed. |
60 // RegisterDestructionCallback takes in a single paramater, |callback|. | 63 // RegisterDestructionCallback takes in a single paramater, |callback|. |
61 void RegisterDestructionCallback( | 64 void RegisterDestructionCallback( |
62 const v8::FunctionCallbackInfo<v8::Value>& args); | 65 const v8::FunctionCallbackInfo<v8::Value>& args); |
63 | 66 |
(...skipping 15 matching lines...) Expand all Loading... |
79 // Note that the guest requesting fullscreen means it has already been | 82 // Note that the guest requesting fullscreen means it has already been |
80 // triggered by a user gesture and we get to this point if embedder allows | 83 // triggered by a user gesture and we get to this point if embedder allows |
81 // the fullscreen request to proceed. | 84 // the fullscreen request to proceed. |
82 void RunWithGesture( | 85 void RunWithGesture( |
83 const v8::FunctionCallbackInfo<v8::Value>& args); | 86 const v8::FunctionCallbackInfo<v8::Value>& args); |
84 }; | 87 }; |
85 | 88 |
86 } // namespace extensions | 89 } // namespace extensions |
87 | 90 |
88 #endif // EXTENSIONS_RENDERER_GUEST_VIEW_GUEST_VIEW_INTERNAL_CUSTOM_BINDINGS_H_ | 91 #endif // EXTENSIONS_RENDERER_GUEST_VIEW_GUEST_VIEW_INTERNAL_CUSTOM_BINDINGS_H_ |
OLD | NEW |