Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / xwalk / runtime / browser / xwalk_browser_main_parts_android.cc
index 3026837..24d5f6f 100644 (file)
 #include "content/public/browser/cookie_store_factory.h"
 #include "content/public/common/content_switches.h"
 #include "content/public/common/result_codes.h"
-#include "grit/net_resources.h"
 #include "net/android/network_change_notifier_factory_android.h"
 #include "net/base/network_change_notifier.h"
 #include "net/base/net_module.h"
 #include "net/base/net_util.h"
 #include "net/cookies/cookie_monster.h"
 #include "net/cookies/cookie_store.h"
+#include "net/grit/net_resources.h"
 #include "ui/base/layout.h"
 #include "ui/base/l10n/l10n_util_android.h"
 #include "ui/base/resource/resource_bundle.h"
@@ -68,6 +68,10 @@ XWalkBrowserMainPartsAndroid::~XWalkBrowserMainPartsAndroid() {
 void XWalkBrowserMainPartsAndroid::PreEarlyInitialization() {
   net::NetworkChangeNotifier::SetFactory(
       new net::NetworkChangeNotifierFactoryAndroid());
+  // As Crosswalk uses in-process mode, that's easier than Chromium
+  // to reach the default limit(1024) of open files per process on
+  // Android. So increase the limit to 4096 explicitly.
+  base::SetFdLimit(4096);
 
   CommandLine::ForCurrentProcess()->AppendSwitch(
       cc::switches::kCompositeToMailbox);
@@ -100,12 +104,6 @@ void XWalkBrowserMainPartsAndroid::PreMainMessageLoopStart() {
   command_line->AppendSwitch(switches::kDisableWebRtcHWEncoding);
 #endif
 
-  // For fullscreen video playback, the ContentVideoView is still buggy, so
-  // we switch back to ContentVideoViewLegacy for temp.
-  // TODO(shouqun): Remove this flag when ContentVideoView is ready.
-  command_line->AppendSwitch(
-      switches::kDisableOverlayFullscreenVideoSubtitle);
-
   command_line->AppendSwitch(switches::kEnableViewportMeta);
 
   XWalkBrowserMainParts::PreMainMessageLoopStart();