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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "extensions/shell/browser/shell_extensions_browser_client.h" 5 #include "extensions/shell/browser/shell_extensions_browser_client.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
11 #include "content/public/browser/browser_context.h" 11 #include "content/public/browser/browser_context.h"
12 #include "content/public/browser/browser_thread.h" 12 #include "content/public/browser/browser_thread.h"
13 #include "content/public/browser/render_frame_host.h" 13 #include "content/public/browser/render_frame_host.h"
14 #include "content/public/browser/resource_request_info.h"
14 #include "extensions/browser/api/extensions_api_client.h" 15 #include "extensions/browser/api/extensions_api_client.h"
15 #include "extensions/browser/api/generated_api_registration.h" 16 #include "extensions/browser/api/generated_api_registration.h"
16 #include "extensions/browser/event_router.h" 17 #include "extensions/browser/event_router.h"
17 #include "extensions/browser/extension_function_registry.h" 18 #include "extensions/browser/extension_function_registry.h"
18 #include "extensions/browser/mojo/service_registration.h" 19 #include "extensions/browser/mojo/service_registration.h"
19 #include "extensions/browser/null_app_sorting.h" 20 #include "extensions/browser/null_app_sorting.h"
20 #include "extensions/browser/updater/null_extension_cache.h" 21 #include "extensions/browser/updater/null_extension_cache.h"
21 #include "extensions/browser/url_request_util.h" 22 #include "extensions/browser/url_request_util.h"
22 #include "extensions/shell/browser/api/generated_api_registration.h" 23 #include "extensions/shell/browser/api/generated_api_registration.h"
23 #include "extensions/shell/browser/delegates/shell_kiosk_delegate.h" 24 #include "extensions/shell/browser/delegates/shell_kiosk_delegate.h"
24 #include "extensions/shell/browser/shell_extension_host_delegate.h" 25 #include "extensions/shell/browser/shell_extension_host_delegate.h"
25 #include "extensions/shell/browser/shell_extension_system_factory.h" 26 #include "extensions/shell/browser/shell_extension_system_factory.h"
26 #include "extensions/shell/browser/shell_extension_web_contents_observer.h" 27 #include "extensions/shell/browser/shell_extension_web_contents_observer.h"
27 #include "extensions/shell/browser/shell_extensions_api_client.h" 28 #include "extensions/shell/browser/shell_extensions_api_client.h"
29 #include "extensions/shell/browser/shell_navigation_ui_data.h"
28 #include "extensions/shell/browser/shell_runtime_api_delegate.h" 30 #include "extensions/shell/browser/shell_runtime_api_delegate.h"
29 31
30 #if defined(OS_CHROMEOS) 32 #if defined(OS_CHROMEOS)
31 #include "chromeos/login/login_state.h" 33 #include "chromeos/login/login_state.h"
32 #endif 34 #endif
33 35
34 using content::BrowserContext; 36 using content::BrowserContext;
35 using content::BrowserThread; 37 using content::BrowserThread;
36 38
37 namespace extensions { 39 namespace extensions {
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 ExtensionsAPIClient* api_client) { 240 ExtensionsAPIClient* api_client) {
239 api_client_.reset(api_client); 241 api_client_.reset(api_client);
240 } 242 }
241 243
242 ExtensionWebContentsObserver* 244 ExtensionWebContentsObserver*
243 ShellExtensionsBrowserClient::GetExtensionWebContentsObserver( 245 ShellExtensionsBrowserClient::GetExtensionWebContentsObserver(
244 content::WebContents* web_contents) { 246 content::WebContents* web_contents) {
245 return ShellExtensionWebContentsObserver::FromWebContents(web_contents); 247 return ShellExtensionWebContentsObserver::FromWebContents(web_contents);
246 } 248 }
247 249
250 ExtensionNavigationUIData*
251 ShellExtensionsBrowserClient::GetExtensionNavigationUIData(
252 net::URLRequest* request) {
253 const content::ResourceRequestInfo* info =
254 content::ResourceRequestInfo::ForRequest(request);
255 if (!info)
256 return nullptr;
257 ShellNavigationUIData* navigation_data =
258 static_cast<ShellNavigationUIData*>(info->GetNavigationUIData());
259 if (!navigation_data)
260 return nullptr;
261 return navigation_data->GetExtensionNavigationUIData();
262 }
263
248 KioskDelegate* ShellExtensionsBrowserClient::GetKioskDelegate() { 264 KioskDelegate* ShellExtensionsBrowserClient::GetKioskDelegate() {
249 if (!kiosk_delegate_) 265 if (!kiosk_delegate_)
250 kiosk_delegate_.reset(new ShellKioskDelegate()); 266 kiosk_delegate_.reset(new ShellKioskDelegate());
251 return kiosk_delegate_.get(); 267 return kiosk_delegate_.get();
252 } 268 }
253 269
254 } // namespace extensions 270 } // namespace extensions
OLDNEW
« 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