Remove WebViewGuestDelegate::HandleKeyboardEvent
This commit is contained in:
		
					parent
					
						
							
								d6cb84f8a3
							
						
					
				
			
			
				commit
				
					
						dc9b3fcef7
					
				
			
		
					 3 changed files with 2 additions and 17 deletions
				
			
		|  | @ -399,9 +399,9 @@ void WebContents::HandleKeyboardEvent( | ||||||
|     ExitFullscreenModeForTab(source); |     ExitFullscreenModeForTab(source); | ||||||
|   } else if (type_ == BROWSER_WINDOW && owner_window()) { |   } else if (type_ == BROWSER_WINDOW && owner_window()) { | ||||||
|     owner_window()->HandleKeyboardEvent(source, event); |     owner_window()->HandleKeyboardEvent(source, event); | ||||||
|   } else if (type_ == WEB_VIEW && guest_delegate_) { |   } else if (type_ == WEB_VIEW && embedder_) { | ||||||
|     // Send the unhandled keyboard events back to the embedder.
 |     // Send the unhandled keyboard events back to the embedder.
 | ||||||
|     guest_delegate_->HandleKeyboardEvent(source, event); |     embedder_->HandleKeyboardEvent(source, event); | ||||||
|   } |   } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -95,13 +95,6 @@ void WebViewGuestDelegate::SetSize(const SetSizeParams& params) { | ||||||
|   auto_size_enabled_ = enable_auto_size; |   auto_size_enabled_ = enable_auto_size; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void WebViewGuestDelegate::HandleKeyboardEvent( |  | ||||||
|     content::WebContents* source, |  | ||||||
|     const content::NativeWebKeyboardEvent& event) { |  | ||||||
|   if (embedder_web_contents_) |  | ||||||
|     embedder_web_contents_->GetDelegate()->HandleKeyboardEvent(source, event); |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| void WebViewGuestDelegate::DidCommitProvisionalLoadForFrame( | void WebViewGuestDelegate::DidCommitProvisionalLoadForFrame( | ||||||
|     content::RenderFrameHost* render_frame_host, |     content::RenderFrameHost* render_frame_host, | ||||||
|     const GURL& url, ui::PageTransition transition_type) { |     const GURL& url, ui::PageTransition transition_type) { | ||||||
|  |  | ||||||
|  | @ -8,10 +8,6 @@ | ||||||
| #include "content/public/browser/browser_plugin_guest_delegate.h" | #include "content/public/browser/browser_plugin_guest_delegate.h" | ||||||
| #include "content/public/browser/web_contents_observer.h" | #include "content/public/browser/web_contents_observer.h" | ||||||
| 
 | 
 | ||||||
| namespace content { |  | ||||||
| struct NativeWebKeyboardEvent; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| namespace atom { | namespace atom { | ||||||
| 
 | 
 | ||||||
| namespace api { | namespace api { | ||||||
|  | @ -49,10 +45,6 @@ class WebViewGuestDelegate : public content::BrowserPluginGuestDelegate, | ||||||
|   // and normal sizes.
 |   // and normal sizes.
 | ||||||
|   void SetSize(const SetSizeParams& params); |   void SetSize(const SetSizeParams& params); | ||||||
| 
 | 
 | ||||||
|   // Transfer the keyboard event to embedder.
 |  | ||||||
|   void HandleKeyboardEvent(content::WebContents* source, |  | ||||||
|                            const content::NativeWebKeyboardEvent& event); |  | ||||||
| 
 |  | ||||||
|  protected: |  protected: | ||||||
|   // content::WebContentsObserver:
 |   // content::WebContentsObserver:
 | ||||||
|   void DidCommitProvisionalLoadForFrame( |   void DidCommitProvisionalLoadForFrame( | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Cheng Zhao
				Cheng Zhao