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

Side by Side Diff: content/browser/web_contents/web_contents_impl.h

Issue 11748034: Browser Plugin: Refactor BrowserPluginEmbedder to allow creating guests with openers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed nits Created 7 years, 11 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 | Annotate | Revision Log
OLDNEW
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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 public RenderWidgetHostDelegate, 78 public RenderWidgetHostDelegate,
79 public RenderViewHostManager::Delegate, 79 public RenderViewHostManager::Delegate,
80 public NotificationObserver { 80 public NotificationObserver {
81 public: 81 public:
82 virtual ~WebContentsImpl(); 82 virtual ~WebContentsImpl();
83 83
84 static WebContentsImpl* CreateWithOpener( 84 static WebContentsImpl* CreateWithOpener(
85 const WebContents::CreateParams& params, 85 const WebContents::CreateParams& params,
86 WebContentsImpl* opener); 86 WebContentsImpl* opener);
87 87
88 // Returns the opener WebContentsImpl, if any. This can be set to null if the
89 // opener is closed or the page clears its window.opener.
90 WebContentsImpl* opener() const { return opener_; }
91
88 // Creates a WebContents to be used as a browser plugin guest. 92 // Creates a WebContents to be used as a browser plugin guest.
89 static WebContentsImpl* CreateGuest( 93 static WebContentsImpl* CreateGuest(
90 BrowserContext* browser_context, 94 BrowserContext* browser_context,
91 content::SiteInstance* site_instance, 95 content::SiteInstance* site_instance,
96 int routing_id,
97 WebContentsImpl* opener_web_contents,
92 int guest_instance_id, 98 int guest_instance_id,
93 const BrowserPluginHostMsg_CreateGuest_Params& params); 99 const BrowserPluginHostMsg_CreateGuest_Params& params);
94 100
95 // Returns the content specific prefs for the given RVH. 101 // Returns the content specific prefs for the given RVH.
96 static webkit_glue::WebPreferences GetWebkitPrefs( 102 static webkit_glue::WebPreferences GetWebkitPrefs(
97 RenderViewHost* rvh, const GURL& url); 103 RenderViewHost* rvh, const GURL& url);
98 104
99 // Creates a swapped out RenderView. This is used by the browser plugin to 105 // Creates a swapped out RenderView. This is used by the browser plugin to
100 // create a swapped out RenderView in the embedder render process for the 106 // create a swapped out RenderView in the embedder render process for the
101 // guest, to expose the guest's window object to the embedder. 107 // guest, to expose the guest's window object to the embedder.
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 // Maps the ids of pending favicon downloads to their callbacks 865 // Maps the ids of pending favicon downloads to their callbacks
860 typedef std::map<int, FaviconDownloadCallback> FaviconDownloadMap; 866 typedef std::map<int, FaviconDownloadCallback> FaviconDownloadMap;
861 FaviconDownloadMap favicon_download_map_; 867 FaviconDownloadMap favicon_download_map_;
862 868
863 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); 869 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl);
864 }; 870 };
865 871
866 } // namespace content 872 } // namespace content
867 873
868 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 874 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/browser_plugin/browser_plugin_embedder.cc ('k') | content/browser/web_contents/web_contents_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698