summaryrefslogtreecommitdiffstats
path: root/o3d/plugin/mac/main_mac.mm
Commit message (Collapse)AuthorAgeFilesLines
* Prevents changing the stored tab handle at switching tabs. This fixes a bug ↵geer@google.com2010-09-161-2/+4
| | | | | | | | | | where O3D would keep rendering on another tab in Safari on OSX 10.5.8. When the area had been clicked before switching tabs, a lost focus event just before switching would reset the stored handle to the new, non-O3D tab. Also fixes the tab detection after the o3d page has been dragged to another window. Review URL: http://codereview.chromium.org/3317018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59628 0039d316-1c4b-4281-b951-d872f2087c98
* Don't use the process' default directory for the logfile. Use the temp ↵thaloun@google.com2010-09-031-1/+7
| | | | | | | | | | directory instead. Sending now, while I set up my windows build to test across a couple platforms. Review URL: http://codereview.chromium.org/3303006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58501 0039d316-1c4b-4281-b951-d872f2087c98
* Guard against the plugin being deleted unexpectedly.kbr@google.com2010-06-161-0/+8
| | | | | | | | | BUG=none TEST=manually stress tested plugin creation and destruction Review URL: http://codereview.chromium.org/2848004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49869 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed problems with Cocoa full-screen code:kbr@google.com2010-06-151-3/+24
| | | | | | | | | | | | | | | | | | | - Squelch mouse-up events coming from the browser while in full-screen mode. This avoids immediately falling out of full-screen mode in apps which have an icon which toggles between full-screen and windowed mode. - Squelch focus transfer events coming from the browser while in full-screen mode. This avoids immediately falling out of full-screen mode upon entry in some situations. Focus transfers away from the full-screen window continue to work. BUG=none TEST=various full-screen tests Review URL: http://codereview.chromium.org/2837006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49859 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed bug in Core Graphics backend where it was falling through to thekbr@google.com2010-05-281-32/+33
| | | | | | | | | | | | | | AGL initialization code path in some situations, causing full-screen mode (at least) to break. Also fixed bug causing plugin to become reentrant during event dispatching. BUG=none TEST=none TBR=maf Review URL: http://codereview.chromium.org/2339002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48513 0039d316-1c4b-4281-b951-d872f2087c98
* Refactored drawing and event model selection to generalize to morekbr@google.com2010-05-261-97/+72
| | | | | | | | | | | | | | | | | | | | | | | browsers. Tested in the following browsers / operating systems: Mac OS X 10.5: - Safari (QuickDraw drawing model) - Firefox 3.6 (QuickDraw drawing model) - Firefox 2.0.0.20 (QuickDraw drawing model) - Modified Chromium TOT (Core Graphics drawing model) Mac OS X 10.6: - Safari (Core Animation drawing model) - Firefox 3.6.3 (QuickDraw drawing model) - Modified Chromium TOT (Core Animation drawing model) BUG=none TEST=none Review URL: http://codereview.chromium.org/2169002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48236 0039d316-1c4b-4281-b951-d872f2087c98
* Implemented full-screen support for Core Graphics and Core Animationkbr@google.com2010-05-241-128/+117
| | | | | | | | | | | | | | | | | | | | | | rendering models using a top-level NSWindow and rendering to an NSOpenGLContext which shares resources with the CGLContextObj used to render into the plugin region. Synthesizes and dispatches NPCocoaEvents for the mouse, keyboard and focus change events received by the window. Exposed primitives needed to reset state in the OpenGL context and to switch the Renderer's notion of the context. Fixed bug in offscreen rendering support previously added in support of Core Graphics drawing model. Tested with full-screen sample and modified render-mode sample on Mac OS X 10.6 in Safari 4 and on Mac OS X 10.5 with a version of Chromium with the O3D blacklist entry removed. BUG=http://code.google.com/p/o3d/issues/detail?id=221 TEST=none Review URL: http://codereview.chromium.org/2095023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48076 0039d316-1c4b-4281-b951-d872f2087c98
* Refactored full-screen code under FullscreenWindowMac base class andkbr@google.com2010-05-191-7/+8
| | | | | | | | | | | | | | | | | overlay window code into OverlayWindowMac class. This is an intermediate step toward a Cocoa and CGL implementation. Verified that mouse and key events continue to work in full-screen mode with full-screen sample and a modified render-mode.html in Firefox 3.6.3 on Mac OS X, where O3D continues to use the Quickdraw drawing model. BUG=http://code.google.com/p/o3d/issues/detail?id=221 TEST=none Review URL: http://codereview.chromium.org/2129015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47733 0039d316-1c4b-4281-b951-d872f2087c98
* Review URL: http://codereview.chromium.org/577038maf@google.com2010-04-131-45/+108
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44397 0039d316-1c4b-4281-b951-d872f2087c98
* Added support for O3D in Chrome on Mac OS X using CoreGraphics drawingkbr@chromium.org2010-03-111-22/+164
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | model by rendering offscreen, reading back the frame buffer, and drawing the rendering results into the CGContextRef. This code path is currently Chrome-specific, but could be used for any browser with similar characteristics. This will require refactoring of the drawing and event model selection code, which may be done in a subsequent bug. Changed the RenderSurface APIs to allow the Bitmap for readback to be passed in. Added Client::SetOffscreenRenderingSurfaces so that the entry point Client::RenderClient() can be used unchanged. Fixed problem with plugin_enable_fullscreen_msg gyp variable which needs to be in top-level gypi so #define is consistent throughout project. Fixed minor issue in Cocoa key event handling. Fixed log message causing crashes when render target attachment fails. Chrome currently blacklists the O3D plugin's MIME type, so to enable support for O3D this blacklist entry needs to be removed from Chrome. Ran nearly all O3D samples in Chrome on Mac OS X. There are a couple of failures which will be fixed in subsequent bugs. Also ran samples in Safari and Firefox on Mac and verified no performance regressions. BUG=http://code.google.com/p/o3d/issues/detail?id=215 TEST=ran O3D samples in Chrome, Safari and Firefox Review URL: http://codereview.chromium.org/669220 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41233 0039d316-1c4b-4281-b951-d872f2087c98
* Introduce two new GYP variables:tschmelcher@chromium.org2010-03-051-0/+5
| | | | | | | | | | | | | 1) plugin_domain_whitelist, which sets an optional domain whitelist. If specified, websites not in the list can't use the plugin. 2) plugin_enable_fullscreen_msg, which can be optionally unset to disable the Win/Mac fullscreen message. Also fix a bug in NPPluginProxy that this uncovered. TEST=built on Windows with a whitelist and without fullscreen message and verified correct behaviour in both IE and FF. Also, the whitelist logic comes almost verbatim from another Google product where it is already well-tested BUG=none Review URL: http://codereview.chromium.org/668078 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40786 0039d316-1c4b-4281-b951-d872f2087c98
* Worked around bug in 32-bit Safari 4 on Mac OS X 10.6 where thekbr@chromium.org2010-02-051-0/+6
| | | | | | | | | | browser sends O3D a spurious NPP_SetWindow with an invalid window after first sending it a valid one. Tested this on both 10.6 and 10.5; no ill effects on 10.5, including in multiple tab case. Review URL: http://codereview.chromium.org/572027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38236 0039d316-1c4b-4281-b951-d872f2087c98
* Switched from NPObject shared memory wrapper to Chrome shared memory in ↵apatrick@google.com2009-11-101-4/+6
| | | | | | | | | | | preparation for moving from NPAPI to Chrome IPC for synchronous messages. Started work on an O3D configuration that will use Pepper 3D to connect to a remote GPU plugin. This is not building yet. Updated to latest NPAPI from nixysa. Review URL: http://codereview.chromium.org/371074 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31519 0039d316-1c4b-4281-b951-d872f2087c98
* Updating the installer to check for OpenGL stats. Requires saving those ↵rlp@google.com2009-11-091-1/+1
| | | | | | | | stats and uploading with others which required a modification of the stats uploading code to actually save old stats--which it should do anyways. Review URL: http://codereview.chromium.org/295043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31502 0039d316-1c4b-4281-b951-d872f2087c98
* Drop redundant CommandLine::Terminate.evan@chromium.org2009-10-121-1/+1
| | | | | | | | | We had two functions that did the same thing. Though Terminate came first, I think Reset better conveys the intent. Review URL: http://codereview.chromium.org/267047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28708 0039d316-1c4b-4281-b951-d872f2087c98
* Fix other things blocking the Mac GYP release build from completing.maf@google.com2009-09-031-1/+4
| | | | | | Review URL: http://codereview.chromium.org/194005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25332 0039d316-1c4b-4281-b951-d872f2087c98
* Changes needed to get Mac plugin gyp project build compiling and linking.maf@google.com2009-08-131-2/+2
| | | | | | Review URL: http://codereview.chromium.org/165433 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23375 0039d316-1c4b-4281-b951-d872f2087c98
* Asynchronous tick now uses NPN_PluginAsyncCall.URL streaming callbacks are ↵apatrick@google.com2009-08-031-10/+6
| | | | | | | | now also asynchronous.Implemented NPN_PluginAsyncCall for IE.Allowed WM_PAINT handler to be reentered because it no longer calls into the browser (except to schedule an asynchronous tick if none is pending).Fixed a bug where the EventManager would crash if an event callback called cleanUp on the client.Cleanup destroys all the packs. Doing this in NPP_Destroy seems to make Chrome timeout and fail to load the next page.Tar and GZ decoding happens on a new thread. Review URL: http://codereview.chromium.org/155733 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22305 0039d316-1c4b-4281-b951-d872f2087c98
* Add a boolean parameter to Client::RenderClient() to choose whether tomaf@google.com2009-07-231-5/+5
| | | | | | | | | | | | | | make the javascript render callback or not. Generally you want to pass true, but if the render is happening in non-windowed mode (eg on a Mac) and is in response to an update event rather than a timer, it can be useful to pass false to prevent the javascript code triggering another update and causing an infinite calback loop. Case in point is the custom camera example, which modifies some HTML form text fields on render callback, which on Firefox causes a plugin invalidation and round and round we would go. Review URL: http://codereview.chromium.org/159181 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21473 0039d316-1c4b-4281-b951-d872f2087c98
* Plugin no longer makes synchronous NPAPI calls from a Windows message ↵apatrick@google.com2009-07-131-20/+0
| | | | | | | | handler. This fixes deadlocks and slowdown in Chrome. The approach is strange. It asynchronously opens the url data:, and then invokes Tick from the finish callback. This is the simplest approach I could think of that hide widespread browser support. NPN_PluginThreadAsyncCall would be ideal but it is supported by all browsers we currently support. Review URL: http://codereview.chromium.org/149415 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20517 0039d316-1c4b-4281-b951-d872f2087c98
* In preparation for becoming an internal plugin in chrome I did these things:apatrick@google.com2009-07-091-502/+522
| | | | | | | | | | | - Move declarations in the global namespace into the o3d namespace to avoid conflicts with Chrome. - Ifdef out code that we do not want to run as an internal plugin (like breakpad, DllMain, etc) - Prevent NP_Initialize, etc from being exported as an internal plugin. Unfortunately I had to move functions around to group them by namespace so the diffs look like there is more change than there actually is. Review URL: http://codereview.chromium.org/149130 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20285 0039d316-1c4b-4281-b951-d872f2087c98
* Some refactoring. Move a lot of drawing related but not O3D specific code ↵maf@google.com2009-06-291-0/+2
| | | | | | | | | out of plugin_mac.mm into a new graphics_utils_mac.mm file. Also remove period at end of fullscreen message. Review URL: http://codereview.chromium.org/149052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19537 0039d316-1c4b-4281-b951-d872f2087c98
* add XEmbed bindingspiman@google.com2009-06-291-0/+4
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19508 0039d316-1c4b-4281-b951-d872f2087c98
* I think this fixes the issue with init-status-test.htmlgman@google.com2009-06-181-10/+12
| | | | | | | | It worked for me :-) Review URL: http://codereview.chromium.org/126255 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18674 0039d316-1c4b-4281-b951-d872f2087c98
* Undoing gcl bug damage AGAINgman@google.com2009-06-171-12/+10
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18600 0039d316-1c4b-4281-b951-d872f2087c98
* adding svn:ignore properties to ignore .o3dtgzgman@google.com2009-06-171-10/+12
| | | | | | | files as well as scons-out etc... git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18599 0039d316-1c4b-4281-b951-d872f2087c98
* Undoing gcl bug damagegman@google.com2009-06-171-12/+10
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18598 0039d316-1c4b-4281-b951-d872f2087c98
* Adds a bunch of svn:ignore properties so that svn statusgman@google.com2009-06-171-10/+12
| | | | | | | doesn't show stuff we don't care about. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18595 0039d316-1c4b-4281-b951-d872f2087c98
* Make O3D fullscreen mode support resolution switching on Mac.maf@google.com2009-06-101-16/+33
| | | | | | | | First cut - a bit glitchy when leaving fullscreen currently as we get unwanted browser window resizing when the resolution requested is lower than the current window size. Review URL: http://codereview.chromium.org/118471 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18013 0039d316-1c4b-4281-b951-d872f2087c98
* Fix crash in Safari 4.0 final by making the O3D plug-in default to the ↵maf@google.com2009-06-091-12/+16
| | | | | | | | | | | Carbon event model, rather than the Cocoa event model. A recent change in the spec of the Cocoa event model for Mac OS X browser plug-ins means that essential window information is not supplied at NPP_SetWindow() time. Luckily we can use the Carbon event model while we work out what to do to operate in that environment (we really need to know what window to attach our AGL context to). Review URL: http://codereview.chromium.org/118434 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17961 0039d316-1c4b-4281-b951-d872f2087c98
* Review URL: http://codereview.chromium.org/119067crogers@google.com2009-06-031-0/+13
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17459 0039d316-1c4b-4281-b951-d872f2087c98
* This is the O3D source tree's initial commit to the Chromium tree. It gspencer@google.com2009-05-271-0/+1114
is not built or referenced at all by the chrome build yet, and doesn't yet build in it's new home. We'll change that shortly. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17035 0039d316-1c4b-4281-b951-d872f2087c98