summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/frame/glass_browser_frame_view.cc
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-17 00:24:43 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-17 00:24:43 +0000
commit4eaa87f37d0fd5af2487f60aee9323882c39f2e9 (patch)
tree2a0947a5c4df4a6fdefd7769616b83f6b53c6aa2 /chrome/browser/views/frame/glass_browser_frame_view.cc
parent78590369cbb7a30a248d3d037b0088275cd4616b (diff)
downloadchromium_src-4eaa87f37d0fd5af2487f60aee9323882c39f2e9.zip
chromium_src-4eaa87f37d0fd5af2487f60aee9323882c39f2e9.tar.gz
chromium_src-4eaa87f37d0fd5af2487f60aee9323882c39f2e9.tar.bz2
Reorganize fullscreen mode handling. Now nearly everything is in WindowWin. This also includes work area change notifications, which only really apply to Windows (and not pure Widgets) anyway. Some parts (namely, the browser-specific things) are still in BrowserView.This allows me to fix the bug where unlocking your screen resized fullscreen mode windows incorrectly.There are probably one or two other small bits tangled in here -- this got a bit messy. I moved the exit bubble out of browser/ because it wasn't browser-specific; in theory, any WindowWin can now go into fullscreen mode.BUG=8159
Review URL: http://codereview.chromium.org/78002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13908 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/frame/glass_browser_frame_view.cc')
-rw-r--r--chrome/browser/views/frame/glass_browser_frame_view.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/chrome/browser/views/frame/glass_browser_frame_view.cc b/chrome/browser/views/frame/glass_browser_frame_view.cc
index d170a72..770245f 100644
--- a/chrome/browser/views/frame/glass_browser_frame_view.cc
+++ b/chrome/browser/views/frame/glass_browser_frame_view.cc
@@ -184,9 +184,10 @@ gfx::Point GlassBrowserFrameView::GetSystemMenuPoint() const {
// (where we don't do this trick) maximized windows have no client edge and
// only the frame edge is offscreen.
system_menu_point.SetPoint(NonClientBorderThickness() -
- (browser_view_->CanCurrentlyResize() ? kClientEdgeThickness : 0),
+ ((frame_->IsMaximized() || frame_->IsFullscreen()) ?
+ 0 : kClientEdgeThickness),
NonClientTopBorderHeight() + browser_view_->GetTabStripHeight() -
- (browser_view_->IsFullscreen() ? 0 : kClientEdgeThickness));
+ (frame_->IsFullscreen() ? 0 : kClientEdgeThickness));
} else {
system_menu_point.SetPoint(0, -kFrameShadowThickness);
}
@@ -239,16 +240,17 @@ void GlassBrowserFrameView::Layout() {
// GlassBrowserFrameView, private:
int GlassBrowserFrameView::FrameBorderThickness() const {
- return browser_view_->CanCurrentlyResize() ?
- GetSystemMetrics(SM_CXSIZEFRAME) : 0;
+ return (frame_->IsMaximized() || frame_->IsFullscreen()) ?
+ 0 : GetSystemMetrics(SM_CXSIZEFRAME);
}
int GlassBrowserFrameView::NonClientBorderThickness() const {
- return browser_view_->CanCurrentlyResize() ? kNonClientBorderThickness : 0;
+ return (frame_->IsMaximized() || frame_->IsFullscreen()) ?
+ 0 : kNonClientBorderThickness;
}
int GlassBrowserFrameView::NonClientTopBorderHeight() const {
- if (browser_view_->IsFullscreen())
+ if (frame_->IsFullscreen())
return 0;
// We'd like to use FrameBorderThickness() here, but the maximized Aero glass
// frame has a 0 frame border around most edges and a CXSIZEFRAME-thick border