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

Unified Diff: extensions/shell/browser/shell_extensions_browser_client.cc

Issue 2465253010: Add WebView PlzNavigate related fixes to extensions_browsertests harness. (Closed)
Patch Set: Created 4 years, 1 month 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: extensions/shell/browser/shell_extensions_browser_client.cc
diff --git a/extensions/shell/browser/shell_extensions_browser_client.cc b/extensions/shell/browser/shell_extensions_browser_client.cc
index e832a947ba26edd863b9b0c34c917b365a41a977..36fa3e3e48acb6998d9fb7f22fbdbe8869fe50c9 100644
--- a/extensions/shell/browser/shell_extensions_browser_client.cc
+++ b/extensions/shell/browser/shell_extensions_browser_client.cc
@@ -11,6 +11,7 @@
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/render_frame_host.h"
+#include "content/public/browser/resource_request_info.h"
#include "extensions/browser/api/extensions_api_client.h"
#include "extensions/browser/api/generated_api_registration.h"
#include "extensions/browser/event_router.h"
@@ -25,6 +26,7 @@
#include "extensions/shell/browser/shell_extension_system_factory.h"
#include "extensions/shell/browser/shell_extension_web_contents_observer.h"
#include "extensions/shell/browser/shell_extensions_api_client.h"
+#include "extensions/shell/browser/shell_navigation_ui_data.h"
#include "extensions/shell/browser/shell_runtime_api_delegate.h"
#if defined(OS_CHROMEOS)
@@ -245,6 +247,20 @@ ShellExtensionsBrowserClient::GetExtensionWebContentsObserver(
return ShellExtensionWebContentsObserver::FromWebContents(web_contents);
}
+ExtensionNavigationUIData*
+ShellExtensionsBrowserClient::GetExtensionNavigationUIData(
+ net::URLRequest* request) {
+ const content::ResourceRequestInfo* info =
+ content::ResourceRequestInfo::ForRequest(request);
+ if (!info)
+ return nullptr;
+ ShellNavigationUIData* navigation_data =
+ static_cast<ShellNavigationUIData*>(info->GetNavigationUIData());
+ if (!navigation_data)
+ return nullptr;
+ return navigation_data->GetExtensionNavigationUIData();
+}
+
KioskDelegate* ShellExtensionsBrowserClient::GetKioskDelegate() {
if (!kiosk_delegate_)
kiosk_delegate_.reset(new ShellKioskDelegate());
« no previous file with comments | « extensions/shell/browser/shell_extensions_browser_client.h ('k') | extensions/shell/browser/shell_navigation_ui_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698