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

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

Issue 5490001: In CreateCompositorHostWindow, reply with null window handle if RenderViewHos... (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 | « no previous file | chrome/gpu/gpu_command_buffer_stub.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 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 GpuProcessHost::Get()->Send(reply_msg); 378 GpuProcessHost::Get()->Send(reply_msg);
379 } 379 }
380 380
381 void CreateCompositorHostWindowDispatcher( 381 void CreateCompositorHostWindowDispatcher(
382 int renderer_id, 382 int renderer_id,
383 int render_view_id, 383 int render_view_id,
384 IPC::Message* reply_msg) { 384 IPC::Message* reply_msg) {
385 RenderViewHost* host = RenderViewHost::FromID(renderer_id, 385 RenderViewHost* host = RenderViewHost::FromID(renderer_id,
386 render_view_id); 386 render_view_id);
387 if (!host) { 387 if (!host) {
388 GpuHostMsg_CreateCompositorHostWindow::WriteReplyParams(reply_msg,
389 gfx::kNullPluginWindow);
390 BrowserThread::PostTask(
391 BrowserThread::IO, FROM_HERE,
392 NewRunnableFunction(&SendDelayedReply, reply_msg));
388 return; 393 return;
389 } 394 }
390 395
391 RenderWidgetHostView* view = host->view(); 396 RenderWidgetHostView* view = host->view();
392 gfx::PluginWindowHandle id = view->CreateCompositorHostWindow(); 397 gfx::PluginWindowHandle id = view->CreateCompositorHostWindow();
393 398
394 399
395 GpuHostMsg_CreateCompositorHostWindow::WriteReplyParams(reply_msg, id); 400 GpuHostMsg_CreateCompositorHostWindow::WriteReplyParams(reply_msg, id);
396 BrowserThread::PostTask( 401 BrowserThread::PostTask(
397 BrowserThread::IO, FROM_HERE, 402 BrowserThread::IO, FROM_HERE,
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 false, // Never use the zygote (GPU plugin can't be sandboxed). 503 false, // Never use the zygote (GPU plugin can't be sandboxed).
499 base::environment_vector(), 504 base::environment_vector(),
500 #endif 505 #endif
501 cmd_line); 506 cmd_line);
502 507
503 UMA_HISTOGRAM_ENUMERATION("GPU.GPUProcessLifetimeEvents", 508 UMA_HISTOGRAM_ENUMERATION("GPU.GPUProcessLifetimeEvents",
504 kLaunched, kGPUProcessLifetimeEvent_Max); 509 kLaunched, kGPUProcessLifetimeEvent_Max);
505 return true; 510 return true;
506 } 511 }
507 512
OLDNEW
« no previous file with comments | « no previous file | chrome/gpu/gpu_command_buffer_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698