Chromium Code Reviews| 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 7380e362bdfb6c105b7fa4ca4560476d81cce1d1..17a168847cd0c4b63d3bda67fdfdb2bb6b477fbf 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. |
| @@ -167,6 +161,7 @@ class CONTENT_EXPORT BrowserPluginGuest |
| virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| // WebContentsDelegate implementation. |
| + // DONE |
|
lazyboy
2014/05/12 23:00:20
Need to clean these up.
Fady Samuel
2014/05/13 18:59:02
Done.
|
| virtual bool AddMessageToConsole(WebContents* source, |
| int32 level, |
| const base::string16& message, |
| @@ -175,50 +170,67 @@ class CONTENT_EXPORT BrowserPluginGuest |
| // If a new window is created with target="_blank" and rel="noreferrer", then |
| // this method is called, indicating that the new WebContents is ready to be |
| // attached. |
| + // DONE |
| virtual void AddNewContents(WebContents* source, |
| WebContents* new_contents, |
| WindowOpenDisposition disposition, |
| const gfx::Rect& initial_pos, |
| bool user_gesture, |
| bool* was_blocked) OVERRIDE; |
| + // Needs a bit of work |
| virtual void CanDownload(RenderViewHost* render_view_host, |
| int request_id, |
| const std::string& request_method, |
| const base::Callback<void(bool)>& callback) OVERRIDE; |
| + // DONE |
| virtual void LoadProgressChanged(WebContents* source, |
| double progress) OVERRIDE; |
| + // DONE |
| virtual void CloseContents(WebContents* source) OVERRIDE; |
| + // DONE |
| virtual JavaScriptDialogManager* GetJavaScriptDialogManager() OVERRIDE; |
| + // Needs to be moved out. |
| virtual ColorChooser* OpenColorChooser( |
| WebContents* web_contents, |
| SkColor color, |
| const std::vector<ColorSuggestion>& suggestions) OVERRIDE; |
| + // Needs work. |
| virtual bool HandleContextMenu(const ContextMenuParams& params) OVERRIDE; |
| + // Needs work. |
| virtual void HandleKeyboardEvent( |
| WebContents* source, |
| const NativeWebKeyboardEvent& event) OVERRIDE; |
| + // DONE |
| virtual void FindReply(WebContents* contents, |
| int request_id, |
| int number_of_matches, |
| const gfx::Rect& selection_rect, |
| int active_match_ordinal, |
| bool final_update) OVERRIDE; |
| + // DONE |
| virtual WebContents* OpenURLFromTab(WebContents* source, |
| const OpenURLParams& params) OVERRIDE; |
| + // Needs work. Name attribute needs to move out. |
| virtual void WebContentsCreated(WebContents* source_contents, |
| int opener_render_frame_id, |
| const base::string16& frame_name, |
| const GURL& target_url, |
| WebContents* new_contents) OVERRIDE; |
| + // Done |
| virtual void RendererUnresponsive(WebContents* source) OVERRIDE; |
| + // DONE |
| virtual void RendererResponsive(WebContents* source) OVERRIDE; |
| + // Needs a little bit of work. |
| virtual void RunFileChooser(WebContents* web_contents, |
| const FileChooserParams& params) OVERRIDE; |
| + // DONE |
| virtual bool ShouldFocusPageAfterCrash() OVERRIDE; |
| + // DONE |
| virtual void RequestMediaAccessPermission( |
| WebContents* web_contents, |
| const MediaStreamRequest& request, |
| const MediaResponseCallback& callback) OVERRIDE; |
| + // Needs a tiny bit of work. |
| virtual bool PreHandleGestureEvent( |
| content::WebContents* source, |
| const blink::WebGestureEvent& event) OVERRIDE; |
| @@ -279,10 +291,6 @@ 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 |
| @@ -303,32 +311,10 @@ class CONTENT_EXPORT BrowserPluginGuest |
| 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( |
| @@ -489,16 +475,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. |
| @@ -522,10 +498,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_; |