OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 | 96 |
97 // Creates a WebContents to be used as a browser plugin guest. | 97 // Creates a WebContents to be used as a browser plugin guest. |
98 static WebContentsImpl* CreateGuest(content::BrowserContext* browser_context, | 98 static WebContentsImpl* CreateGuest(content::BrowserContext* browser_context, |
99 const std::string& host, | 99 const std::string& host, |
100 int guest_instance_id); | 100 int guest_instance_id); |
101 | 101 |
102 // Returns the content specific prefs for the given RVH. | 102 // Returns the content specific prefs for the given RVH. |
103 static webkit_glue::WebPreferences GetWebkitPrefs( | 103 static webkit_glue::WebPreferences GetWebkitPrefs( |
104 content::RenderViewHost* rvh, const GURL& url); | 104 content::RenderViewHost* rvh, const GURL& url); |
105 | 105 |
| 106 // Creates a swapped out RenderView. This is used by the browser plugin to |
| 107 // create a swapped out RenderView in the embedder render process for the |
| 108 // guest, to expose the guest's window object to the embedder. |
| 109 // This returns the routing ID of the newly created swapped out RenderView. |
| 110 int CreateSwappedOutRenderView(content::SiteInstance* instance); |
| 111 |
106 // Complex initialization here. Specifically needed to avoid having | 112 // Complex initialization here. Specifically needed to avoid having |
107 // members call back into our virtual functions in the constructor. | 113 // members call back into our virtual functions in the constructor. |
108 virtual void Init(content::BrowserContext* browser_context, | 114 virtual void Init(content::BrowserContext* browser_context, |
109 content::SiteInstance* site_instance, | 115 content::SiteInstance* site_instance, |
110 int routing_id, | 116 int routing_id, |
111 const content::WebContents* base_web_contents); | 117 const content::WebContents* base_web_contents); |
112 | 118 |
113 // Returns the SavePackage which manages the page saving job. May be NULL. | 119 // Returns the SavePackage which manages the page saving job. May be NULL. |
114 SavePackage* save_package() const { return save_package_.get(); } | 120 SavePackage* save_package() const { return save_package_.get(); } |
115 | 121 |
(...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
868 content::RenderViewHost* message_source_; | 874 content::RenderViewHost* message_source_; |
869 | 875 |
870 // All live RenderWidgetHostImpls that are created by this object and may | 876 // All live RenderWidgetHostImpls that are created by this object and may |
871 // outlive it. | 877 // outlive it. |
872 std::set<content::RenderWidgetHostImpl*> created_widgets_; | 878 std::set<content::RenderWidgetHostImpl*> created_widgets_; |
873 | 879 |
874 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); | 880 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); |
875 }; | 881 }; |
876 | 882 |
877 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 883 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
OLD | NEW |