| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/extensions/chrome_extensions_browser_client.h" | 5 #include "chrome/browser/extensions/chrome_extensions_browser_client.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 #include "chrome/browser/extensions/chrome_url_request_util.h" | 29 #include "chrome/browser/extensions/chrome_url_request_util.h" |
| 30 #include "chrome/browser/extensions/error_console/error_console.h" | 30 #include "chrome/browser/extensions/error_console/error_console.h" |
| 31 #include "chrome/browser/extensions/event_router_forwarder.h" | 31 #include "chrome/browser/extensions/event_router_forwarder.h" |
| 32 #include "chrome/browser/extensions/extension_system_factory.h" | 32 #include "chrome/browser/extensions/extension_system_factory.h" |
| 33 #include "chrome/browser/extensions/extension_util.h" | 33 #include "chrome/browser/extensions/extension_util.h" |
| 34 #include "chrome/browser/extensions/menu_manager.h" | 34 #include "chrome/browser/extensions/menu_manager.h" |
| 35 #include "chrome/browser/extensions/updater/chrome_update_client_config.h" | 35 #include "chrome/browser/extensions/updater/chrome_update_client_config.h" |
| 36 #include "chrome/browser/external_protocol/external_protocol_handler.h" | 36 #include "chrome/browser/external_protocol/external_protocol_handler.h" |
| 37 #include "chrome/browser/profiles/profile.h" | 37 #include "chrome/browser/profiles/profile.h" |
| 38 #include "chrome/browser/profiles/profile_manager.h" | 38 #include "chrome/browser/profiles/profile_manager.h" |
| 39 #include "chrome/browser/renderer_host/chrome_navigation_ui_data.h" |
| 39 #include "chrome/browser/sessions/session_tab_helper.h" | 40 #include "chrome/browser/sessions/session_tab_helper.h" |
| 40 #include "chrome/browser/task_manager/web_contents_tags.h" | 41 #include "chrome/browser/task_manager/web_contents_tags.h" |
| 41 #include "chrome/browser/ui/bluetooth/chrome_extension_bluetooth_chooser.h" | 42 #include "chrome/browser/ui/bluetooth/chrome_extension_bluetooth_chooser.h" |
| 42 #include "chrome/common/channel_info.h" | 43 #include "chrome/common/channel_info.h" |
| 43 #include "chrome/common/chrome_paths.h" | 44 #include "chrome/common/chrome_paths.h" |
| 44 #include "chrome/common/chrome_switches.h" | 45 #include "chrome/common/chrome_switches.h" |
| 45 #include "chrome/common/pref_names.h" | 46 #include "chrome/common/pref_names.h" |
| 46 #include "components/net_log/chrome_net_log.h" | 47 #include "components/net_log/chrome_net_log.h" |
| 47 #include "components/update_client/update_client.h" | 48 #include "components/update_client/update_client.h" |
| 48 #include "components/version_info/version_info.h" | 49 #include "components/version_info/version_info.h" |
| 49 #include "content/public/browser/render_process_host.h" | 50 #include "content/public/browser/render_process_host.h" |
| 51 #include "content/public/browser/resource_request_info.h" |
| 50 #include "content/public/common/content_switches.h" | 52 #include "content/public/common/content_switches.h" |
| 51 #include "extensions/browser/api/generated_api_registration.h" | 53 #include "extensions/browser/api/generated_api_registration.h" |
| 52 #include "extensions/browser/extension_function_registry.h" | 54 #include "extensions/browser/extension_function_registry.h" |
| 53 #include "extensions/browser/extension_prefs.h" | 55 #include "extensions/browser/extension_prefs.h" |
| 54 #include "extensions/browser/mojo/service_registration.h" | 56 #include "extensions/browser/mojo/service_registration.h" |
| 55 #include "extensions/browser/pref_names.h" | 57 #include "extensions/browser/pref_names.h" |
| 56 #include "extensions/browser/url_request_util.h" | 58 #include "extensions/browser/url_request_util.h" |
| 57 #include "extensions/common/features/feature_channel.h" | 59 #include "extensions/common/features/feature_channel.h" |
| 58 | 60 |
| 59 #if defined(OS_CHROMEOS) | 61 #if defined(OS_CHROMEOS) |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 return base::MakeUnique<ChromeExtensionBluetoothChooser>(frame, | 413 return base::MakeUnique<ChromeExtensionBluetoothChooser>(frame, |
| 412 event_handler); | 414 event_handler); |
| 413 } | 415 } |
| 414 | 416 |
| 415 bool ChromeExtensionsBrowserClient::IsActivityLoggingEnabled( | 417 bool ChromeExtensionsBrowserClient::IsActivityLoggingEnabled( |
| 416 content::BrowserContext* context) { | 418 content::BrowserContext* context) { |
| 417 ActivityLog* activity_log = ActivityLog::GetInstance(context); | 419 ActivityLog* activity_log = ActivityLog::GetInstance(context); |
| 418 return activity_log && activity_log->is_active(); | 420 return activity_log && activity_log->is_active(); |
| 419 } | 421 } |
| 420 | 422 |
| 423 ExtensionNavigationUIData* |
| 424 ChromeExtensionsBrowserClient::GetExtensionNavigationUIData( |
| 425 net::URLRequest* request) { |
| 426 const content::ResourceRequestInfo* info = |
| 427 content::ResourceRequestInfo::ForRequest(request); |
| 428 if (!info) |
| 429 return nullptr; |
| 430 ChromeNavigationUIData* navigation_data = |
| 431 static_cast<ChromeNavigationUIData*>(info->GetNavigationUIData()); |
| 432 if (!navigation_data) |
| 433 return nullptr; |
| 434 return navigation_data->GetExtensionNavigationUIData(); |
| 435 } |
| 436 |
| 421 KioskDelegate* ChromeExtensionsBrowserClient::GetKioskDelegate() { | 437 KioskDelegate* ChromeExtensionsBrowserClient::GetKioskDelegate() { |
| 422 if (!kiosk_delegate_) | 438 if (!kiosk_delegate_) |
| 423 kiosk_delegate_.reset(new ChromeKioskDelegate()); | 439 kiosk_delegate_.reset(new ChromeKioskDelegate()); |
| 424 return kiosk_delegate_.get(); | 440 return kiosk_delegate_.get(); |
| 425 } | 441 } |
| 426 | 442 |
| 427 } // namespace extensions | 443 } // namespace extensions |
| OLD | NEW |