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

Unified Diff: extensions/browser/guest_view/extension_options/extension_options_guest.cc

Issue 2668773003: Convert ExtensionOptionsGuest to use the new navigation callbacks. (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « extensions/browser/guest_view/extension_options/extension_options_guest.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/guest_view/extension_options/extension_options_guest.cc
diff --git a/extensions/browser/guest_view/extension_options/extension_options_guest.cc b/extensions/browser/guest_view/extension_options/extension_options_guest.cc
index 12dd8f3cfbb6634d00defaa76a7032baa4f5c1b0..ea2c5cddf465f7af224b8824afc4e08d002ab7f2 100644
--- a/extensions/browser/guest_view/extension_options/extension_options_guest.cc
+++ b/extensions/browser/guest_view/extension_options/extension_options_guest.cc
@@ -11,7 +11,7 @@
#include "components/crx_file/id_util.h"
#include "components/guest_view/browser/guest_view_event.h"
#include "components/guest_view/browser/guest_view_manager.h"
-#include "content/public/browser/navigation_details.h"
+#include "content/public/browser/navigation_handle.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/site_instance.h"
#include "content/public/browser/web_contents.h"
@@ -220,9 +220,11 @@ bool ExtensionOptionsGuest::ShouldCreateWebContents(
return false;
}
-void ExtensionOptionsGuest::DidNavigateMainFrame(
- const content::LoadCommittedDetails& details,
- const content::FrameNavigateParams& params) {
+void ExtensionOptionsGuest::DidFinishNavigation(
+ content::NavigationHandle* navigation_handle) {
+ if (!navigation_handle->IsInMainFrame() || !navigation_handle->HasCommitted())
+ return;
+
if (attached()) {
Devlin 2017/02/01 16:11:06 nit: maybe combine this with the if above? if (!na
jam 2017/02/01 16:22:09 Done.
auto* guest_zoom_controller =
zoom::ZoomController::FromWebContents(web_contents());
@@ -230,7 +232,7 @@ void ExtensionOptionsGuest::DidNavigateMainFrame(
zoom::ZoomController::ZOOM_MODE_ISOLATED);
SetGuestZoomLevelToMatchEmbedder();
- if (!url::IsSameOriginWith(params.url, options_page_)) {
+ if (!url::IsSameOriginWith(navigation_handle->GetURL(), options_page_)) {
bad_message::ReceivedBadMessage(web_contents()->GetRenderProcessHost(),
bad_message::EOG_BAD_ORIGIN);
}
« no previous file with comments | « extensions/browser/guest_view/extension_options/extension_options_guest.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698