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

Side by Side Diff: extensions/browser/guest_view/guest_view_base.cc

Issue 514653003: GuestView: Cleanup on Embedder process swap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "extensions/browser/guest_view/guest_view_base.h" 5 #include "extensions/browser/guest_view/guest_view_base.h"
6 6
7 #include "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "content/public/browser/render_frame_host.h" 9 #include "content/public/browser/render_frame_host.h"
10 #include "content/public/browser/render_process_host.h" 10 #include "content/public/browser/render_process_host.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 } 63 }
64 64
65 virtual ~EmbedderWebContentsObserver() { 65 virtual ~EmbedderWebContentsObserver() {
66 } 66 }
67 67
68 // WebContentsObserver implementation. 68 // WebContentsObserver implementation.
69 virtual void WebContentsDestroyed() OVERRIDE { 69 virtual void WebContentsDestroyed() OVERRIDE {
70 Destroy(); 70 Destroy();
71 } 71 }
72 72
73 virtual void RenderViewHostChanged(
74 content::RenderViewHost* old_host,
75 content::RenderViewHost* new_host) OVERRIDE {
76 Destroy();
77 }
78
73 virtual void RenderProcessGone(base::TerminationStatus status) OVERRIDE { 79 virtual void RenderProcessGone(base::TerminationStatus status) OVERRIDE {
74 Destroy(); 80 Destroy();
75 } 81 }
76 82
77 private: 83 private:
78 bool destroyed_; 84 bool destroyed_;
79 GuestViewBase* guest_; 85 GuestViewBase* guest_;
80 86
81 void Destroy() { 87 void Destroy() {
82 if (destroyed_) 88 if (destroyed_)
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 } 449 }
444 450
445 // static 451 // static
446 void GuestViewBase::RegisterGuestViewTypes() { 452 void GuestViewBase::RegisterGuestViewTypes() {
447 AppViewGuest::Register(); 453 AppViewGuest::Register();
448 WebViewGuest::Register(); 454 WebViewGuest::Register();
449 ExtensionsAPIClient::Get()->RegisterGuestViewTypes(); 455 ExtensionsAPIClient::Get()->RegisterGuestViewTypes();
450 } 456 }
451 457
452 } // namespace extensions 458 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698