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

Unified Diff: gpu/gpu_plugin/gpu_plugin_object_win.cc

Issue 465040: Added CommandBufferClient, CommandBufferStub and some IPC messages.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/gpu_plugin/gpu_plugin_object_unittest.cc ('k') | gpu/gpu_plugin/gpu_plugin_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/gpu_plugin/gpu_plugin_object_win.cc
===================================================================
--- gpu/gpu_plugin/gpu_plugin_object_win.cc (revision 34314)
+++ gpu/gpu_plugin/gpu_plugin_object_win.cc (working copy)
@@ -1,62 +0,0 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <windows.h>
-
-#include "gpu/command_buffer/service/gpu_processor.h"
-#include "gpu/gpu_plugin/gpu_plugin_object.h"
-
-namespace gpu_plugin {
-
-namespace {
-const LPCTSTR kPluginObjectProperty = TEXT("GPUPluginObject");
-const LPCTSTR kOriginalWindowProc = TEXT("GPUPluginObjectOriginalWindowProc");
-
-LRESULT CALLBACK WindowProc(HWND handle,
- UINT message,
- WPARAM w_param,
- LPARAM l_param) {
- return ::DefWindowProc(handle, message, w_param, l_param);
-}
-} // namespace anonymous
-
-NPError GPUPluginObject::PlatformSpecificSetWindow(NPWindow* new_window) {
- // Detach properties from old window and restore the original window proc.
- if (window_.window) {
- HWND handle = reinterpret_cast<HWND>(window_.window);
- ::RemoveProp(handle, kPluginObjectProperty);
-
- LONG original_window_proc = reinterpret_cast<LONG>(
- ::GetProp(handle, kOriginalWindowProc));
- ::SetWindowLong(handle, GWL_WNDPROC,
- original_window_proc);
- ::RemoveProp(handle, kOriginalWindowProc);
- }
-
- // Attach properties to new window and set a new window proc.
- if (new_window->window) {
- HWND handle = reinterpret_cast<HWND>(new_window->window);
- ::SetProp(handle,
- kPluginObjectProperty,
- reinterpret_cast<HANDLE>(this));
-
- LONG original_window_proc = ::GetWindowLong(handle, GWL_WNDPROC);
- ::SetProp(handle,
- kOriginalWindowProc,
- reinterpret_cast<HANDLE>(original_window_proc));
- ::SetWindowLong(handle, GWL_WNDPROC,
- reinterpret_cast<LONG>(WindowProc));
-
- status_ = kWaitingForOpenCommandBuffer;
- } else {
- status_ = kWaitingForSetWindow;
- if (processor_) {
- processor_->Destroy();
- }
- }
-
- return NPERR_NO_ERROR;
-}
-
-} // namespace gpu_plugin
« no previous file with comments | « gpu/gpu_plugin/gpu_plugin_object_unittest.cc ('k') | gpu/gpu_plugin/gpu_plugin_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698