Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Side by Side Diff: content/ppapi_plugin/ppapi_plugin_main.cc

Issue 1928863002: Enable FeatureList for the GPU process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More comments. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "base/base_paths.h" 5 #include "base/base_paths.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/debug/crash_logging.h" 7 #include "base/debug/crash_logging.h"
8 #include "base/debug/debugger.h" 8 #include "base/debug/debugger.h"
9 #include "base/feature_list.h"
10 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
11 #include "base/i18n/rtl.h" 10 #include "base/i18n/rtl.h"
12 #include "base/message_loop/message_loop.h" 11 #include "base/message_loop/message_loop.h"
13 #include "base/path_service.h" 12 #include "base/path_service.h"
14 #include "base/threading/platform_thread.h" 13 #include "base/threading/platform_thread.h"
15 #include "build/build_config.h" 14 #include "build/build_config.h"
16 #include "content/child/child_process.h" 15 #include "content/child/child_process.h"
17 #include "content/common/content_constants_internal.h" 16 #include "content/common/content_constants_internal.h"
18 #include "content/common/sandbox_linux/sandbox_linux.h" 17 #include "content/common/sandbox_linux/sandbox_linux.h"
19 #include "content/ppapi_plugin/ppapi_thread.h" 18 #include "content/ppapi_plugin/ppapi_thread.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 115
117 #ifdef V8_USE_EXTERNAL_STARTUP_DATA 116 #ifdef V8_USE_EXTERNAL_STARTUP_DATA
118 gin::V8Initializer::LoadV8Snapshot(); 117 gin::V8Initializer::LoadV8Snapshot();
119 gin::V8Initializer::LoadV8Natives(); 118 gin::V8Initializer::LoadV8Natives();
120 #endif 119 #endif
121 120
122 #if defined(OS_LINUX) 121 #if defined(OS_LINUX)
123 LinuxSandbox::InitializeSandbox(); 122 LinuxSandbox::InitializeSandbox();
124 #endif 123 #endif
125 124
126 std::unique_ptr<base::FeatureList> feature_list(new base::FeatureList);
127 feature_list->InitializeFromCommandLine(
128 command_line.GetSwitchValueASCII(switches::kEnableFeatures),
129 command_line.GetSwitchValueASCII(switches::kDisableFeatures));
130 base::FeatureList::SetInstance(std::move(feature_list));
131
132 ChildProcess ppapi_process; 125 ChildProcess ppapi_process;
133 ppapi_process.set_main_thread( 126 ppapi_process.set_main_thread(
134 new PpapiThread(parameters.command_line, false)); // Not a broker. 127 new PpapiThread(parameters.command_line, false)); // Not a broker.
135 128
136 #if defined(OS_WIN) 129 #if defined(OS_WIN)
137 if (!base::win::IsUser32AndGdi32Available()) 130 if (!base::win::IsUser32AndGdi32Available())
138 gfx::win::MaybeInitializeDirectWrite(); 131 gfx::win::MaybeInitializeDirectWrite();
139 InitializeDWriteFontProxy(); 132 InitializeDWriteFontProxy();
140 133
141 blink::WebFontRendering::setDeviceScaleFactor(display::win::GetDPIScale()); 134 blink::WebFontRendering::setDeviceScaleFactor(display::win::GetDPIScale());
142 #endif 135 #endif
143 136
144 main_message_loop.Run(); 137 main_message_loop.Run();
145 138
146 #if defined(OS_WIN) 139 #if defined(OS_WIN)
147 UninitializeDWriteFontProxy(); 140 UninitializeDWriteFontProxy();
148 #endif 141 #endif
149 return 0; 142 return 0;
150 } 143 }
151 144
152 } // namespace content 145 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698