Skip to content

Commit

Permalink
Remove BrowserPluginGuestDelegate::GuestProcessGone
Browse files Browse the repository at this point in the history
BUG=364141, 330264

Review URL: https://codereview.chromium.org/297183010

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273105 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
fsamuel@chromium.org committed May 28, 2014
1 parent e98c941 commit 2a83505
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 22 deletions.
23 changes: 11 additions & 12 deletions chrome/browser/guest_view/web_view/web_view_guest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

#include "chrome/browser/guest_view/web_view/web_view_guest.h"

#include "base/debug/stack_trace.h"
#include "base/message_loop/message_loop.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
Expand Down Expand Up @@ -430,17 +429,6 @@ void WebViewGuest::FindReply(WebContents* source,
active_match_ordinal, final_update);
}

void WebViewGuest::GuestProcessGone(base::TerminationStatus status) {
// Cancel all find sessions in progress.
find_helper_.CancelAllFindSessions();

scoped_ptr<base::DictionaryValue> args(new base::DictionaryValue());
args->SetInteger(webview::kProcessId,
guest_web_contents()->GetRenderProcessHost()->GetID());
args->SetString(webview::kReason, TerminationStatusToString(status));
DispatchEvent(new GuestViewBase::Event(webview::kEventExit, args.Pass()));
}

void WebViewGuest::HandleKeyboardEvent(
WebContents* source,
const content::NativeWebKeyboardEvent& event) {
Expand Down Expand Up @@ -876,6 +864,17 @@ bool WebViewGuest::OnMessageReceived(const IPC::Message& message,
return handled;
}

void WebViewGuest::RenderProcessGone(base::TerminationStatus status) {
// Cancel all find sessions in progress.
find_helper_.CancelAllFindSessions();

scoped_ptr<base::DictionaryValue> args(new base::DictionaryValue());
args->SetInteger(webview::kProcessId,
guest_web_contents()->GetRenderProcessHost()->GetID());
args->SetString(webview::kReason, TerminationStatusToString(status));
DispatchEvent(new GuestViewBase::Event(webview::kEventExit, args.Pass()));
}

void WebViewGuest::WebContentsDestroyed() {
// Clean up custom context menu items for this guest.
extensions::MenuManager* menu_manager = extensions::MenuManager::Get(
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/guest_view/web_view/web_view_guest.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ class WebViewGuest : public GuestView<WebViewGuest>,
// GuestDelegate implementation.
virtual void DidAttach() OVERRIDE;
virtual void EmbedderDestroyed() OVERRIDE;
virtual void GuestProcessGone(base::TerminationStatus status) OVERRIDE;
virtual bool IsDragAndDropEnabled() OVERRIDE;
virtual void SizeChanged(const gfx::Size& old_size, const gfx::Size& new_size)
OVERRIDE;
Expand Down Expand Up @@ -305,6 +304,7 @@ class WebViewGuest : public GuestView<WebViewGuest>,
virtual bool OnMessageReceived(
const IPC::Message& message,
content::RenderFrameHost* render_frame_host) OVERRIDE;
virtual void RenderProcessGone(base::TerminationStatus status) OVERRIDE;
virtual void WebContentsDestroyed() OVERRIDE;
virtual void UserAgentOverrideSet(const std::string& user_agent) OVERRIDE;
virtual void RenderViewReady() OVERRIDE;
Expand Down
2 changes: 0 additions & 2 deletions content/browser/browser_plugin/browser_plugin_guest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -482,8 +482,6 @@ void BrowserPluginGuest::RenderProcessGone(base::TerminationStatus status) {
default:
break;
}
if (delegate_)
delegate_->GuestProcessGone(status);
}

// static
Expand Down
7 changes: 0 additions & 7 deletions content/public/browser/browser_plugin_guest_delegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,6 @@ class CONTENT_EXPORT BrowserPluginGuestDelegate {
// Notification that the embedder has completed attachment.
virtual void DidAttach() {}

// Informs the delegate that the guest render process is gone. |status|
// indicates whether the guest was killed, crashed, or was terminated
// gracefully.
// TODO(fsamuel): Delete this once BrowserPluginGuest is no longer a
// WebContentsDelegate.
virtual void GuestProcessGone(base::TerminationStatus status) {}

// Informs the delegate that the embedder has been destroyed.
virtual void EmbedderDestroyed() {}

Expand Down

0 comments on commit 2a83505

Please sign in to comment.