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

Unified Diff: chrome/browser/guest_view/guest_view_base.cc

Issue 295083002: BrowserPluginGuest is no longer a WebContentsDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@make_context_menu_easier_to_refactor
Patch Set: Fixed content_browsertests 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: chrome/browser/guest_view/guest_view_base.cc
diff --git a/chrome/browser/guest_view/guest_view_base.cc b/chrome/browser/guest_view/guest_view_base.cc
index 274270f43878f02f87e232234139f9c3594e638c..d9ee2301297f6b8412e027537125d2ae2fa02cf2 100644
--- a/chrome/browser/guest_view/guest_view_base.cc
+++ b/chrome/browser/guest_view/guest_view_base.cc
@@ -51,6 +51,7 @@ GuestViewBase::GuestViewBase(int guest_instance_id,
guest_instance_id_(guest_instance_id),
view_instance_id_(guestview::kInstanceIDNone),
weak_ptr_factory_(this) {
+ guest_web_contents->SetDelegate(this);
webcontents_guestview_map.Get().insert(
std::make_pair(guest_web_contents, this));
GuestViewManager::FromBrowserContext(browser_context_)->
@@ -190,6 +191,11 @@ void GuestViewBase::RegisterDestructionCallback(
destruction_callback_ = callback;
}
+bool GuestViewBase::ShouldFocusPageAfterCrash() {
+ // Focus is managed elsewhere.
+ return false;
+}
+
bool GuestViewBase::PreHandleGestureEvent(content::WebContents* source,
const blink::WebGestureEvent& event) {
return event.type == blink::WebGestureEvent::GesturePinchBegin ||

Powered by Google App Engine
This is Rietveld 408576698