summaryrefslogtreecommitdiffstats
path: root/o3d/plugin
diff options
context:
space:
mode:
authorzmo@google.com <zmo@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-16 19:25:55 +0000
committerzmo@google.com <zmo@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-16 19:25:55 +0000
commit8e708e1fb5cd095371e71cf69beedbfe0d67ffd9 (patch)
tree5d978eaeae58d45f872a860560f6060dc6c2fb02 /o3d/plugin
parent076cf937e749accf72df8b280d15e5121accc8af (diff)
downloadchromium_src-8e708e1fb5cd095371e71cf69beedbfe0d67ffd9.zip
chromium_src-8e708e1fb5cd095371e71cf69beedbfe0d67ffd9.tar.gz
chromium_src-8e708e1fb5cd095371e71cf69beedbfe0d67ffd9.tar.bz2
Reverting files back to known good state. Will re-apply
http://codereview.chromium.org/606005 afterward. TBR=vangelis Review URL: http://codereview.chromium.org/609005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39113 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/plugin')
-rw-r--r--o3d/plugin/win/main_win.cc29
1 files changed, 4 insertions, 25 deletions
diff --git a/o3d/plugin/win/main_win.cc b/o3d/plugin/win/main_win.cc
index f9be934..7641611 100644
--- a/o3d/plugin/win/main_win.cc
+++ b/o3d/plugin/win/main_win.cc
@@ -720,25 +720,6 @@ void ReplaceContentWindow(HWND content_hwnd,
::ShowWindow(content_hwnd, SW_SHOW);
}
-// Get the screen rect of the monitor the window is on, in virtual screen
-// coordinates.
-// Return true on success, false on failure.
-bool GetScreenRect(HWND hwnd,
- RECT* rect) {
- HMONITOR monitor = MonitorFromWindow(hwnd, MONITOR_DEFAULTTONULL);
- if (monitor == NULL)
- return false;
-
- MONITORINFO monitor_info;
- monitor_info.cbSize = sizeof(monitor_info);
- if (GetMonitorInfo(monitor, &monitor_info)) {
- *rect = monitor_info.rcMonitor;
- return true;
- } else {
- return false;
- }
-}
-
} // namespace anonymous
#if defined(O3D_INTERNAL_PLUGIN)
@@ -977,12 +958,10 @@ bool PluginObject::RequestFullscreenDisplay() {
// We need to resize the full-screen window to the desired size of
// the display mode early, before calling
// Renderer::GoFullscreen().
- RECT screen_rect;
- if (GetScreenRect(GetPluginHWnd(), &screen_rect)) {
- ::SetWindowPos(GetContentHWnd(), HWND_TOP,
- screen_rect.left, screen_rect.top,
- screen_rect.right - screen_rect.left + 1,
- screen_rect.bottom - screen_rect.top + 1,
+ o3d::DisplayMode mode;
+ if (GetDisplayMode(fullscreen_region_mode_id_, &mode)) {
+ ::SetWindowPos(GetContentHWnd(), HWND_TOP, 0, 0,
+ mode.width(), mode.height(),
SWP_NOZORDER | SWP_NOREPOSITION | SWP_ASYNCWINDOWPOS);
DisplayWindowWindows display;
display.set_hwnd(GetContentHWnd());