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

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

Issue 5528007: If compositor window already exists, then simply return it rather than compla... (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
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 "app/view_prop.h" 10 #include "app/view_prop.h"
(...skipping 1524 matching lines...) Expand 10 before | Expand all | Expand 10 after
1535 PaintCompositorHostWindow(hWnd); 1535 PaintCompositorHostWindow(hWnd);
1536 return 0; 1536 return 0;
1537 default: 1537 default:
1538 return DefWindowProc(hWnd, message, wParam, lParam); 1538 return DefWindowProc(hWnd, message, wParam, lParam);
1539 } 1539 }
1540 } 1540 }
1541 1541
1542 // Creates a HWND within the RenderWidgetHostView that will serve as a host 1542 // Creates a HWND within the RenderWidgetHostView that will serve as a host
1543 // for a HWND that the GPU process will create. The host window is used 1543 // for a HWND that the GPU process will create. The host window is used
1544 // to Z-position the GPU's window relative to other plugin windows. 1544 // to Z-position the GPU's window relative to other plugin windows.
1545 gfx::PluginWindowHandle RenderWidgetHostViewWin::CreateCompositorHostWindow() { 1545 gfx::PluginWindowHandle RenderWidgetHostViewWin::GetCompositorHostWindow() {
1546 DCHECK(!compositor_host_window_); 1546 // If the window has been created, don't recreate it a second time
1547 if (compositor_host_window_)
1548 return compositor_host_window_;
1549
1547 static ATOM window_class = 0; 1550 static ATOM window_class = 0;
1548 if (!window_class) { 1551 if (!window_class) {
1549 WNDCLASSEX wcex; 1552 WNDCLASSEX wcex;
1550 wcex.cbSize = sizeof(WNDCLASSEX); 1553 wcex.cbSize = sizeof(WNDCLASSEX);
1551 wcex.style = 0; 1554 wcex.style = 0;
1552 wcex.lpfnWndProc = CompositorHostWindowProc; 1555 wcex.lpfnWndProc = CompositorHostWindowProc;
1553 wcex.cbClsExtra = 0; 1556 wcex.cbClsExtra = 0;
1554 wcex.cbWndExtra = 0; 1557 wcex.cbWndExtra = 0;
1555 wcex.hInstance = GetModuleHandle(NULL); 1558 wcex.hInstance = GetModuleHandle(NULL);
1556 wcex.hIcon = 0; 1559 wcex.hIcon = 0;
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
1803 } 1806 }
1804 1807
1805 // static 1808 // static
1806 RenderWidgetHostView* 1809 RenderWidgetHostView*
1807 RenderWidgetHostView::GetRenderWidgetHostViewFromNativeView( 1810 RenderWidgetHostView::GetRenderWidgetHostViewFromNativeView(
1808 gfx::NativeView native_view) { 1811 gfx::NativeView native_view) {
1809 return ::IsWindow(native_view) ? 1812 return ::IsWindow(native_view) ?
1810 reinterpret_cast<RenderWidgetHostView*>( 1813 reinterpret_cast<RenderWidgetHostView*>(
1811 ViewProp::GetValue(native_view, kRenderWidgetHostViewKey)) : NULL; 1814 ViewProp::GetValue(native_view, kRenderWidgetHostViewKey)) : NULL;
1812 } 1815 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/render_widget_host_view_win.h ('k') | chrome/browser/renderer_host/test/test_render_view_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698