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 "android_webview/browser/aw_content_browser_client.h" | 5 #include "android_webview/browser/aw_content_browser_client.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "android_webview/browser/aw_browser_context.h" | 9 #include "android_webview/browser/aw_browser_context.h" |
10 #include "android_webview/browser/aw_browser_main_parts.h" | 10 #include "android_webview/browser/aw_browser_main_parts.h" |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 | 270 |
271 void AwContentBrowserClient::AppendExtraCommandLineSwitches( | 271 void AwContentBrowserClient::AppendExtraCommandLineSwitches( |
272 base::CommandLine* command_line, | 272 base::CommandLine* command_line, |
273 int child_process_id) { | 273 int child_process_id) { |
274 if (command_line->HasSwitch(switches::kSingleProcess)) { | 274 if (command_line->HasSwitch(switches::kSingleProcess)) { |
275 NOTREACHED() << "Android WebView does not support multi-process yet"; | 275 NOTREACHED() << "Android WebView does not support multi-process yet"; |
276 } else { | 276 } else { |
277 // The only kind of a child process WebView can have is renderer. | 277 // The only kind of a child process WebView can have is renderer. |
278 DCHECK_EQ(switches::kRendererProcess, | 278 DCHECK_EQ(switches::kRendererProcess, |
279 command_line->GetSwitchValueASCII(switches::kProcessType)); | 279 command_line->GetSwitchValueASCII(switches::kProcessType)); |
280 | |
281 const base::CommandLine& browser_command_line = | |
282 *base::CommandLine::ForCurrentProcess(); | |
283 static const char* const kCommonSwitchNames[] = { | |
284 switches::kDisablePageVisibility, | |
285 }; | |
286 command_line->CopySwitchesFrom(browser_command_line, kCommonSwitchNames, | |
287 arraysize(kCommonSwitchNames)); | |
288 } | 280 } |
289 } | 281 } |
290 | 282 |
291 std::string AwContentBrowserClient::GetApplicationLocale() { | 283 std::string AwContentBrowserClient::GetApplicationLocale() { |
292 return base::android::GetDefaultLocale(); | 284 return base::android::GetDefaultLocale(); |
293 } | 285 } |
294 | 286 |
295 std::string AwContentBrowserClient::GetAcceptLangs( | 287 std::string AwContentBrowserClient::GetAcceptLangs( |
296 content::BrowserContext* context) { | 288 content::BrowserContext* context) { |
297 return GetAcceptLangsImpl(); | 289 return GetAcceptLangsImpl(); |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
538 | 530 |
539 #if defined(VIDEO_HOLE) | 531 #if defined(VIDEO_HOLE) |
540 content::ExternalVideoSurfaceContainer* | 532 content::ExternalVideoSurfaceContainer* |
541 AwContentBrowserClient::OverrideCreateExternalVideoSurfaceContainer( | 533 AwContentBrowserClient::OverrideCreateExternalVideoSurfaceContainer( |
542 content::WebContents* web_contents) { | 534 content::WebContents* web_contents) { |
543 return native_factory_->CreateExternalVideoSurfaceContainer(web_contents); | 535 return native_factory_->CreateExternalVideoSurfaceContainer(web_contents); |
544 } | 536 } |
545 #endif | 537 #endif |
546 | 538 |
547 } // namespace android_webview | 539 } // namespace android_webview |
OLD | NEW |