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

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

Issue 3052039: If SHM pixmaps support is available, for example, Intel drivers now support t... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 10 years, 4 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/plugin/webplugin_proxy.cc ('k') | webkit/glue/plugins/webplugin_delegate_impl_gtk.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #include <set> 12 #include <set>
13 13
14 #include "base/file_path.h" 14 #include "base/file_path.h"
15 #include "base/ref_counted.h" 15 #include "base/ref_counted.h"
16 #include "base/task.h" 16 #include "base/task.h"
17 #include "base/time.h" 17 #include "base/time.h"
18 #include "base/timer.h" 18 #include "base/timer.h"
19 #include "gfx/native_widget_types.h" 19 #include "gfx/native_widget_types.h"
20 #include "gfx/rect.h" 20 #include "gfx/rect.h"
21 #include "third_party/npapi/bindings/npapi.h" 21 #include "third_party/npapi/bindings/npapi.h"
22 #include "webkit/glue/plugins/webplugin_delegate.h" 22 #include "webkit/glue/plugins/webplugin_delegate.h"
23 #include "webkit/glue/webcursor.h" 23 #include "webkit/glue/webcursor.h"
24 24
25 #if defined(OS_MACOSX) 25 #if defined(OS_MACOSX)
26 #include "app/surface/accelerated_surface_mac.h" 26 #include "app/surface/accelerated_surface_mac.h"
27 #endif 27 #endif
28 28
29 #if defined(USE_X11) 29 #if defined(USE_X11)
30 #include "app/x11_util.h"
31
30 typedef struct _GdkDrawable GdkPixmap; 32 typedef struct _GdkDrawable GdkPixmap;
31 #endif 33 #endif
32 34
33 namespace NPAPI { 35 namespace NPAPI {
34 class PluginInstance; 36 class PluginInstance;
35 } 37 }
36 38
37 namespace WebKit { 39 namespace WebKit {
38 class WebMouseEvent; 40 class WebMouseEvent;
39 } 41 }
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 gfx::PluginWindowHandle windowed_handle() const { 176 gfx::PluginWindowHandle windowed_handle() const {
175 return windowed_handle_; 177 return windowed_handle_;
176 } 178 }
177 179
178 #if defined(OS_MACOSX) 180 #if defined(OS_MACOSX)
179 // Allow setting a "fake" window handle to associate this plug-in with 181 // Allow setting a "fake" window handle to associate this plug-in with
180 // an IOSurface in the browser. Used for accelerated drawing surfaces. 182 // an IOSurface in the browser. Used for accelerated drawing surfaces.
181 void set_windowed_handle(gfx::PluginWindowHandle handle); 183 void set_windowed_handle(gfx::PluginWindowHandle handle);
182 #endif 184 #endif
183 185
186 #if defined(USE_X11)
187 void SetWindowlessShmPixmap(XID shm_pixmap) {
188 windowless_shm_pixmap_ = shm_pixmap;
189 }
190 #endif
191
184 private: 192 private:
185 friend class DeleteTask<WebPluginDelegateImpl>; 193 friend class DeleteTask<WebPluginDelegateImpl>;
186 friend class webkit_glue::WebPluginDelegate; 194 friend class webkit_glue::WebPluginDelegate;
187 195
188 WebPluginDelegateImpl(gfx::PluginWindowHandle containing_view, 196 WebPluginDelegateImpl(gfx::PluginWindowHandle containing_view,
189 NPAPI::PluginInstance *instance); 197 NPAPI::PluginInstance *instance);
190 ~WebPluginDelegateImpl(); 198 ~WebPluginDelegateImpl();
191 199
192 // Called by Initialize() for platform-specific initialization. 200 // Called by Initialize() for platform-specific initialization.
193 // If this returns false, the plugin shouldn't be started--see Initialize(). 201 // If this returns false, the plugin shouldn't be started--see Initialize().
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 bool is_calling_wndproc; 293 bool is_calling_wndproc;
286 294
287 // The current keyboard layout of this process and the main thread ID of the 295 // The current keyboard layout of this process and the main thread ID of the
288 // browser process. These variables are used for synchronizing the keyboard 296 // browser process. These variables are used for synchronizing the keyboard
289 // layout of this process with the one of the browser process. 297 // layout of this process with the one of the browser process.
290 HKL keyboard_layout_; 298 HKL keyboard_layout_;
291 int parent_thread_id_; 299 int parent_thread_id_;
292 #endif // OS_WIN 300 #endif // OS_WIN
293 301
294 #if defined(USE_X11) 302 #if defined(USE_X11)
303 // The SHM pixmap for a windowless plugin.
304 XID windowless_shm_pixmap_;
305
295 // The pixmap we're drawing into, for a windowless plugin. 306 // The pixmap we're drawing into, for a windowless plugin.
296 GdkPixmap* pixmap_; 307 GdkPixmap* pixmap_;
297 double first_event_time_; 308 double first_event_time_;
298 309
299 // On Linux some plugins assume that the GtkSocket container is in the same 310 // On Linux some plugins assume that the GtkSocket container is in the same
300 // process. So we create a GtkPlug to plug into the browser's container, and 311 // process. So we create a GtkPlug to plug into the browser's container, and
301 // a GtkSocket to hold the plugin. We then send the GtkPlug to the browser 312 // a GtkSocket to hold the plugin. We then send the GtkPlug to the browser
302 // process. 313 // process.
303 GtkWidget* plug_; 314 GtkWidget* plug_;
304 GtkWidget* socket_; 315 GtkWidget* socket_;
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 WebCursor current_windowless_cursor_; 492 WebCursor current_windowless_cursor_;
482 493
483 // Set to true initially and indicates if this is the first npp_setwindow 494 // Set to true initially and indicates if this is the first npp_setwindow
484 // call received by the plugin. 495 // call received by the plugin.
485 bool first_set_window_call_; 496 bool first_set_window_call_;
486 497
487 DISALLOW_COPY_AND_ASSIGN(WebPluginDelegateImpl); 498 DISALLOW_COPY_AND_ASSIGN(WebPluginDelegateImpl);
488 }; 499 };
489 500
490 #endif // WEBKIT_GLUE_PLUGIN_WEBPLUGIN_DELEGATE_IMPL_H_ 501 #endif // WEBKIT_GLUE_PLUGIN_WEBPLUGIN_DELEGATE_IMPL_H_
OLDNEW
« no previous file with comments | « chrome/plugin/webplugin_proxy.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