Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Side by Side Diff: extensions/renderer/guest_view/extensions_guest_view_container.h

Issue 1162053003: Move BrowserPluginDelegate's lifetime mgmt out of content/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: make dtor protected Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
11 #include "v8/include/v8.h" 11 #include "v8/include/v8.h"
12 12
13 namespace gfx { 13 namespace gfx {
14 class Size; 14 class Size;
15 } 15 }
16 16
17 namespace extensions { 17 namespace extensions {
18 18
19 class ExtensionsGuestViewContainer : public guest_view::GuestViewContainer { 19 class ExtensionsGuestViewContainer : public guest_view::GuestViewContainer {
20 public: 20 public:
21 explicit ExtensionsGuestViewContainer(content::RenderFrame* render_frame); 21 explicit ExtensionsGuestViewContainer(content::RenderFrame* render_frame);
22 ~ExtensionsGuestViewContainer() override;
23 22
24 void RegisterDestructionCallback(v8::Local<v8::Function> callback, 23 void RegisterDestructionCallback(v8::Local<v8::Function> callback,
25 v8::Isolate* isolate); 24 v8::Isolate* isolate);
26 void RegisterElementResizeCallback(v8::Local<v8::Function> callback, 25 void RegisterElementResizeCallback(v8::Local<v8::Function> callback,
27 v8::Isolate* isolate); 26 v8::Isolate* isolate);
28 27
29 // BrowserPluginDelegate implementation. 28 // BrowserPluginDelegate implementation.
30 void DidResizeElement(const gfx::Size& new_size) override; 29 void DidResizeElement(const gfx::Size& new_size) override;
31 30
31 protected:
32 ~ExtensionsGuestViewContainer() override;
33
32 private: 34 private:
33 void CallElementResizeCallback(const gfx::Size& new_size); 35 void CallElementResizeCallback(const gfx::Size& new_size);
34 36
37 void OnDestroy() override;
Fady Samuel 2015/06/05 17:31:13 What is this overriding. Please specify.
lazyboy 2015/06/05 21:24:00 Done.
38
35 v8::Global<v8::Function> destruction_callback_; 39 v8::Global<v8::Function> destruction_callback_;
36 v8::Isolate* destruction_isolate_; 40 v8::Isolate* destruction_isolate_;
37 41
38 v8::Global<v8::Function> element_resize_callback_; 42 v8::Global<v8::Function> element_resize_callback_;
39 v8::Isolate* element_resize_isolate_; 43 v8::Isolate* element_resize_isolate_;
40 44
41 // Weak pointer factory used for calling the element resize callback. 45 // Weak pointer factory used for calling the element resize callback.
42 base::WeakPtrFactory<ExtensionsGuestViewContainer> weak_ptr_factory_; 46 base::WeakPtrFactory<ExtensionsGuestViewContainer> weak_ptr_factory_;
43 47
44 DISALLOW_COPY_AND_ASSIGN(ExtensionsGuestViewContainer); 48 DISALLOW_COPY_AND_ASSIGN(ExtensionsGuestViewContainer);
45 }; 49 };
46 50
47 } // namespace extensions 51 } // namespace extensions
48 52
49 #endif // EXTENSIONS_RENDERER_GUEST_VIEW_EXTENSIONS_GUEST_VIEW_CONTAINER_H_ 53 #endif // EXTENSIONS_RENDERER_GUEST_VIEW_EXTENSIONS_GUEST_VIEW_CONTAINER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698