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 "content/shell/shell_browser_context.h" | 5 #include "content/shell/shell_browser_context.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/environment.h" | 8 #include "base/environment.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/path_service.h" | 11 #include "base/path_service.h" |
12 #include "base/threading/thread.h" | 12 #include "base/threading/thread.h" |
13 #include "content/browser/download/download_manager_impl.h" | 13 #include "content/browser/download/download_manager_impl.h" |
14 #include "content/public/browser/browser_thread.h" | 14 #include "content/public/browser/browser_thread.h" |
15 #include "content/public/browser/geolocation_permission_context.h" | 15 #include "content/public/browser/geolocation_permission_context.h" |
16 #include "content/public/browser/speech_input_preferences.h" | 16 #include "content/public/browser/speech_recognition_preferences.h" |
17 #include "content/shell/shell_browser_main.h" | 17 #include "content/shell/shell_browser_main.h" |
18 #include "content/shell/shell_download_manager_delegate.h" | 18 #include "content/shell/shell_download_manager_delegate.h" |
19 #include "content/shell/shell_resource_context.h" | 19 #include "content/shell/shell_resource_context.h" |
20 #include "content/shell/shell_url_request_context_getter.h" | 20 #include "content/shell/shell_url_request_context_getter.h" |
21 | 21 |
22 #if defined(OS_WIN) | 22 #if defined(OS_WIN) |
23 #include "base/base_paths_win.h" | 23 #include "base/base_paths_win.h" |
24 #elif defined(OS_LINUX) | 24 #elif defined(OS_LINUX) |
25 #include "base/nix/xdg_util.h" | 25 #include "base/nix/xdg_util.h" |
26 #endif | 26 #endif |
(...skipping 29 matching lines...) Expand all Loading... |
56 int render_view_id, | 56 int render_view_id, |
57 int bridge_id, | 57 int bridge_id, |
58 const GURL& requesting_frame) OVERRIDE { | 58 const GURL& requesting_frame) OVERRIDE { |
59 NOTIMPLEMENTED(); | 59 NOTIMPLEMENTED(); |
60 } | 60 } |
61 | 61 |
62 private: | 62 private: |
63 DISALLOW_COPY_AND_ASSIGN(ShellGeolocationPermissionContext); | 63 DISALLOW_COPY_AND_ASSIGN(ShellGeolocationPermissionContext); |
64 }; | 64 }; |
65 | 65 |
66 class ShellSpeechInputPreferences : public SpeechInputPreferences { | 66 class ShellSpeechRecognitionPreferences : public SpeechRecognitionPreferences { |
67 public: | 67 public: |
68 ShellSpeechInputPreferences() { | 68 ShellSpeechRecognitionPreferences() { |
69 } | 69 } |
70 | 70 |
71 // Overridden from SpeechInputPreferences: | 71 // Overridden from SpeechRecognitionPreferences: |
72 virtual bool FilterProfanities() const OVERRIDE { | 72 virtual bool FilterProfanities() const OVERRIDE { |
73 return false; | 73 return false; |
74 } | 74 } |
75 | 75 |
76 virtual void SetFilterProfanities(bool filter_profanities) OVERRIDE { | 76 virtual void SetFilterProfanities(bool filter_profanities) OVERRIDE { |
77 } | 77 } |
78 | 78 |
79 private: | 79 private: |
80 DISALLOW_COPY_AND_ASSIGN(ShellSpeechInputPreferences); | 80 DISALLOW_COPY_AND_ASSIGN(ShellSpeechRecognitionPreferences); |
81 }; | 81 }; |
82 | 82 |
83 } // namespace | 83 } // namespace |
84 | 84 |
85 ShellBrowserContext::ShellBrowserContext( | 85 ShellBrowserContext::ShellBrowserContext( |
86 ShellBrowserMainParts* shell_main_parts) | 86 ShellBrowserMainParts* shell_main_parts) |
87 : shell_main_parts_(shell_main_parts) { | 87 : shell_main_parts_(shell_main_parts) { |
88 } | 88 } |
89 | 89 |
90 ShellBrowserContext::~ShellBrowserContext() { | 90 ShellBrowserContext::~ShellBrowserContext() { |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 | 163 |
164 GeolocationPermissionContext* | 164 GeolocationPermissionContext* |
165 ShellBrowserContext::GetGeolocationPermissionContext() { | 165 ShellBrowserContext::GetGeolocationPermissionContext() { |
166 if (!geolocation_permission_context_) { | 166 if (!geolocation_permission_context_) { |
167 geolocation_permission_context_ = | 167 geolocation_permission_context_ = |
168 new ShellGeolocationPermissionContext(); | 168 new ShellGeolocationPermissionContext(); |
169 } | 169 } |
170 return geolocation_permission_context_; | 170 return geolocation_permission_context_; |
171 } | 171 } |
172 | 172 |
173 SpeechInputPreferences* ShellBrowserContext::GetSpeechInputPreferences() { | 173 SpeechRecognitionPreferences* |
174 if (!speech_input_preferences_.get()) | 174 ShellBrowserContext::GetSpeechRecognitionPreferences() { |
175 speech_input_preferences_ = new ShellSpeechInputPreferences(); | 175 if (!speech_recognition_preferences_.get()) |
176 return speech_input_preferences_.get(); | 176 speech_recognition_preferences_ = new ShellSpeechRecognitionPreferences(); |
| 177 return speech_recognition_preferences_.get(); |
177 } | 178 } |
178 | 179 |
179 bool ShellBrowserContext::DidLastSessionExitCleanly() { | 180 bool ShellBrowserContext::DidLastSessionExitCleanly() { |
180 return true; | 181 return true; |
181 } | 182 } |
182 | 183 |
183 quota::SpecialStoragePolicy* ShellBrowserContext::GetSpecialStoragePolicy() { | 184 quota::SpecialStoragePolicy* ShellBrowserContext::GetSpecialStoragePolicy() { |
184 return NULL; | 185 return NULL; |
185 } | 186 } |
186 | 187 |
187 } // namespace content | 188 } // namespace content |
OLD | NEW |