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_EXTENSIONS_GUEST_VIEW_CONTAINER_H_ | 5 #ifndef EXTENSIONS_RENDERER_GUEST_VIEW_EXTENSIONS_GUEST_VIEW_CONTAINER_H_ |
6 #define EXTENSIONS_RENDERER_GUEST_VIEW_EXTENSIONS_GUEST_VIEW_CONTAINER_H_ | 6 #define EXTENSIONS_RENDERER_GUEST_VIEW_EXTENSIONS_GUEST_VIEW_CONTAINER_H_ |
7 | 7 |
8 #include <queue> | 8 #include <queue> |
9 | 9 |
10 #include "components/guest_view/renderer/guest_view_container.h" | 10 #include "components/guest_view/renderer/guest_view_container.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 v8::Isolate* isolate); | 25 v8::Isolate* isolate); |
26 void RegisterElementResizeCallback(v8::Local<v8::Function> callback, | 26 void RegisterElementResizeCallback(v8::Local<v8::Function> callback, |
27 v8::Isolate* isolate); | 27 v8::Isolate* isolate); |
28 | 28 |
29 // BrowserPluginDelegate implementation. | 29 // BrowserPluginDelegate implementation. |
30 void DidResizeElement(const gfx::Size& new_size) override; | 30 void DidResizeElement(const gfx::Size& new_size) override; |
31 | 31 |
32 private: | 32 private: |
33 void CallElementResizeCallback(const gfx::Size& new_size); | 33 void CallElementResizeCallback(const gfx::Size& new_size); |
34 | 34 |
| 35 void OnDestroy() override; |
| 36 |
35 v8::Global<v8::Function> destruction_callback_; | 37 v8::Global<v8::Function> destruction_callback_; |
36 v8::Isolate* destruction_isolate_; | 38 v8::Isolate* destruction_isolate_; |
37 | 39 |
38 v8::Global<v8::Function> element_resize_callback_; | 40 v8::Global<v8::Function> element_resize_callback_; |
39 v8::Isolate* element_resize_isolate_; | 41 v8::Isolate* element_resize_isolate_; |
40 | 42 |
41 // Weak pointer factory used for calling the element resize callback. | 43 // Weak pointer factory used for calling the element resize callback. |
42 base::WeakPtrFactory<ExtensionsGuestViewContainer> weak_ptr_factory_; | 44 base::WeakPtrFactory<ExtensionsGuestViewContainer> weak_ptr_factory_; |
43 | 45 |
44 DISALLOW_COPY_AND_ASSIGN(ExtensionsGuestViewContainer); | 46 DISALLOW_COPY_AND_ASSIGN(ExtensionsGuestViewContainer); |
45 }; | 47 }; |
46 | 48 |
47 } // namespace extensions | 49 } // namespace extensions |
48 | 50 |
49 #endif // EXTENSIONS_RENDERER_GUEST_VIEW_EXTENSIONS_GUEST_VIEW_CONTAINER_H_ | 51 #endif // EXTENSIONS_RENDERER_GUEST_VIEW_EXTENSIONS_GUEST_VIEW_CONTAINER_H_ |
OLD | NEW |