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

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

Issue 3133: Desynchronize windowless plugin painting. This greatly improves the painting... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 3 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
« no previous file with comments | « chrome/common/plugin_messages_internal.h ('k') | chrome/plugin/webplugin_delegate_stub.cc » ('j') | 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 #ifndef CHROME_PLUGIN_WEBPLUGIN_DELEGATE_STUB_H__ 5 #ifndef CHROME_PLUGIN_WEBPLUGIN_DELEGATE_STUB_H__
6 #define CHROME_PLUGIN_WEBPLUGIN_DELEGATE_STUB_H__ 6 #define CHROME_PLUGIN_WEBPLUGIN_DELEGATE_STUB_H__
7 7
8 #include <queue> 8 #include <queue>
9 9
10 #include "base/gfx/rect.h" 10 #include "base/gfx/rect.h"
11 #include "base/ref_counted.h" 11 #include "base/ref_counted.h"
12 #include "base/task.h" 12 #include "base/task.h"
13 #include "chrome/common/ipc_channel.h" 13 #include "chrome/common/ipc_channel.h"
14 #include "chrome/common/plugin_messages.h" 14 #include "chrome/common/plugin_messages.h"
15 #include "third_party/npapi/bindings/npapi.h" 15 #include "third_party/npapi/bindings/npapi.h"
16 16
17 class GURL; 17 class GURL;
18 class PluginChannel; 18 class PluginChannel;
19 class WebPluginProxy; 19 class WebPluginProxy;
20 class WebPluginDelegateImpl; 20 class WebPluginDelegateImpl;
21 struct PluginMsg_Init_Params; 21 struct PluginMsg_Init_Params;
22 struct PluginMsg_Paint_Params;
23 struct PluginMsg_DidReceiveResponseParams; 22 struct PluginMsg_DidReceiveResponseParams;
24 class WebCursor; 23 class WebCursor;
25 24
26 // Converts the IPC messages from WebPluginDelegateProxy into calls to the 25 // Converts the IPC messages from WebPluginDelegateProxy into calls to the
27 // actual WebPluginDelegate object. 26 // actual WebPluginDelegate object.
28 class WebPluginDelegateStub : public IPC::Channel::Listener, 27 class WebPluginDelegateStub : public IPC::Channel::Listener,
29 public IPC::Message::Sender, 28 public IPC::Message::Sender,
30 public base::RefCounted<WebPluginDelegateStub> { 29 public base::RefCounted<WebPluginDelegateStub> {
31 public: 30 public:
32 WebPluginDelegateStub(const std::string& mime_type, int instance_id, 31 WebPluginDelegateStub(const std::string& mime_type, int instance_id,
(...skipping 17 matching lines...) Expand all
50 void OnDidReceiveResponse(const PluginMsg_DidReceiveResponseParams& params, 49 void OnDidReceiveResponse(const PluginMsg_DidReceiveResponseParams& params,
51 bool* cancel); 50 bool* cancel);
52 void OnDidReceiveData(int id, const std::vector<char>& buffer); 51 void OnDidReceiveData(int id, const std::vector<char>& buffer);
53 void OnDidFinishLoading(int id); 52 void OnDidFinishLoading(int id);
54 void OnDidFail(int id); 53 void OnDidFail(int id);
55 54
56 void OnDidFinishLoadWithReason(int reason); 55 void OnDidFinishLoadWithReason(int reason);
57 void OnSetFocus(); 56 void OnSetFocus();
58 void OnHandleEvent(const NPEvent& event, bool* handled, 57 void OnHandleEvent(const NPEvent& event, bool* handled,
59 WebCursor* cursor); 58 WebCursor* cursor);
60
61 void OnPaint(const PluginMsg_Paint_Params& params);
62
63 void OnPrint(PluginMsg_PrintResponse_Params* params); 59 void OnPrint(PluginMsg_PrintResponse_Params* params);
64
65 // Paints the plugin into a buffer. It roughly does the same as OnPaint (i.e.
66 // painting a plugin) except that the plugin window is always renderered into
67 // an EMF buffer and that it is effective for windowed plugins too.
68 void OnPaintIntoSharedMemory(const PluginMsg_Paint_Params& params,
69 SharedMemoryHandle* emf_buffer, size_t* bytes);
70 // Paints a windowed plugin into a device context.
71 void WindowedPaint(HDC hdc, const gfx::Rect& window_rect);
72 // Paints a windowless plugin into a device context.
73 void WindowlessPaint(HDC hdc,
74 const PluginMsg_Paint_Params& params);
75 void OnUpdateGeometry(const gfx::Rect& window_rect, 60 void OnUpdateGeometry(const gfx::Rect& window_rect,
76 const gfx::Rect& clip_rect, bool visible); 61 const gfx::Rect& clip_rect, bool visible,
62 const SharedMemoryHandle& windowless_buffer,
63 const SharedMemoryLock& lock);
77 void OnGetPluginScriptableObject(int* route_id, void** npobject_ptr); 64 void OnGetPluginScriptableObject(int* route_id, void** npobject_ptr);
78 void OnSendJavaScriptStream(const std::string& url, 65 void OnSendJavaScriptStream(const std::string& url,
79 const std::wstring& result, 66 const std::wstring& result,
80 bool success, bool notify_needed, 67 bool success, bool notify_needed,
81 int notify_data); 68 int notify_data);
82 69
83 void OnDidReceiveManualResponse( 70 void OnDidReceiveManualResponse(
84 const std::string& url, 71 const std::string& url,
85 const PluginMsg_DidReceiveResponseParams& params); 72 const PluginMsg_DidReceiveResponseParams& params);
86 void OnDidReceiveManualData(const std::vector<char>& buffer); 73 void OnDidReceiveManualData(const std::vector<char>& buffer);
(...skipping 17 matching lines...) Expand all
104 scoped_refptr<PluginChannel> channel_; 91 scoped_refptr<PluginChannel> channel_;
105 92
106 WebPluginDelegateImpl* delegate_; 93 WebPluginDelegateImpl* delegate_;
107 WebPluginProxy* webplugin_; 94 WebPluginProxy* webplugin_;
108 95
109 DISALLOW_EVIL_CONSTRUCTORS(WebPluginDelegateStub); 96 DISALLOW_EVIL_CONSTRUCTORS(WebPluginDelegateStub);
110 }; 97 };
111 98
112 #endif // CHROME_PLUGIN_WEBPLUGIN_DELEGATE_STUB_H__ 99 #endif // CHROME_PLUGIN_WEBPLUGIN_DELEGATE_STUB_H__
113 100
OLDNEW
« no previous file with comments | « chrome/common/plugin_messages_internal.h ('k') | chrome/plugin/webplugin_delegate_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698