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

Side by Side Diff: chrome/gpu/gpu_command_buffer_stub.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 | « chrome/browser/gpu_process_host.cc ('k') | no next file » | 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 #if defined(ENABLE_GPU) 5 #if defined(ENABLE_GPU)
6 6
7 #include "base/process_util.h" 7 #include "base/process_util.h"
8 #include "base/shared_memory.h" 8 #include "base/shared_memory.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "chrome/common/child_thread.h" 10 #include "chrome/common/child_thread.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 } 73 }
74 return 0; 74 return 0;
75 } 75 }
76 76
77 bool GpuCommandBufferStub::CreateCompositorWindow() { 77 bool GpuCommandBufferStub::CreateCompositorWindow() {
78 DCHECK(handle_ != gfx::kNullPluginWindow); 78 DCHECK(handle_ != gfx::kNullPluginWindow);
79 79
80 // Ask the browser to create the the host window. 80 // Ask the browser to create the the host window.
81 ChildThread* gpu_thread = ChildThread::current(); 81 ChildThread* gpu_thread = ChildThread::current();
82 gfx::PluginWindowHandle host_window_id = gfx::kNullPluginWindow; 82 gfx::PluginWindowHandle host_window_id = gfx::kNullPluginWindow;
83 gpu_thread->Send(new GpuHostMsg_CreateCompositorHostWindow( 83 gpu_thread->Send(new GpuHostMsg_CreateCompositorHostWindow(
84 renderer_id_, 84 renderer_id_,
85 render_view_id_, 85 render_view_id_,
86 &host_window_id)); 86 &host_window_id));
87 if (host_window_id == gfx::kNullPluginWindow) 87 if (host_window_id == gfx::kNullPluginWindow)
88 return false; 88 return false;
89 HWND host_window = static_cast<HWND>(host_window_id); 89 HWND host_window = static_cast<HWND>(host_window_id);
90 90
91 // Create the compositor window itself. 91 // Create the compositor window itself.
92 DCHECK(host_window); 92 DCHECK(host_window);
93 static ATOM window_class = 0; 93 static ATOM window_class = 0;
94 if (!window_class) { 94 if (!window_class) {
95 WNDCLASSEX wcex; 95 WNDCLASSEX wcex;
96 wcex.cbSize = sizeof(wcex); 96 wcex.cbSize = sizeof(wcex);
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 new GpuHostMsg_ResizeXID(handle_, size, &result)); 371 new GpuHostMsg_ResizeXID(handle_, size, &result));
372 #elif defined(OS_WIN) 372 #elif defined(OS_WIN)
373 HWND hwnd = static_cast<HWND>(compositor_window_); 373 HWND hwnd = static_cast<HWND>(compositor_window_);
374 UINT swp_flags = SWP_NOSENDCHANGING | SWP_NOOWNERZORDER | SWP_NOCOPYBITS | 374 UINT swp_flags = SWP_NOSENDCHANGING | SWP_NOOWNERZORDER | SWP_NOCOPYBITS |
375 SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_DEFERERASE; 375 SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_DEFERERASE;
376 SetWindowPos(hwnd, NULL, 0, 0, size.width(), size.height(), swp_flags); 376 SetWindowPos(hwnd, NULL, 0, 0, size.width(), size.height(), swp_flags);
377 #endif 377 #endif
378 } 378 }
379 379
380 #endif // ENABLE_GPU 380 #endif // ENABLE_GPU
OLDNEW
« no previous file with comments | « chrome/browser/gpu_process_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698