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

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

Issue 972313002: Make <webview> use out-of-process iframe architecture. (Closed) Base URL: ssh://saopaulo.wat/mnt/dev/shared/src@testoopif2z-better-chrome
Patch Set: address all comments from Nasko and Charlie, minus is_loading Created 5 years, 7 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 "extensions/renderer/guest_view/guest_view_container.h" 10 #include "extensions/renderer/guest_view/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 GuestViewContainer { 19 class ExtensionsGuestViewContainer : public GuestViewContainer {
20 public: 20 public:
21 explicit ExtensionsGuestViewContainer(content::RenderFrame* render_frame); 21 explicit ExtensionsGuestViewContainer(content::RenderFrame* render_frame);
22 ~ExtensionsGuestViewContainer() override; 22 ~ExtensionsGuestViewContainer() override;
23 23
24 void RegisterDestructionCallback(v8::Local<v8::Function> callback, 24 void RegisterDestructionCallback(v8::Local<v8::Function> callback,
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 // GuestViewContainer overrides.
30 bool OnMessage(const IPC::Message& message) override;
31
29 // BrowserPluginDelegate implementation. 32 // BrowserPluginDelegate implementation.
30 void DidResizeElement(const gfx::Size& old_size, 33 void DidResizeElement(const gfx::Size& old_size,
31 const gfx::Size& new_size) override; 34 const gfx::Size& new_size) override;
32 35
33 private: 36 private:
34 void CallElementResizeCallback(const gfx::Size& old_size, 37 void CallElementResizeCallback(const gfx::Size& old_size,
35 const gfx::Size& new_size); 38 const gfx::Size& new_size);
36 39
37 v8::Global<v8::Function> destruction_callback_; 40 v8::Global<v8::Function> destruction_callback_;
38 v8::Isolate* destruction_isolate_; 41 v8::Isolate* destruction_isolate_;
39 42
40 v8::Global<v8::Function> element_resize_callback_; 43 v8::Global<v8::Function> element_resize_callback_;
41 v8::Isolate* element_resize_isolate_; 44 v8::Isolate* element_resize_isolate_;
42 45
43 // Weak pointer factory used for calling the element resize callback. 46 // Weak pointer factory used for calling the element resize callback.
44 base::WeakPtrFactory<ExtensionsGuestViewContainer> weak_ptr_factory_; 47 base::WeakPtrFactory<ExtensionsGuestViewContainer> weak_ptr_factory_;
45 48
46 DISALLOW_COPY_AND_ASSIGN(ExtensionsGuestViewContainer); 49 DISALLOW_COPY_AND_ASSIGN(ExtensionsGuestViewContainer);
47 }; 50 };
48 51
49 } // namespace extensions 52 } // namespace extensions
50 53
51 #endif // EXTENSIONS_RENDERER_GUEST_VIEW_EXTENSIONS_GUEST_VIEW_CONTAINER_H_ 54 #endif // EXTENSIONS_RENDERER_GUEST_VIEW_EXTENSIONS_GUEST_VIEW_CONTAINER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698