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

Side by Side Diff: gpu/demos/framework/main_pepper.cc

Issue 553050: Windows now uses the TLS API instead of __declspec(thread) for client side co... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 11 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
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 "base/at_exit.h" 5 #include "base/at_exit.h"
6 #include "base/logging.h" 6 #include "base/logging.h"
7 #include "gpu/demos/framework/plugin.h" 7 #include "gpu/demos/framework/plugin.h"
8 #include "gpu/pgl/pgl.h"
8 #include "webkit/glue/plugins/nphostapi.h" 9 #include "webkit/glue/plugins/nphostapi.h"
9 10
10 namespace { 11 namespace {
11 // AtExitManager is used by singleton classes to delete themselves when 12 // AtExitManager is used by singleton classes to delete themselves when
12 // the program terminates. There should be only one instance of this class 13 // the program terminates. There should be only one instance of this class
13 // per thread; 14 // per thread;
14 base::AtExitManager* g_at_exit_manager_; 15 base::AtExitManager* g_at_exit_manager_;
15 } // namespace 16 } // namespace
16 17
17 namespace gpu { 18 namespace gpu {
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 plugin_funcs->urlnotify = gpu::demos::NPP_URLNotify; 133 plugin_funcs->urlnotify = gpu::demos::NPP_URLNotify;
133 plugin_funcs->getvalue = gpu::demos::NPP_GetValue; 134 plugin_funcs->getvalue = gpu::demos::NPP_GetValue;
134 plugin_funcs->setvalue = gpu::demos::NPP_SetValue; 135 plugin_funcs->setvalue = gpu::demos::NPP_SetValue;
135 136
136 return NPERR_NO_ERROR; 137 return NPERR_NO_ERROR;
137 } 138 }
138 139
139 NPError API_CALL NP_Initialize(NPNetscapeFuncs* browser_funcs) { 140 NPError API_CALL NP_Initialize(NPNetscapeFuncs* browser_funcs) {
140 g_at_exit_manager_ = new base::AtExitManager(); 141 g_at_exit_manager_ = new base::AtExitManager();
141 gpu::demos::g_browser = browser_funcs; 142 gpu::demos::g_browser = browser_funcs;
143 pglInitialize();
142 return NPERR_NO_ERROR; 144 return NPERR_NO_ERROR;
143 } 145 }
144 146
145 void API_CALL NP_Shutdown() { 147 void API_CALL NP_Shutdown() {
148 pglTerminate();
146 delete g_at_exit_manager_; 149 delete g_at_exit_manager_;
147 } 150 }
148 } // extern "C" 151 } // extern "C"
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698