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

Side by Side Diff: chrome/plugin/command_buffer_stub.h

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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/common/plugin_messages_internal.h ('k') | chrome/plugin/command_buffer_stub.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_PLUGIN_COMMAND_BUFFER_STUB_H_
6 #define CHROME_PLUGIN_COMMAND_BUFFER_STUB_H_
7
8 #if defined(ENABLE_GPU)
9
10 #include "app/gfx/native_widget_types.h"
11 #include "base/ref_counted.h"
12 #include "gpu/command_buffer/service/command_buffer_service.h"
13 #include "gpu/command_buffer/service/gpu_processor.h"
14 #include "ipc/ipc_channel.h"
15 #include "ipc/ipc_message.h"
16
17 class PluginChannel;
18
19 class CommandBufferService;
20
21 class CommandBufferStub : public IPC::Channel::Listener,
22 public IPC::Message::Sender {
23 public:
24 CommandBufferStub(PluginChannel* channel, gfx::NativeView view);
25
26 virtual ~CommandBufferStub();
27
28 // IPC::Channel::Listener implementation:
29 virtual void OnMessageReceived(const IPC::Message& message);
30 virtual void OnChannelError();
31
32 // IPC::Message::Sender implementation:
33 virtual bool Send(IPC::Message* msg);
34
35 int route_id() const { return route_id_; }
36
37 private:
38 // Message handlers:
39 void OnInitialize(int32 size, base::SharedMemoryHandle* ring_buffer);
40 void OnSyncOffsets(int32 put_offset, int32* get_offset);
41 void OnGetGetOffset(int32* get_offset);
42 void OnGetPutOffset(int32* put_offset);
43 void OnCreateTransferBuffer(int32 size, int32* id);
44 void OnDestroyTransferBuffer(int32 id);
45 void OnGetTransferBuffer(int32 id,
46 base::SharedMemoryHandle* transfer_buffer);
47 void OnGetToken(int32* token);
48 void OnResetParseError(int32* parse_error);
49 void OnGetErrorStatus(bool* error_status);
50
51 scoped_refptr<PluginChannel> channel_;
52 gfx::NativeView view_;
53 int route_id_;
54 scoped_ptr<gpu::CommandBufferService> command_buffer_;
55 scoped_refptr<gpu::GPUProcessor> processor_;
56 };
57
58 #endif // ENABLE_GPU
59
60 #endif // CHROME_PLUGIN_COMMAND_BUFFER_STUB_H_
OLDNEW
« no previous file with comments | « chrome/common/plugin_messages_internal.h ('k') | chrome/plugin/command_buffer_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698