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

Side by Side Diff: gpu/gpu_plugin/gpu_plugin_object.cc

Issue 465099: Removed command buffer's last dependency on NPAPI.... (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « gpu/command_buffer/service/gpu_processor_win.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 <stdlib.h> 5 #include <stdlib.h>
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "gpu/command_buffer/service/command_buffer_service.h" 8 #include "gpu/command_buffer/service/command_buffer_service.h"
9 #include "gpu/command_buffer/service/gpu_processor.h" 9 #include "gpu/command_buffer/service/gpu_processor.h"
10 #include "gpu/np_utils/np_utils.h" 10 #include "gpu/np_utils/np_utils.h"
11 #include "gpu/gpu_plugin/gpu_plugin_object.h" 11 #include "gpu/gpu_plugin/gpu_plugin_object.h"
12 12
13 using ::base::SharedMemory; 13 using ::base::SharedMemory;
14 using command_buffer::CommandBuffer; 14 using command_buffer::CommandBuffer;
15 using command_buffer::CommandBufferService; 15 using command_buffer::CommandBufferService;
16 using command_buffer::GPUProcessor; 16 using command_buffer::GPUProcessor;
17 using np_utils::NPBrowser; 17 using np_utils::NPBrowser;
18 using np_utils::NPObjectPointer; 18 using np_utils::NPObjectPointer;
19 19
20 namespace gpu_plugin { 20 namespace gpu_plugin {
21 21
22 const NPUTF8 GPUPluginObject::kPluginType[] = 22 const NPUTF8 GPUPluginObject::kPluginType[] =
23 "application/vnd.google.chrome.gpu-plugin"; 23 "application/vnd.google.chrome.gpu-plugin";
24 24
25 GPUPluginObject::GPUPluginObject(NPP npp) 25 GPUPluginObject::GPUPluginObject(NPP npp)
26 : npp_(npp), 26 : npp_(npp),
27 status_(kWaitingForNew), 27 status_(kWaitingForNew),
28 command_buffer_(new CommandBufferService), 28 command_buffer_(new CommandBufferService),
29 processor_(new GPUProcessor(npp, command_buffer_.get())) { 29 processor_(new GPUProcessor(command_buffer_.get())) {
30 memset(&window_, 0, sizeof(window_)); 30 memset(&window_, 0, sizeof(window_));
31 } 31 }
32 32
33 NPError GPUPluginObject::New(NPMIMEType plugin_type, 33 NPError GPUPluginObject::New(NPMIMEType plugin_type,
34 int16 argc, 34 int16 argc,
35 char* argn[], 35 char* argn[],
36 char* argv[], 36 char* argv[],
37 NPSavedData* saved) { 37 NPSavedData* saved) {
38 if (status_ != kWaitingForNew) 38 if (status_ != kWaitingForNew)
39 return NPERR_GENERIC_ERROR; 39 return NPERR_GENERIC_ERROR;
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 &GPUProcessor::ProcessCommands)); 114 &GPUProcessor::ProcessCommands));
115 status_ = kInitializationSuccessful; 115 status_ = kInitializationSuccessful;
116 return command_buffer_.get(); 116 return command_buffer_.get();
117 } 117 }
118 } 118 }
119 119
120 return NULL; 120 return NULL;
121 } 121 }
122 122
123 } // namespace gpu_plugin 123 } // namespace gpu_plugin
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gpu_processor_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698