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

Side by Side Diff: components/guest_view/renderer/guest_view_container.cc

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 comments from nasko@ + git cl format 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 #include "components/guest_view/renderer/guest_view_container.h" 5 #include "components/guest_view/renderer/guest_view_container.h"
6 6
7 #include "components/guest_view/common/guest_view_constants.h" 7 #include "components/guest_view/common/guest_view_constants.h"
8 #include "components/guest_view/common/guest_view_messages.h" 8 #include "components/guest_view/common/guest_view_messages.h"
9 #include "components/guest_view/renderer/guest_view_request.h" 9 #include "components/guest_view/renderer/guest_view_request.h"
10 #include "content/public/renderer/render_frame.h" 10 #include "content/public/renderer/render_frame.h"
(...skipping 29 matching lines...) Expand all
40 GuestViewContainer* container, 40 GuestViewContainer* container,
41 content::RenderFrame* render_frame) 41 content::RenderFrame* render_frame)
42 : content::RenderFrameObserver(render_frame), 42 : content::RenderFrameObserver(render_frame),
43 container_(container) {} 43 container_(container) {}
44 44
45 void GuestViewContainer::RenderFrameLifetimeObserver::OnDestruct() { 45 void GuestViewContainer::RenderFrameLifetimeObserver::OnDestruct() {
46 container_->RenderFrameDestroyed(); 46 container_->RenderFrameDestroyed();
47 } 47 }
48 48
49 GuestViewContainer::GuestViewContainer(content::RenderFrame* render_frame) 49 GuestViewContainer::GuestViewContainer(content::RenderFrame* render_frame)
50 : element_instance_id_(guest_view::kInstanceIDNone), 50 : ready_(false),
51 element_instance_id_(guest_view::kInstanceIDNone),
51 render_frame_(render_frame), 52 render_frame_(render_frame),
52 ready_(false),
53 in_destruction_(false), 53 in_destruction_(false),
54 weak_ptr_factory_(this) { 54 weak_ptr_factory_(this) {
55 render_frame_lifetime_observer_.reset( 55 render_frame_lifetime_observer_.reset(
56 new RenderFrameLifetimeObserver(this, render_frame_)); 56 new RenderFrameLifetimeObserver(this, render_frame_));
57 } 57 }
58 58
59 GuestViewContainer::~GuestViewContainer() { 59 GuestViewContainer::~GuestViewContainer() {
60 // Note: Cleanups should be done in GuestViewContainer::Destroy(), not here. 60 // Note: Cleanups should be done in GuestViewContainer::Destroy(), not here.
61 } 61 }
62 62
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 179
180 void GuestViewContainer::DidDestroyElement() { 180 void GuestViewContainer::DidDestroyElement() {
181 Destroy(false); 181 Destroy(false);
182 } 182 }
183 183
184 base::WeakPtr<content::BrowserPluginDelegate> GuestViewContainer::GetWeakPtr() { 184 base::WeakPtr<content::BrowserPluginDelegate> GuestViewContainer::GetWeakPtr() {
185 return weak_ptr_factory_.GetWeakPtr(); 185 return weak_ptr_factory_.GetWeakPtr();
186 } 186 }
187 187
188 } // namespace guest_view 188 } // namespace guest_view
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698