OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/chrome_content_browser_client.h" | 5 #include "chrome/browser/chrome_content_browser_client.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 30 matching lines...) Expand all Loading... |
41 #include "chrome/browser/extensions/extension_system.h" | 41 #include "chrome/browser/extensions/extension_system.h" |
42 #include "chrome/browser/extensions/extension_web_ui.h" | 42 #include "chrome/browser/extensions/extension_web_ui.h" |
43 #include "chrome/browser/extensions/extension_webkit_preferences.h" | 43 #include "chrome/browser/extensions/extension_webkit_preferences.h" |
44 #include "chrome/browser/extensions/suggest_permission_util.h" | 44 #include "chrome/browser/extensions/suggest_permission_util.h" |
45 #include "chrome/browser/geolocation/chrome_access_token_store.h" | 45 #include "chrome/browser/geolocation/chrome_access_token_store.h" |
46 #include "chrome/browser/google/google_util.h" | 46 #include "chrome/browser/google/google_util.h" |
47 #include "chrome/browser/guestview/adview/adview_guest.h" | 47 #include "chrome/browser/guestview/adview/adview_guest.h" |
48 #include "chrome/browser/guestview/guestview_constants.h" | 48 #include "chrome/browser/guestview/guestview_constants.h" |
49 #include "chrome/browser/guestview/webview/webview_guest.h" | 49 #include "chrome/browser/guestview/webview/webview_guest.h" |
50 #include "chrome/browser/media/media_capture_devices_dispatcher.h" | 50 #include "chrome/browser/media/media_capture_devices_dispatcher.h" |
| 51 #include "chrome/browser/media/media_device_id_salt.h" |
51 #include "chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h" | 52 #include "chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h" |
52 #include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h" | 53 #include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h" |
53 #include "chrome/browser/nacl_host/nacl_host_message_filter.h" | 54 #include "chrome/browser/nacl_host/nacl_host_message_filter.h" |
54 #include "chrome/browser/nacl_host/nacl_process_host.h" | 55 #include "chrome/browser/nacl_host/nacl_process_host.h" |
55 #include "chrome/browser/net/chrome_net_log.h" | 56 #include "chrome/browser/net/chrome_net_log.h" |
56 #include "chrome/browser/notifications/desktop_notification_service.h" | 57 #include "chrome/browser/notifications/desktop_notification_service.h" |
57 #include "chrome/browser/notifications/desktop_notification_service_factory.h" | 58 #include "chrome/browser/notifications/desktop_notification_service_factory.h" |
58 #include "chrome/browser/platform_util.h" | 59 #include "chrome/browser/platform_util.h" |
59 #include "chrome/browser/plugins/plugin_info_message_filter.h" | 60 #include "chrome/browser/plugins/plugin_info_message_filter.h" |
60 #include "chrome/browser/prerender/prerender_final_status.h" | 61 #include "chrome/browser/prerender/prerender_final_status.h" |
(...skipping 2316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2377 } | 2378 } |
2378 | 2379 |
2379 base::FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() { | 2380 base::FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() { |
2380 return DownloadPrefs::GetDefaultDownloadDirectory(); | 2381 return DownloadPrefs::GetDefaultDownloadDirectory(); |
2381 } | 2382 } |
2382 | 2383 |
2383 std::string ChromeContentBrowserClient::GetDefaultDownloadName() { | 2384 std::string ChromeContentBrowserClient::GetDefaultDownloadName() { |
2384 return l10n_util::GetStringUTF8(IDS_DEFAULT_DOWNLOAD_FILENAME); | 2385 return l10n_util::GetStringUTF8(IDS_DEFAULT_DOWNLOAD_FILENAME); |
2385 } | 2386 } |
2386 | 2387 |
| 2388 std::string ChromeContentBrowserClient::GetMediaDeviceIDSalt( |
| 2389 content::ResourceContext* rc) { |
| 2390 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 2391 ProfileIOData* io_data = ProfileIOData::FromResourceContext(rc); |
| 2392 return io_data->GetMediaDeviceIDSalt(); |
| 2393 } |
| 2394 |
2387 void ChromeContentBrowserClient::DidCreatePpapiPlugin( | 2395 void ChromeContentBrowserClient::DidCreatePpapiPlugin( |
2388 content::BrowserPpapiHost* browser_host) { | 2396 content::BrowserPpapiHost* browser_host) { |
2389 #if defined(ENABLE_PLUGINS) | 2397 #if defined(ENABLE_PLUGINS) |
2390 browser_host->GetPpapiHost()->AddHostFactoryFilter( | 2398 browser_host->GetPpapiHost()->AddHostFactoryFilter( |
2391 scoped_ptr<ppapi::host::HostFactory>( | 2399 scoped_ptr<ppapi::host::HostFactory>( |
2392 new ChromeBrowserPepperHostFactory(browser_host))); | 2400 new ChromeBrowserPepperHostFactory(browser_host))); |
2393 #endif | 2401 #endif |
2394 } | 2402 } |
2395 | 2403 |
2396 content::BrowserPpapiHost* | 2404 content::BrowserPpapiHost* |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2642 return IsExtensionOrSharedModuleWhitelisted(url, extension_set, | 2650 return IsExtensionOrSharedModuleWhitelisted(url, extension_set, |
2643 allowed_file_handle_origins_) || | 2651 allowed_file_handle_origins_) || |
2644 IsHostAllowedByCommandLine(url, extension_set, | 2652 IsHostAllowedByCommandLine(url, extension_set, |
2645 switches::kAllowNaClFileHandleAPI); | 2653 switches::kAllowNaClFileHandleAPI); |
2646 #else | 2654 #else |
2647 return false; | 2655 return false; |
2648 #endif | 2656 #endif |
2649 } | 2657 } |
2650 | 2658 |
2651 } // namespace chrome | 2659 } // namespace chrome |
OLD | NEW |