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

Side by Side Diff: chrome/browser/renderer_host/render_widget_host_view_win.cc

Issue 1136006: Calling OpenGL from the renderer process. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/renderer_host/render_widget_host.cc ('k') | chrome/common/chrome_constants.h » ('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/renderer_host/render_widget_host_view_win.h" 5 #include "chrome/browser/renderer_host/render_widget_host_view_win.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/l10n_util_win.h" 8 #include "app/l10n_util_win.h"
9 #include "app/resource_bundle.h" 9 #include "app/resource_bundle.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 CommandLine::ForCurrentProcess()->HasSwitch( 286 CommandLine::ForCurrentProcess()->HasSwitch(
287 switches::kEnableRendererAccessibility); 287 switches::kEnableRendererAccessibility);
288 } 288 }
289 289
290 RenderWidgetHostViewWin::~RenderWidgetHostViewWin() { 290 RenderWidgetHostViewWin::~RenderWidgetHostViewWin() {
291 ResetTooltip(); 291 ResetTooltip();
292 } 292 }
293 293
294 void RenderWidgetHostViewWin::CreateWnd(HWND parent) { 294 void RenderWidgetHostViewWin::CreateWnd(HWND parent) {
295 Create(parent); // ATL function to create the window. 295 Create(parent); // ATL function to create the window.
296
297 // Add a property indicating that a particular renderer is associated with
298 // this window. Used by the GPU process to validate window handles it
299 // receives from renderer processes.
300 int renderer_id = render_widget_host_->process()->id();
301 SetProp(m_hWnd,
302 chrome::kChromiumRendererIdProperty,
303 reinterpret_cast<HANDLE>(renderer_id));
304
296 // Uncommenting this will enable experimental out-of-process painting. 305 // Uncommenting this will enable experimental out-of-process painting.
297 // Contact brettw for more, 306 // Contact brettw for more,
298 // gpu_view_host_.reset(new GpuViewHost(render_widget_host_, m_hWnd)); 307 // gpu_view_host_.reset(new GpuViewHost(render_widget_host_, m_hWnd));
299 } 308 }
300 309
301 /////////////////////////////////////////////////////////////////////////////// 310 ///////////////////////////////////////////////////////////////////////////////
302 // RenderWidgetHostViewWin, RenderWidgetHostView implementation: 311 // RenderWidgetHostViewWin, RenderWidgetHostView implementation:
303 312
304 void RenderWidgetHostViewWin::InitAsPopup( 313 void RenderWidgetHostViewWin::InitAsPopup(
305 RenderWidgetHostView* parent_host_view, const gfx::Rect& pos) { 314 RenderWidgetHostView* parent_host_view, const gfx::Rect& pos) {
(...skipping 1293 matching lines...) Expand 10 before | Expand all | Expand 10 after
1599 RenderWidgetHostView::GetRenderWidgetHostViewFromNativeView( 1608 RenderWidgetHostView::GetRenderWidgetHostViewFromNativeView(
1600 gfx::NativeView native_view) { 1609 gfx::NativeView native_view) {
1601 if (::IsWindow(native_view)) { 1610 if (::IsWindow(native_view)) {
1602 HANDLE raw_render_host_view = ::GetProp(native_view, 1611 HANDLE raw_render_host_view = ::GetProp(native_view,
1603 kRenderWidgetHostViewKey); 1612 kRenderWidgetHostViewKey);
1604 if (raw_render_host_view) 1613 if (raw_render_host_view)
1605 return reinterpret_cast<RenderWidgetHostView*>(raw_render_host_view); 1614 return reinterpret_cast<RenderWidgetHostView*>(raw_render_host_view);
1606 } 1615 }
1607 return NULL; 1616 return NULL;
1608 } 1617 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/render_widget_host.cc ('k') | chrome/common/chrome_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698