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

Side by Side Diff: chrome/browser/gpu_process_host.cc

Issue 5519016: Add a new GetInstance() method for singleton classes used in chrome/browser files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 10 years 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/extensions/extensions_ui.cc ('k') | chrome/browser/gtk/browser_window_gtk.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/gpu_process_host.h" 5 #include "chrome/browser/gpu_process_host.h"
6 6
7 #include "app/app_switches.h" 7 #include "app/app_switches.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/thread.h" 10 #include "base/thread.h"
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 230
231 GpuHostMsg_GetViewXID::WriteReplyParams(reply_msg, xid); 231 GpuHostMsg_GetViewXID::WriteReplyParams(reply_msg, xid);
232 232
233 // Have to reply from IO thread. 233 // Have to reply from IO thread.
234 BrowserThread::PostTask( 234 BrowserThread::PostTask(
235 BrowserThread::IO, FROM_HERE, 235 BrowserThread::IO, FROM_HERE,
236 NewRunnableFunction(&SendDelayedReply, reply_msg)); 236 NewRunnableFunction(&SendDelayedReply, reply_msg));
237 } 237 }
238 238
239 void ReleaseXIDDispatcher(unsigned long xid) { 239 void ReleaseXIDDispatcher(unsigned long xid) {
240 GtkNativeViewManager* manager = Singleton<GtkNativeViewManager>::get(); 240 GtkNativeViewManager* manager = GtkNativeViewManager::GetInstance();
241 manager->ReleasePermanentXID(xid); 241 manager->ReleasePermanentXID(xid);
242 } 242 }
243 243
244 void ResizeXIDDispatcher(unsigned long xid, gfx::Size size, 244 void ResizeXIDDispatcher(unsigned long xid, gfx::Size size,
245 IPC::Message *reply_msg) { 245 IPC::Message *reply_msg) {
246 GdkWindow* window = reinterpret_cast<GdkWindow*>(gdk_xid_table_lookup(xid)); 246 GdkWindow* window = reinterpret_cast<GdkWindow*>(gdk_xid_table_lookup(xid));
247 if (window) { 247 if (window) {
248 Display* display = GDK_WINDOW_XDISPLAY(window); 248 Display* display = GDK_WINDOW_XDISPLAY(window);
249 gdk_window_resize(window, size.width(), size.height()); 249 gdk_window_resize(window, size.width(), size.height());
250 XSync(display, False); 250 XSync(display, False);
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 #elif defined(OS_POSIX) 529 #elif defined(OS_POSIX)
530 false, // Never use the zygote (GPU plugin can't be sandboxed). 530 false, // Never use the zygote (GPU plugin can't be sandboxed).
531 base::environment_vector(), 531 base::environment_vector(),
532 #endif 532 #endif
533 cmd_line); 533 cmd_line);
534 534
535 UMA_HISTOGRAM_ENUMERATION("GPU.GPUProcessLifetimeEvents", 535 UMA_HISTOGRAM_ENUMERATION("GPU.GPUProcessLifetimeEvents",
536 kLaunched, kGPUProcessLifetimeEvent_Max); 536 kLaunched, kGPUProcessLifetimeEvent_Max);
537 return true; 537 return true;
538 } 538 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extensions_ui.cc ('k') | chrome/browser/gtk/browser_window_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698