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

Side by Side Diff: webkit/glue/plugins/webplugin_delegate_impl.h

Issue 42056: Basic windowless plugins, try 2. (Closed)
Patch Set: review comments Created 11 years, 9 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
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 WEBKIT_GLUE_PLUGIN_WEBPLUGIN_DELEGATE_IMPL_H_ 5 #ifndef WEBKIT_GLUE_PLUGIN_WEBPLUGIN_DELEGATE_IMPL_H_
6 #define WEBKIT_GLUE_PLUGIN_WEBPLUGIN_DELEGATE_IMPL_H_ 6 #define WEBKIT_GLUE_PLUGIN_WEBPLUGIN_DELEGATE_IMPL_H_
7 7
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 9
10 #include <string> 10 #include <string>
11 #include <list> 11 #include <list>
12 12
13 #include "base/file_path.h" 13 #include "base/file_path.h"
14 #include "base/gfx/native_widget_types.h" 14 #include "base/gfx/native_widget_types.h"
15 #include "base/gfx/rect.h" 15 #include "base/gfx/rect.h"
16 #include "base/ref_counted.h" 16 #include "base/ref_counted.h"
17 #include "base/task.h" 17 #include "base/task.h"
18 #include "third_party/npapi/bindings/npapi.h" 18 #include "third_party/npapi/bindings/npapi.h"
19 #include "webkit/glue/webplugin_delegate.h" 19 #include "webkit/glue/webplugin_delegate.h"
20 #include "webkit/glue/webcursor.h" 20 #include "webkit/glue/webcursor.h"
21 21
22 #if defined(OS_LINUX)
23 typedef struct _GdkDrawable GdkPixmap;
24 #endif
25
22 namespace NPAPI { 26 namespace NPAPI {
23 class PluginInstance; 27 class PluginInstance;
24 }; 28 };
25 29
26 // An implementation of WebPluginDelegate that proxies all calls to 30 // An implementation of WebPluginDelegate that proxies all calls to
27 // the plugin process. 31 // the plugin process.
28 class WebPluginDelegateImpl : public WebPluginDelegate { 32 class WebPluginDelegateImpl : public WebPluginDelegate {
29 public: 33 public:
30 static bool IsPluginDelegateWindow(gfx::NativeWindow window); 34 static bool IsPluginDelegateWindow(gfx::NativeWindow window);
31 static bool GetPluginNameFromWindow(gfx::NativeWindow window, 35 static bool GetPluginNameFromWindow(gfx::NativeWindow window,
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 174
171 #if defined(OS_WIN) 175 #if defined(OS_WIN)
172 // Original wndproc before we subclassed. 176 // Original wndproc before we subclassed.
173 WNDPROC plugin_wnd_proc_; 177 WNDPROC plugin_wnd_proc_;
174 178
175 // Used to throttle WM_USER+1 messages in Flash. 179 // Used to throttle WM_USER+1 messages in Flash.
176 uint32 last_message_; 180 uint32 last_message_;
177 bool is_calling_wndproc; 181 bool is_calling_wndproc;
178 #endif // OS_WIN 182 #endif // OS_WIN
179 183
184 #if defined(OS_LINUX)
185 // The pixmap we're drawing into, for a windowless plugin.
186 GdkPixmap* pixmap_;
187
188 // Ensure pixmap_ exists and is at least width by height pixels.
189 void EnsurePixmapAtLeastSize(int width, int height);
190 #endif
191
180 gfx::NativeView parent_; 192 gfx::NativeView parent_;
181 NPWindow window_; 193 NPWindow window_;
182 #if defined(OS_MACOSX) 194 #if defined(OS_MACOSX)
183 NP_CGContext cg_context_; 195 NP_CGContext cg_context_;
184 #endif 196 #endif
185 gfx::Rect window_rect_; 197 gfx::Rect window_rect_;
186 gfx::Rect clip_rect_; 198 gfx::Rect clip_rect_;
187 std::vector<gfx::Rect> cutout_rects_; 199 std::vector<gfx::Rect> cutout_rects_;
188 int quirks_; 200 int quirks_;
189 201
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 271
260 // Holds the current cursor set by the windowless plugin. 272 // Holds the current cursor set by the windowless plugin.
261 WebCursor current_windowless_cursor_; 273 WebCursor current_windowless_cursor_;
262 274
263 friend class WebPluginDelegate; 275 friend class WebPluginDelegate;
264 276
265 DISALLOW_EVIL_CONSTRUCTORS(WebPluginDelegateImpl); 277 DISALLOW_EVIL_CONSTRUCTORS(WebPluginDelegateImpl);
266 }; 278 };
267 279
268 #endif // #ifndef WEBKIT_GLUE_PLUGIN_WEBPLUGIN_DELEGATE_IMPL_H_ 280 #endif // #ifndef WEBKIT_GLUE_PLUGIN_WEBPLUGIN_DELEGATE_IMPL_H_
OLDNEW
« no previous file with comments | « webkit/glue/plugins/plugin_instance.cc ('k') | webkit/glue/plugins/webplugin_delegate_impl_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698