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

Side by Side Diff: chrome/renderer/webplugin_delegate_proxy.h

Issue 18082: Improve scrolling performance when there are many windowed plugins in a page.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Call DestroyWindow on the right thread & ensure NPP_SetWindow is called right away Created 11 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) 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_RENDERER_WEBPLUGIN_DELEGATE_PROXY_H__ 5 #ifndef CHROME_RENDERER_WEBPLUGIN_DELEGATE_PROXY_H__
6 #define CHROME_RENDERER_WEBPLUGIN_DELEGATE_PROXY_H__ 6 #define CHROME_RENDERER_WEBPLUGIN_DELEGATE_PROXY_H__
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 void DropWindowScriptObject() { window_script_object_ = NULL; } 45 void DropWindowScriptObject() { window_script_object_ = NULL; }
46 46
47 // Called to flush any deferred geometry changes to the plugin process. 47 // Called to flush any deferred geometry changes to the plugin process.
48 virtual void FlushGeometryUpdates(); 48 virtual void FlushGeometryUpdates();
49 49
50 // WebPluginDelegate implementation: 50 // WebPluginDelegate implementation:
51 virtual void PluginDestroyed(); 51 virtual void PluginDestroyed();
52 virtual bool Initialize(const GURL& url, char** argn, char** argv, int argc, 52 virtual bool Initialize(const GURL& url, char** argn, char** argv, int argc,
53 WebPlugin* plugin, bool load_manually); 53 WebPlugin* plugin, bool load_manually);
54 virtual void UpdateGeometry(const gfx::Rect& window_rect, 54 virtual void UpdateGeometry(const gfx::Rect& window_rect,
55 const gfx::Rect& clip_rect, 55 const gfx::Rect& clip_rect);
56 const std::vector<gfx::Rect>& cutout_rects,
57 bool visible);
58 virtual void Paint(HDC hdc, const gfx::Rect& rect); 56 virtual void Paint(HDC hdc, const gfx::Rect& rect);
59 virtual void Print(HDC hdc); 57 virtual void Print(HDC hdc);
60 virtual NPObject* GetPluginScriptableObject(); 58 virtual NPObject* GetPluginScriptableObject();
61 virtual void DidFinishLoadWithReason(NPReason reason); 59 virtual void DidFinishLoadWithReason(NPReason reason);
62 virtual void SetFocus(); 60 virtual void SetFocus();
63 virtual bool HandleEvent(NPEvent* event, WebCursor* cursor); 61 virtual bool HandleEvent(NPEvent* event, WebCursor* cursor);
64 virtual int GetProcessId(); 62 virtual int GetProcessId();
65 63
66 // IPC::Channel::Listener implementation: 64 // IPC::Channel::Listener implementation:
67 virtual void OnMessageReceived(const IPC::Message& msg); 65 virtual void OnMessageReceived(const IPC::Message& msg);
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 WebPlugin* plugin_; 149 WebPlugin* plugin_;
152 bool windowless_; 150 bool windowless_;
153 scoped_refptr<PluginChannelHost> channel_host_; 151 scoped_refptr<PluginChannelHost> channel_host_;
154 std::string mime_type_; 152 std::string mime_type_;
155 std::string clsid_; 153 std::string clsid_;
156 int instance_id_; 154 int instance_id_;
157 FilePath plugin_path_; 155 FilePath plugin_path_;
158 156
159 gfx::Rect plugin_rect_; 157 gfx::Rect plugin_rect_;
160 gfx::Rect deferred_clip_rect_; 158 gfx::Rect deferred_clip_rect_;
161 std::vector<gfx::Rect> deferred_cutout_rects_;
162 bool send_deferred_update_geometry_; 159 bool send_deferred_update_geometry_;
163 bool visible_;
164 160
165 NPObject* npobject_; 161 NPObject* npobject_;
166 NPObjectStub* window_script_object_; 162 NPObjectStub* window_script_object_;
167 163
168 // Event passed in by the plugin process and is used to decide if 164 // Event passed in by the plugin process and is used to decide if
169 // messages need to be pumped in the NPP_HandleEvent sync call. 165 // messages need to be pumped in the NPP_HandleEvent sync call.
170 ScopedHandle modal_loop_pump_messages_event_; 166 ScopedHandle modal_loop_pump_messages_event_;
171 167
172 // Bitmap for crashed plugin 168 // Bitmap for crashed plugin
173 SkBitmap* sad_plugin_; 169 SkBitmap* sad_plugin_;
(...skipping 14 matching lines...) Expand all
188 scoped_ptr<base::SharedMemory> background_store_; 184 scoped_ptr<base::SharedMemory> background_store_;
189 scoped_ptr<skia::PlatformCanvasWin> background_store_canvas_; 185 scoped_ptr<skia::PlatformCanvasWin> background_store_canvas_;
190 // This lets us know which portion of the backing store has been painted into. 186 // This lets us know which portion of the backing store has been painted into.
191 gfx::Rect backing_store_painted_; 187 gfx::Rect backing_store_painted_;
192 188
193 DISALLOW_EVIL_CONSTRUCTORS(WebPluginDelegateProxy); 189 DISALLOW_EVIL_CONSTRUCTORS(WebPluginDelegateProxy);
194 }; 190 };
195 191
196 #endif // #ifndef CHROME_RENDERER_WEBPLUGIN_DELEGATE_PROXY_H__ 192 #endif // #ifndef CHROME_RENDERER_WEBPLUGIN_DELEGATE_PROXY_H__
197 193
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698