Skip to content

Commit

Permalink
Remove WebViewGuestDelegate::HandleKeyboardEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
zcbenz committed May 18, 2016
1 parent d6cb84f commit dc9b3fc
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 17 deletions.
4 changes: 2 additions & 2 deletions atom/browser/api/atom_api_web_contents.cc
Original file line number Diff line number Diff line change
Expand Up @@ -399,9 +399,9 @@ void WebContents::HandleKeyboardEvent(
ExitFullscreenModeForTab(source);
} else if (type_ == BROWSER_WINDOW && owner_window()) {
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.
guest_delegate_->HandleKeyboardEvent(source, event);
embedder_->HandleKeyboardEvent(source, event);
}
}

Expand Down
7 changes: 0 additions & 7 deletions atom/browser/web_view_guest_delegate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,6 @@ void WebViewGuestDelegate::SetSize(const SetSizeParams& params) {
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(
content::RenderFrameHost* render_frame_host,
const GURL& url, ui::PageTransition transition_type) {
Expand Down
8 changes: 0 additions & 8 deletions atom/browser/web_view_guest_delegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
#include "content/public/browser/browser_plugin_guest_delegate.h"
#include "content/public/browser/web_contents_observer.h"

namespace content {
struct NativeWebKeyboardEvent;
}

namespace atom {

namespace api {
Expand Down Expand Up @@ -49,10 +45,6 @@ class WebViewGuestDelegate : public content::BrowserPluginGuestDelegate,
// and normal sizes.
void SetSize(const SetSizeParams& params);

// Transfer the keyboard event to embedder.
void HandleKeyboardEvent(content::WebContents* source,
const content::NativeWebKeyboardEvent& event);

protected:
// content::WebContentsObserver:
void DidCommitProvisionalLoadForFrame(
Expand Down

0 comments on commit dc9b3fc

Please sign in to comment.