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

Unified Diff: content/browser/browser_plugin/browser_plugin_guest.h

Issue 272573005: <webview>: Move NewWindow API to chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@guestview_manager_rename
Patch Set: Merge with ToT Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/browser_plugin/browser_plugin_guest.h
diff --git a/content/browser/browser_plugin/browser_plugin_guest.h b/content/browser/browser_plugin/browser_plugin_guest.h
index 61fea1cb080b70dd6c1bd45b64d9098ac418ea7c..b3466c0d143f9341c503817f877b81c55b14df98 100644
--- a/content/browser/browser_plugin/browser_plugin_guest.h
+++ b/content/browser/browser_plugin/browser_plugin_guest.h
@@ -29,7 +29,6 @@
#include "content/public/browser/browser_plugin_guest_delegate.h"
#include "content/public/browser/web_contents_delegate.h"
#include "content/public/browser/web_contents_observer.h"
-#include "content/public/common/browser_plugin_permission_type.h"
#include "third_party/WebKit/public/web/WebCompositionUnderline.h"
#include "third_party/WebKit/public/web/WebDragOperation.h"
#include "third_party/WebKit/public/web/WebDragStatus.h"
@@ -94,12 +93,7 @@ class CONTENT_EXPORT BrowserPluginGuest
int instance_id,
SiteInstance* guest_site_instance,
WebContentsImpl* web_contents,
- scoped_ptr<base::DictionaryValue> extra_params);
-
- static BrowserPluginGuest* CreateWithOpener(
- int instance_id,
- bool has_render_view,
- WebContentsImpl* web_contents,
+ scoped_ptr<base::DictionaryValue> extra_params,
BrowserPluginGuest* opener);
// Returns a WeakPtr to this BrowserPluginGuest.
@@ -280,56 +274,16 @@ class CONTENT_EXPORT BrowserPluginGuest
class EmbedderWebContentsObserver;
friend class TestBrowserPluginGuest;
- class DownloadRequest;
- class NewWindowRequest;
- class PermissionRequest;
-
- // Tracks the name, and target URL of the new window and whether or not it has
- // changed since the WebContents has been created and before the new window
- // has been attached to a BrowserPlugin. Once the first navigation commits, we
- // no longer track this information.
- struct NewWindowInfo {
- bool changed;
- GURL url;
- std::string name;
- NewWindowInfo(const GURL& url, const std::string& name) :
- changed(false),
- url(url),
- name(name) {}
- };
-
// BrowserPluginGuest is a WebContentsObserver of |web_contents| and
// |web_contents| has to stay valid for the lifetime of BrowserPluginGuest.
BrowserPluginGuest(int instance_id,
bool has_render_view,
WebContentsImpl* web_contents);
- // Destroy unattached new windows that have been opened by this
- // BrowserPluginGuest.
- void DestroyUnattachedWindows();
-
- void LoadURLWithParams(const GURL& url,
- const Referrer& referrer,
- PageTransition transition_type,
- WebContents* web_contents);
-
- // Returns the |request_id| generated for the |request| provided.
- void RequestPermission(
- BrowserPluginPermissionType permission_type,
- scoped_refptr<BrowserPluginGuest::PermissionRequest> request,
- const base::DictionaryValue& request_info);
-
- // Creates a new guest window, and BrowserPluginGuest that is owned by this
- // BrowserPluginGuest.
- BrowserPluginGuest* CreateNewGuestWindow(const OpenURLParams& params);
+ void WillDestroy(WebContents* web_contents);
bool InAutoSizeBounds(const gfx::Size& size) const;
- void RequestNewWindowPermission(WindowOpenDisposition disposition,
- const gfx::Rect& initial_bounds,
- bool user_gesture,
- WebContentsImpl* new_contents);
-
// Message handlers for messages from embedder.
void OnCompositorFrameSwappedACK(
@@ -482,16 +436,6 @@ class CONTENT_EXPORT BrowserPluginGuest
typedef std::map<int, const CopyRequestCallback> CopyRequestMap;
CopyRequestMap copy_request_callbacks_;
- typedef std::map<BrowserPluginGuest*, NewWindowInfo> PendingWindowMap;
- PendingWindowMap pending_new_windows_;
- // A counter to generate a unique request id for a permission request.
- // We only need the ids to be unique for a given BrowserPluginGuest.
- int next_permission_request_id_;
-
- // A map to store relevant info for a request keyed by the request's id.
- typedef std::map<int, scoped_refptr<PermissionRequest> > RequestMap;
- RequestMap permission_request_map_;
-
// Indicates that this BrowserPluginGuest has associated renderer-side state.
// This is used to determine whether or not to create a new RenderView when
// this guest is attached.
@@ -515,10 +459,6 @@ class CONTENT_EXPORT BrowserPluginGuest
scoped_ptr<BrowserPluginGuestDelegate> delegate_;
- // These are parameters passed from JavaScript on attachment to the content
- // embedder.
- scoped_ptr<base::DictionaryValue> extra_attach_params_;
-
// Weak pointer used to ask GeolocationPermissionContext about geolocation
// permission.
base::WeakPtrFactory<BrowserPluginGuest> weak_ptr_factory_;
« no previous file with comments | « chrome/browser/guest_view/web_view/web_view_permission_types.h ('k') | content/browser/browser_plugin/browser_plugin_guest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698