OLD | NEW |
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 "chrome/browser/guest_view/guest_view_manager.h" | 5 #include "chrome/browser/guest_view/guest_view_manager.h" |
6 | 6 |
7 #include "chrome/browser/extensions/extension_service.h" | 7 #include "chrome/browser/extensions/extension_service.h" |
8 #include "chrome/browser/guest_view/guest_view_base.h" | 8 #include "chrome/browser/guest_view/guest_view_base.h" |
9 #include "chrome/browser/guest_view/guest_view_constants.h" | 9 #include "chrome/browser/guest_view/guest_view_constants.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 bool is_main_frame, | 41 bool is_main_frame, |
42 const GURL& validated_url, | 42 const GURL& validated_url, |
43 bool is_error_page, | 43 bool is_error_page, |
44 bool is_iframe_srcdoc, | 44 bool is_iframe_srcdoc, |
45 content::RenderViewHost* render_view_host) OVERRIDE { | 45 content::RenderViewHost* render_view_host) OVERRIDE { |
46 GuestViewManager::FromBrowserContext(web_contents()->GetBrowserContext())-> | 46 GuestViewManager::FromBrowserContext(web_contents()->GetBrowserContext())-> |
47 AddRenderProcessHostID(web_contents()->GetRenderProcessHost()->GetID()); | 47 AddRenderProcessHostID(web_contents()->GetRenderProcessHost()->GetID()); |
48 delete this; | 48 delete this; |
49 } | 49 } |
50 | 50 |
51 virtual void WebContentsDestroyed(WebContents* web_contents) OVERRIDE { | 51 virtual void WebContentsDestroyed() OVERRIDE { |
52 delete this; | 52 delete this; |
53 } | 53 } |
54 | 54 |
55 private: | 55 private: |
56 DISALLOW_COPY_AND_ASSIGN(GuestWebContentsObserver); | 56 DISALLOW_COPY_AND_ASSIGN(GuestWebContentsObserver); |
57 }; | 57 }; |
58 | 58 |
59 GuestViewManager::GuestViewManager(content::BrowserContext* context) | 59 GuestViewManager::GuestViewManager(content::BrowserContext* context) |
60 : current_instance_id_(0), | 60 : current_instance_id_(0), |
61 context_(context) {} | 61 context_(context) {} |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 return false; | 214 return false; |
215 | 215 |
216 return embedder_render_process_id == | 216 return embedder_render_process_id == |
217 guest->GetOpener()->GetEmbedderWebContents()->GetRenderProcessHost()-> | 217 guest->GetOpener()->GetEmbedderWebContents()->GetRenderProcessHost()-> |
218 GetID(); | 218 GetID(); |
219 } | 219 } |
220 | 220 |
221 return embedder_render_process_id == | 221 return embedder_render_process_id == |
222 guest->embedder_web_contents()->GetRenderProcessHost()->GetID(); | 222 guest->embedder_web_contents()->GetRenderProcessHost()->GetID(); |
223 } | 223 } |
OLD | NEW |