OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. |
3 * Copyright (C) 2008 Collabora Ltd. All rights reserved. | 3 * Copyright (C) 2008 Collabora Ltd. All rights reserved. |
4 * Copyright (C) 2009 Girish Ramakrishnan <girish@forwardbias.in> | 4 * Copyright (C) 2009 Girish Ramakrishnan <girish@forwardbias.in> |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 29 matching lines...) Expand all Loading... |
40 #include <wtf/PassRefPtr.h> | 40 #include <wtf/PassRefPtr.h> |
41 #include <wtf/RefPtr.h> | 41 #include <wtf/RefPtr.h> |
42 #include <wtf/Vector.h> | 42 #include <wtf/Vector.h> |
43 #include <wtf/text/CString.h> | 43 #include <wtf/text/CString.h> |
44 | 44 |
45 #if ENABLE(NETSCAPE_PLUGIN_API) | 45 #if ENABLE(NETSCAPE_PLUGIN_API) |
46 #include "PluginStream.h" | 46 #include "PluginStream.h" |
47 #include "npruntime_internal.h" | 47 #include "npruntime_internal.h" |
48 #endif | 48 #endif |
49 | 49 |
50 #if OS(WINDOWS) && (PLATFORM(GTK) || PLATFORM(QT) || PLATFORM(WX)) | |
51 typedef struct HWND__* HWND; | |
52 typedef HWND PlatformPluginWidget; | |
53 #else | |
54 typedef PlatformWidget PlatformPluginWidget; | |
55 #if defined(XP_MACOSX) && PLATFORM(QT) | |
56 #include <QPixmap> | |
57 #endif | |
58 #endif | |
59 #if PLATFORM(QT) | |
60 #if USE(TEXTURE_MAPPER) | |
61 #include "TextureMapperPlatformLayer.h" | |
62 #endif | |
63 | |
64 #include <QImage> | |
65 QT_BEGIN_NAMESPACE | |
66 class QPainter; | |
67 QT_END_NAMESPACE | |
68 #endif | |
69 #if PLATFORM(QT) && USE(ACCELERATED_COMPOSITING) && ENABLE(NETSCAPE_PLUGIN_API)
&& defined(XP_UNIX) | |
70 #ifndef WTF_USE_ACCELERATED_COMPOSITING_PLUGIN_LAYER | |
71 #define WTF_USE_ACCELERATED_COMPOSITING_PLUGIN_LAYER 1 | |
72 #endif | |
73 #endif | |
74 #if PLATFORM(GTK) | |
75 typedef struct _GtkSocket GtkSocket; | |
76 #endif | |
77 | |
78 #if USE(JSC) | |
79 namespace JSC { | |
80 namespace Bindings { | |
81 class Instance; | |
82 } | |
83 } | |
84 #endif | |
85 | |
86 namespace WebCore { | 50 namespace WebCore { |
87 class Frame; | 51 class Frame; |
88 class Image; | 52 class Image; |
89 class HTMLPlugInElement; | 53 class HTMLPlugInElement; |
90 class KeyboardEvent; | 54 class KeyboardEvent; |
91 class MouseEvent; | 55 class MouseEvent; |
92 class KURL; | 56 class KURL; |
93 #if OS(WINDOWS) && ENABLE(NETSCAPE_PLUGIN_API) | 57 #if OS(WINDOWS) && ENABLE(NETSCAPE_PLUGIN_API) |
94 class PluginMessageThrottlerWin; | 58 class PluginMessageThrottlerWin; |
95 #endif | 59 #endif |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 | 350 |
387 #if OS(WINDOWS) && ENABLE(NETSCAPE_PLUGIN_API) | 351 #if OS(WINDOWS) && ENABLE(NETSCAPE_PLUGIN_API) |
388 OwnPtr<PluginMessageThrottlerWin> m_messageThrottler; | 352 OwnPtr<PluginMessageThrottlerWin> m_messageThrottler; |
389 WNDPROC m_pluginWndProc; | 353 WNDPROC m_pluginWndProc; |
390 unsigned m_lastMessage; | 354 unsigned m_lastMessage; |
391 bool m_isCallingPluginWndProc; | 355 bool m_isCallingPluginWndProc; |
392 HDC m_wmPrintHDC; | 356 HDC m_wmPrintHDC; |
393 bool m_haveUpdatedPluginWidget; | 357 bool m_haveUpdatedPluginWidget; |
394 #endif | 358 #endif |
395 | 359 |
396 #if ((PLATFORM(GTK) || PLATFORM(QT) || PLATFORM(WX)) && OS(WINDOWS)) || defined(
XP_MACOSX) || PLATFORM(EFL) | |
397 // On Mac OSX and Qt/Windows the plugin does not have its own native wid
get, | |
398 // but is using the containing window as its reference for positioning/p
ainting. | |
399 PlatformPluginWidget m_window; | |
400 public: | |
401 PlatformPluginWidget platformPluginWidget() const { return m_window; } | |
402 void setPlatformPluginWidget(PlatformPluginWidget widget) { m_window = w
idget; } | |
403 #else | |
404 public: | |
405 void setPlatformPluginWidget(PlatformPluginWidget widget) { setPlatformW
idget(widget); } | |
406 PlatformPluginWidget platformPluginWidget() const { return platformWidge
t(); } | |
407 #endif | |
408 | |
409 private: | 360 private: |
410 | 361 |
411 #if defined(XP_UNIX) || PLATFORM(GTK) | 362 #if defined(XP_UNIX) || PLATFORM(GTK) |
412 void setNPWindowIfNeeded(); | 363 void setNPWindowIfNeeded(); |
413 #elif defined(XP_MACOSX) | 364 #elif defined(XP_MACOSX) |
414 NP_CGContext m_npCgContext; | 365 NP_CGContext m_npCgContext; |
415 OwnPtr<Timer<PluginView> > m_nullEventTimer; | 366 OwnPtr<Timer<PluginView> > m_nullEventTimer; |
416 NPDrawingModel m_drawingModel; | 367 NPDrawingModel m_drawingModel; |
417 NPEventModel m_eventModel; | 368 NPEventModel m_eventModel; |
418 CGContextRef m_contextRef; | 369 CGContextRef m_contextRef; |
(...skipping 17 matching lines...) Expand all Loading... |
436 Display* m_pluginDisplay; | 387 Display* m_pluginDisplay; |
437 | 388 |
438 void initXEvent(XEvent* event); | 389 void initXEvent(XEvent* event); |
439 #endif | 390 #endif |
440 | 391 |
441 #if PLATFORM(QT) | 392 #if PLATFORM(QT) |
442 #if defined(XP_UNIX) && ENABLE(NETSCAPE_PLUGIN_API) | 393 #if defined(XP_UNIX) && ENABLE(NETSCAPE_PLUGIN_API) |
443 static bool s_isRunningUnderDRT; | 394 static bool s_isRunningUnderDRT; |
444 static void setXKeyEventSpecificFields(XEvent*, KeyboardEvent*); | 395 static void setXKeyEventSpecificFields(XEvent*, KeyboardEvent*); |
445 void paintUsingXPixmap(QPainter* painter, const QRect &exposedRect); | 396 void paintUsingXPixmap(QPainter* painter, const QRect &exposedRect); |
446 QWebPageClient* platformPageClient() const; | |
447 #endif | 397 #endif |
448 #if USE(ACCELERATED_COMPOSITING_PLUGIN_LAYER) | 398 #if USE(ACCELERATED_COMPOSITING_PLUGIN_LAYER) |
449 OwnPtr<PlatformLayer> m_platformLayer; | 399 OwnPtr<PlatformLayer> m_platformLayer; |
450 friend class PluginGraphicsLayerQt; | 400 friend class PluginGraphicsLayerQt; |
451 #endif // USE(ACCELERATED_COMPOSITING_PLUGIN_LAYER) | 401 #endif // USE(ACCELERATED_COMPOSITING_PLUGIN_LAYER) |
452 #endif // PLATFORM(QT) | 402 #endif // PLATFORM(QT) |
453 | 403 |
454 #if PLATFORM(GTK) | 404 #if PLATFORM(GTK) |
455 static gboolean plugRemovedCallback(GtkSocket*, PluginView*); | 405 static gboolean plugRemovedCallback(GtkSocket*, PluginView*); |
456 static void plugAddedCallback(GtkSocket*, PluginView*); | 406 static void plugAddedCallback(GtkSocket*, PluginView*); |
(...skipping 26 matching lines...) Expand all Loading... |
483 ASSERT(!widget || widget->isPluginView()); | 433 ASSERT(!widget || widget->isPluginView()); |
484 return static_cast<const PluginView*>(widget); | 434 return static_cast<const PluginView*>(widget); |
485 } | 435 } |
486 | 436 |
487 // This will catch anyone doing an unnecessary cast. | 437 // This will catch anyone doing an unnecessary cast. |
488 void toPluginView(const PluginView*); | 438 void toPluginView(const PluginView*); |
489 | 439 |
490 } // namespace WebCore | 440 } // namespace WebCore |
491 | 441 |
492 #endif | 442 #endif |
OLD | NEW |