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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 // javascript: URLs that load into the DOMWindow before the first page | 132 // javascript: URLs that load into the DOMWindow before the first page |
133 // load. This is not safe to do in any context that a web page could get a | 133 // load. This is not safe to do in any context that a web page could get a |
134 // reference to the DOMWindow before the first page load. | 134 // reference to the DOMWindow before the first page load. |
135 bool CreateRenderViewForInitialEmptyDocument(); | 135 bool CreateRenderViewForInitialEmptyDocument(); |
136 #endif | 136 #endif |
137 | 137 |
138 // Expose the render manager for testing. | 138 // Expose the render manager for testing. |
139 // TODO(creis): Remove this now that we can get to it via FrameTreeNode. | 139 // TODO(creis): Remove this now that we can get to it via FrameTreeNode. |
140 RenderFrameHostManager* GetRenderManagerForTesting(); | 140 RenderFrameHostManager* GetRenderManagerForTesting(); |
141 | 141 |
| 142 // Returns the outer WebContents of this WebContents if any. |
| 143 // Note that without --site-per-process, this will return the WebContents |
| 144 // of the BrowserPluginEmbedder, if |this| is a guest. |
| 145 WebContentsImpl* GetOuterWebContents(); |
| 146 |
142 // Returns guest browser plugin object, or NULL if this WebContents is not a | 147 // Returns guest browser plugin object, or NULL if this WebContents is not a |
143 // guest. | 148 // guest. |
144 BrowserPluginGuest* GetBrowserPluginGuest() const; | 149 BrowserPluginGuest* GetBrowserPluginGuest() const; |
145 | 150 |
146 // Sets a BrowserPluginGuest object for this WebContents. If this WebContents | 151 // Sets a BrowserPluginGuest object for this WebContents. If this WebContents |
147 // has a BrowserPluginGuest then that implies that it is being hosted by | 152 // has a BrowserPluginGuest then that implies that it is being hosted by |
148 // a BrowserPlugin object in an embedder renderer process. | 153 // a BrowserPlugin object in an embedder renderer process. |
149 void SetBrowserPluginGuest(BrowserPluginGuest* guest); | 154 void SetBrowserPluginGuest(BrowserPluginGuest* guest); |
150 | 155 |
151 // Returns embedder browser plugin object, or NULL if this WebContents is not | 156 // Returns embedder browser plugin object, or NULL if this WebContents is not |
(...skipping 1174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1326 // Adds/removes a callback called on creation of each new WebContents. | 1331 // Adds/removes a callback called on creation of each new WebContents. |
1327 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); | 1332 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); |
1328 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); | 1333 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); |
1329 | 1334 |
1330 DISALLOW_COPY_AND_ASSIGN(FriendZone); | 1335 DISALLOW_COPY_AND_ASSIGN(FriendZone); |
1331 }; | 1336 }; |
1332 | 1337 |
1333 } // namespace content | 1338 } // namespace content |
1334 | 1339 |
1335 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 1340 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
OLD | NEW |