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 "content/shell/browser/shell_content_browser_client.h" | 5 #include "content/shell/browser/shell_content_browser_client.h" |
6 | 6 |
7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/files/file.h" | 9 #include "base/files/file.h" |
10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 url::kDataScheme, | 194 url::kDataScheme, |
195 url::kFileScheme, | 195 url::kFileScheme, |
196 }; | 196 }; |
197 for (size_t i = 0; i < arraysize(kProtocolList); ++i) { | 197 for (size_t i = 0; i < arraysize(kProtocolList); ++i) { |
198 if (url.scheme() == kProtocolList[i]) | 198 if (url.scheme() == kProtocolList[i]) |
199 return true; | 199 return true; |
200 } | 200 } |
201 return false; | 201 return false; |
202 } | 202 } |
203 | 203 |
| 204 bool ShellContentBrowserClient::IsNPAPIEnabled() { |
| 205 #if defined(OS_WIN) || defined(OS_MACOSX) |
| 206 return true; |
| 207 #else |
| 208 return false; |
| 209 #endif |
| 210 } |
| 211 |
204 void ShellContentBrowserClient::AppendExtraCommandLineSwitches( | 212 void ShellContentBrowserClient::AppendExtraCommandLineSwitches( |
205 base::CommandLine* command_line, | 213 base::CommandLine* command_line, |
206 int child_process_id) { | 214 int child_process_id) { |
207 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 215 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
208 switches::kRunLayoutTest)) { | 216 switches::kRunLayoutTest)) { |
209 command_line->AppendSwitch(switches::kRunLayoutTest); | 217 command_line->AppendSwitch(switches::kRunLayoutTest); |
210 } | 218 } |
211 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 219 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
212 switches::kDumpLineBoxTrees)) { | 220 switches::kDumpLineBoxTrees)) { |
213 command_line->AppendSwitch(switches::kDumpLineBoxTrees); | 221 command_line->AppendSwitch(switches::kDumpLineBoxTrees); |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 ShellBrowserContext* | 408 ShellBrowserContext* |
401 ShellContentBrowserClient::ShellBrowserContextForBrowserContext( | 409 ShellContentBrowserClient::ShellBrowserContextForBrowserContext( |
402 BrowserContext* content_browser_context) { | 410 BrowserContext* content_browser_context) { |
403 if (content_browser_context == browser_context()) | 411 if (content_browser_context == browser_context()) |
404 return browser_context(); | 412 return browser_context(); |
405 DCHECK_EQ(content_browser_context, off_the_record_browser_context()); | 413 DCHECK_EQ(content_browser_context, off_the_record_browser_context()); |
406 return off_the_record_browser_context(); | 414 return off_the_record_browser_context(); |
407 } | 415 } |
408 | 416 |
409 } // namespace content | 417 } // namespace content |
OLD | NEW |