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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 #include "chrome/browser/tab_contents/tab_util.h" | 68 #include "chrome/browser/tab_contents/tab_util.h" |
69 #include "chrome/browser/toolkit_extra_parts.h" | 69 #include "chrome/browser/toolkit_extra_parts.h" |
70 #include "chrome/browser/ui/tab_contents/chrome_web_contents_view_delegate.h" | 70 #include "chrome/browser/ui/tab_contents/chrome_web_contents_view_delegate.h" |
71 #include "chrome/browser/ui/tab_contents/tab_contents.h" | 71 #include "chrome/browser/ui/tab_contents/tab_contents.h" |
72 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" | 72 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" |
73 #include "chrome/browser/user_style_sheet_watcher.h" | 73 #include "chrome/browser/user_style_sheet_watcher.h" |
74 #include "chrome/browser/user_style_sheet_watcher_factory.h" | 74 #include "chrome/browser/user_style_sheet_watcher_factory.h" |
75 #include "chrome/browser/view_type_utils.h" | 75 #include "chrome/browser/view_type_utils.h" |
76 #include "chrome/common/child_process_logging.h" | 76 #include "chrome/common/child_process_logging.h" |
77 #include "chrome/common/chrome_constants.h" | 77 #include "chrome/common/chrome_constants.h" |
| 78 #include "chrome/common/chrome_paths.h" |
78 #include "chrome/common/chrome_switches.h" | 79 #include "chrome/common/chrome_switches.h" |
79 #include "chrome/common/extensions/extension.h" | 80 #include "chrome/common/extensions/extension.h" |
80 #include "chrome/common/extensions/extension_process_policy.h" | 81 #include "chrome/common/extensions/extension_process_policy.h" |
81 #include "chrome/common/extensions/extension_set.h" | 82 #include "chrome/common/extensions/extension_set.h" |
82 #include "chrome/common/logging_chrome.h" | 83 #include "chrome/common/logging_chrome.h" |
83 #include "chrome/common/pref_names.h" | 84 #include "chrome/common/pref_names.h" |
84 #include "chrome/common/render_messages.h" | 85 #include "chrome/common/render_messages.h" |
85 #include "chrome/common/url_constants.h" | 86 #include "chrome/common/url_constants.h" |
86 #include "content/public/browser/browser_child_process_host.h" | 87 #include "content/public/browser/browser_child_process_host.h" |
87 #include "content/public/browser/browser_main_parts.h" | 88 #include "content/public/browser/browser_main_parts.h" |
(...skipping 1650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1738 return true; | 1739 return true; |
1739 | 1740 |
1740 return false; | 1741 return false; |
1741 } | 1742 } |
1742 | 1743 |
1743 bool ChromeContentBrowserClient::AllowPepperPrivateFileAPI() { | 1744 bool ChromeContentBrowserClient::AllowPepperPrivateFileAPI() { |
1744 return CommandLine::ForCurrentProcess()->HasSwitch( | 1745 return CommandLine::ForCurrentProcess()->HasSwitch( |
1745 switches::kPpapiFlashInProcess); | 1746 switches::kPpapiFlashInProcess); |
1746 } | 1747 } |
1747 | 1748 |
| 1749 FilePath ChromeContentBrowserClient::GetHyphenDictionaryDirectory() { |
| 1750 FilePath directory; |
| 1751 PathService::Get(chrome::DIR_APP_DICTIONARIES, &directory); |
| 1752 return directory.Append(FILE_PATH_LITERAL("Hyphen")); |
| 1753 } |
| 1754 |
1748 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 1755 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
1749 void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess( | 1756 void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess( |
1750 const CommandLine& command_line, | 1757 const CommandLine& command_line, |
1751 std::vector<FileDescriptorInfo>* mappings) { | 1758 std::vector<FileDescriptorInfo>* mappings) { |
1752 int crash_signal_fd = GetCrashSignalFD(command_line); | 1759 int crash_signal_fd = GetCrashSignalFD(command_line); |
1753 if (crash_signal_fd >= 0) { | 1760 if (crash_signal_fd >= 0) { |
1754 mappings->push_back(FileDescriptorInfo(kCrashDumpSignal, | 1761 mappings->push_back(FileDescriptorInfo(kCrashDumpSignal, |
1755 FileDescriptor(crash_signal_fd, | 1762 FileDescriptor(crash_signal_fd, |
1756 false))); | 1763 false))); |
1757 } | 1764 } |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1839 partition_id = extension->id(); | 1846 partition_id = extension->id(); |
1840 } | 1847 } |
1841 | 1848 |
1842 // Enforce that IsValidStoragePartitionId() implementation stays in sync. | 1849 // Enforce that IsValidStoragePartitionId() implementation stays in sync. |
1843 DCHECK(IsValidStoragePartitionId(browser_context, partition_id)); | 1850 DCHECK(IsValidStoragePartitionId(browser_context, partition_id)); |
1844 return partition_id; | 1851 return partition_id; |
1845 } | 1852 } |
1846 | 1853 |
1847 | 1854 |
1848 } // namespace chrome | 1855 } // namespace chrome |
OLD | NEW |