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

Side by Side Diff: content/renderer/renderer_main.cc

Issue 2768343002: Change namespace from ui to gfx for NativePixmap related code (Closed)
Patch Set: Addressed sadrul's remark Created 3 years, 9 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 <stddef.h> 5 #include <stddef.h>
6 #include <utility> 6 #include <utility>
7 7
8 #include "base/base_switches.h" 8 #include "base/base_switches.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/debugger.h" 10 #include "base/debug/debugger.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 static void HandleRendererErrorTestParameters( 69 static void HandleRendererErrorTestParameters(
70 const base::CommandLine& command_line) { 70 const base::CommandLine& command_line) {
71 if (command_line.HasSwitch(switches::kWaitForDebugger)) 71 if (command_line.HasSwitch(switches::kWaitForDebugger))
72 base::debug::WaitForDebugger(60, true); 72 base::debug::WaitForDebugger(60, true);
73 73
74 if (command_line.HasSwitch(switches::kRendererStartupDialog)) 74 if (command_line.HasSwitch(switches::kRendererStartupDialog))
75 ChildProcess::WaitForDebugger("Renderer"); 75 ChildProcess::WaitForDebugger("Renderer");
76 } 76 }
77 77
78 #if defined(USE_OZONE) 78 #if defined(USE_OZONE)
79 base::LazyInstance<std::unique_ptr<ui::ClientNativePixmapFactory>>:: 79 base::LazyInstance<std::unique_ptr<gfx::ClientNativePixmapFactory>>::
80 DestructorAtExit g_pixmap_factory = LAZY_INSTANCE_INITIALIZER; 80 DestructorAtExit g_pixmap_factory = LAZY_INSTANCE_INITIALIZER;
81 #endif 81 #endif
82 82
83 } // namespace 83 } // namespace
84 84
85 // mainline routine for running as the Renderer process 85 // mainline routine for running as the Renderer process
86 int RendererMain(const MainFunctionParams& parameters) { 86 int RendererMain(const MainFunctionParams& parameters) {
87 // Don't use the TRACE_EVENT0 macro because the tracing infrastructure doesn't 87 // Don't use the TRACE_EVENT0 macro because the tracing infrastructure doesn't
88 // expect synchronous events around the main loop of a thread. 88 // expect synchronous events around the main loop of a thread.
89 TRACE_EVENT_ASYNC_BEGIN0("startup", "RendererMain", 0); 89 TRACE_EVENT_ASYNC_BEGIN0("startup", "RendererMain", 0);
(...skipping 23 matching lines...) Expand all
113 SkGraphics::Init(); 113 SkGraphics::Init();
114 #if defined(OS_ANDROID) 114 #if defined(OS_ANDROID)
115 const int kMB = 1024 * 1024; 115 const int kMB = 1024 * 1024;
116 size_t font_cache_limit = 116 size_t font_cache_limit =
117 base::SysInfo::IsLowEndDevice() ? kMB : 8 * kMB; 117 base::SysInfo::IsLowEndDevice() ? kMB : 8 * kMB;
118 SkGraphics::SetFontCacheLimit(font_cache_limit); 118 SkGraphics::SetFontCacheLimit(font_cache_limit);
119 #endif 119 #endif
120 120
121 #if defined(USE_OZONE) 121 #if defined(USE_OZONE)
122 g_pixmap_factory.Get() = ui::CreateClientNativePixmapFactoryOzone(); 122 g_pixmap_factory.Get() = ui::CreateClientNativePixmapFactoryOzone();
123 ui::ClientNativePixmapFactory::SetInstance(g_pixmap_factory.Get().get()); 123 gfx::ClientNativePixmapFactory::SetInstance(g_pixmap_factory.Get().get());
124 #endif 124 #endif
125 125
126 // This function allows pausing execution using the --renderer-startup-dialog 126 // This function allows pausing execution using the --renderer-startup-dialog
127 // flag allowing us to attach a debugger. 127 // flag allowing us to attach a debugger.
128 // Do not move this function down since that would mean we can't easily debug 128 // Do not move this function down since that would mean we can't easily debug
129 // whatever occurs before it. 129 // whatever occurs before it.
130 HandleRendererErrorTestParameters(parsed_command_line); 130 HandleRendererErrorTestParameters(parsed_command_line);
131 131
132 RendererMainPlatformDelegate platform(parameters); 132 RendererMainPlatformDelegate platform(parameters);
133 #if defined(OS_MACOSX) 133 #if defined(OS_MACOSX)
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 // ignore shutdown-only leaks. 206 // ignore shutdown-only leaks.
207 __lsan_do_leak_check(); 207 __lsan_do_leak_check();
208 #endif 208 #endif
209 } 209 }
210 platform.PlatformUninitialize(); 210 platform.PlatformUninitialize();
211 TRACE_EVENT_ASYNC_END0("startup", "RendererMain", 0); 211 TRACE_EVENT_ASYNC_END0("startup", "RendererMain", 0);
212 return 0; 212 return 0;
213 } 213 }
214 214
215 } // namespace content 215 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/browser_main_loop.cc ('k') | gpu/ipc/client/gpu_memory_buffer_impl_ozone_native_pixmap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698