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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 // GetViewFromID takes a view ID, and returns the GuestView element associated | 54 // GetViewFromID takes a view ID, and returns the GuestView element associated |
55 // with that ID, if one exists. Otherwise, null is returned. | 55 // with that ID, if one exists. Otherwise, null is returned. |
56 void GetViewFromID(const v8::FunctionCallbackInfo<v8::Value>& args); | 56 void GetViewFromID(const v8::FunctionCallbackInfo<v8::Value>& args); |
57 | 57 |
58 // RegisterDestructionCallback registers a JavaScript callback function to be | 58 // RegisterDestructionCallback registers a JavaScript callback function to be |
59 // called when the guestview's container is destroyed. | 59 // called when the guestview's container is destroyed. |
60 // RegisterDestructionCallback takes in a single paramater, |callback|. | 60 // RegisterDestructionCallback takes in a single paramater, |callback|. |
61 void RegisterDestructionCallback( | 61 void RegisterDestructionCallback( |
62 const v8::FunctionCallbackInfo<v8::Value>& args); | 62 const v8::FunctionCallbackInfo<v8::Value>& args); |
63 | 63 |
| 64 void AttachIframeGuest(const v8::FunctionCallbackInfo<v8::Value>& args); |
| 65 void IsSitePerProcess(const v8::FunctionCallbackInfo<v8::Value>& args); |
| 66 |
64 // RegisterElementResizeCallback registers a JavaScript callback function to | 67 // RegisterElementResizeCallback registers a JavaScript callback function to |
65 // be called when the element is resized. RegisterElementResizeCallback takes | 68 // be called when the element is resized. RegisterElementResizeCallback takes |
66 // a single parameter, |callback|. | 69 // a single parameter, |callback|. |
67 void RegisterElementResizeCallback( | 70 void RegisterElementResizeCallback( |
68 const v8::FunctionCallbackInfo<v8::Value>& args); | 71 const v8::FunctionCallbackInfo<v8::Value>& args); |
69 | 72 |
70 // RegisterView takes in a view ID and a GuestView element, and stores the | 73 // RegisterView takes in a view ID and a GuestView element, and stores the |
71 // pair as an entry in |view_map_|. The view can then be retrieved using | 74 // pair as an entry in |view_map_|. The view can then be retrieved using |
72 // GetViewFromID. | 75 // GetViewFromID. |
73 void RegisterView(const v8::FunctionCallbackInfo<v8::Value>& args); | 76 void RegisterView(const v8::FunctionCallbackInfo<v8::Value>& args); |
74 | 77 |
75 // Runs a JavaScript function with user gesture. | 78 // Runs a JavaScript function with user gesture. |
76 // | 79 // |
77 // This is used to request webview element to enter fullscreen (from the | 80 // This is used to request webview element to enter fullscreen (from the |
78 // embedder). | 81 // embedder). |
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 |