summaryrefslogtreecommitdiffstats
path: root/o3d/plugin/cross
diff options
context:
space:
mode:
authormaf@google.com <maf@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-10 01:15:35 +0000
committermaf@google.com <maf@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-10 01:15:35 +0000
commit59813099e93f2a9165870f42b7eb5ab39304c8bd (patch)
tree9e547f7d1d2635104b389bccfe1b7b811d49161a /o3d/plugin/cross
parent461ce4745fc15a6f434699d5a7dcc0591ce952cd (diff)
downloadchromium_src-59813099e93f2a9165870f42b7eb5ab39304c8bd.zip
chromium_src-59813099e93f2a9165870f42b7eb5ab39304c8bd.tar.gz
chromium_src-59813099e93f2a9165870f42b7eb5ab39304c8bd.tar.bz2
Make O3D fullscreen mode support resolution switching on Mac.
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
Diffstat (limited to 'o3d/plugin/cross')
-rw-r--r--o3d/plugin/cross/o3d_glue.cc5
-rw-r--r--o3d/plugin/cross/o3d_glue.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/o3d/plugin/cross/o3d_glue.cc b/o3d/plugin/cross/o3d_glue.cc
index 0a7ddd4..f760e1b 100644
--- a/o3d/plugin/cross/o3d_glue.cc
+++ b/o3d/plugin/cross/o3d_glue.cc
@@ -114,6 +114,7 @@ PluginObject::PluginObject(NPP npp)
painted_once_(false),
#endif
#ifdef OS_MACOSX
+ mac_fullscreen_state_(NULL),
renderer_is_software_(false),
scroll_is_in_progress_(false),
drawing_model_(NPDrawingModelQuickDraw),
@@ -668,6 +669,9 @@ int PluginObject::height() const {
return 0;
}
+
+// On Mac there is a different implementation in plugin_mac.mm.
+#ifndef OS_MACOSX
void PluginObject::GetDisplayModes(std::vector<o3d::DisplayMode> *modes) {
if (renderer()) {
renderer()->GetDisplayModes(modes);
@@ -675,6 +679,7 @@ void PluginObject::GetDisplayModes(std::vector<o3d::DisplayMode> *modes) {
modes->clear();
}
}
+#endif
void PluginObject::RedirectToFile(const char *url) {
char cmd[] = "window.location = 'file:///%s';";
diff --git a/o3d/plugin/cross/o3d_glue.h b/o3d/plugin/cross/o3d_glue.h
index 019488a..ebe2a44 100644
--- a/o3d/plugin/cross/o3d_glue.h
+++ b/o3d/plugin/cross/o3d_glue.h
@@ -218,6 +218,7 @@ class PluginObject: public NPObject {
bool SetRendererIsSoftware(bool state) {renderer_is_software_ = state;}
bool renderer_is_software_;
+ Ptr mac_fullscreen_state_;
NPDrawingModel drawing_model_;
NPEventModel event_model_;
WindowRef mac_window_; // may be NULL in the Chrome case