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

Side by Side Diff: components/guest_view/renderer/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: Rebase after swapped out changes major rework with RFP 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 COMPONENTS_GUEST_VIEW_RENDERER_GUEST_VIEW_CONTAINER_H_ 5 #ifndef COMPONENTS_GUEST_VIEW_RENDERER_GUEST_VIEW_CONTAINER_H_
6 #define COMPONENTS_GUEST_VIEW_RENDERER_GUEST_VIEW_CONTAINER_H_ 6 #define COMPONENTS_GUEST_VIEW_RENDERER_GUEST_VIEW_CONTAINER_H_
7 7
8 #include "base/memory/linked_ptr.h" 8 #include "base/memory/linked_ptr.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "content/public/renderer/browser_plugin_delegate.h" 10 #include "content/public/renderer/browser_plugin_delegate.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 virtual bool OnMessage(const IPC::Message& message); 43 virtual bool OnMessage(const IPC::Message& message);
44 44
45 // Called to perform actions when a GuestViewContainer gets a geometry. 45 // Called to perform actions when a GuestViewContainer gets a geometry.
46 virtual void OnReady() {} 46 virtual void OnReady() {}
47 47
48 // Called to perform actions when a GuestViewContainer is about to be 48 // Called to perform actions when a GuestViewContainer is about to be
49 // destroyed. 49 // destroyed.
50 // Note that this should be called exactly once. 50 // Note that this should be called exactly once.
51 virtual void OnDestroy() {} 51 virtual void OnDestroy() {}
52 52
53 // BrowserPluginGuestDelegate public implementation.
54 void SetElementInstanceID(int element_instance_id) final;
55
53 protected: 56 protected:
54 ~GuestViewContainer() override; 57 ~GuestViewContainer() override;
55 58
59 bool ready_;
60
61 void OnHandleCallback(const IPC::Message& message);
62
56 private: 63 private:
57 class RenderFrameLifetimeObserver; 64 class RenderFrameLifetimeObserver;
58 friend class RenderFrameLifetimeObserver; 65 friend class RenderFrameLifetimeObserver;
59 66
60 void RenderFrameDestroyed(); 67 void RenderFrameDestroyed();
61 68
62 void EnqueueRequest(linked_ptr<GuestViewRequest> request); 69 void EnqueueRequest(linked_ptr<GuestViewRequest> request);
63 void PerformPendingRequest(); 70 void PerformPendingRequest();
64 void HandlePendingResponseCallback(const IPC::Message& message); 71 void HandlePendingResponseCallback(const IPC::Message& message);
65 72
66 void OnHandleCallback(const IPC::Message& message);
67
68 // BrowserPluginDelegate implementation. 73 // BrowserPluginDelegate implementation.
69 void Ready() final; 74 void Ready() final;
70 void SetElementInstanceID(int element_instance_id) final;
71 void DidDestroyElement() final; 75 void DidDestroyElement() final;
72 76
73 int element_instance_id_; 77 int element_instance_id_;
74 content::RenderFrame* render_frame_; 78 content::RenderFrame* render_frame_;
75 scoped_ptr<RenderFrameLifetimeObserver> render_frame_lifetime_observer_; 79 scoped_ptr<RenderFrameLifetimeObserver> render_frame_lifetime_observer_;
76 80
77 bool ready_;
78 bool in_destruction_; 81 bool in_destruction_;
79 82
80 std::deque<linked_ptr<GuestViewRequest> > pending_requests_; 83 std::deque<linked_ptr<GuestViewRequest> > pending_requests_;
81 linked_ptr<GuestViewRequest> pending_response_; 84 linked_ptr<GuestViewRequest> pending_response_;
82 85
83 DISALLOW_COPY_AND_ASSIGN(GuestViewContainer); 86 DISALLOW_COPY_AND_ASSIGN(GuestViewContainer);
84 }; 87 };
85 88
86 } // namespace guest_view 89 } // namespace guest_view
87 90
88 #endif // COMPONENTS_GUEST_VIEW_RENDERER_GUEST_VIEW_CONTAINER_H_ 91 #endif // COMPONENTS_GUEST_VIEW_RENDERER_GUEST_VIEW_CONTAINER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698