summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/frame/opaque_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/opaque_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/opaque_browser_frame_view.cc')
-rw-r--r--chrome/browser/views/frame/opaque_browser_frame_view.cc17
1 files changed, 10 insertions, 7 deletions
diff --git a/chrome/browser/views/frame/opaque_browser_frame_view.cc b/chrome/browser/views/frame/opaque_browser_frame_view.cc
index 9e8692b..ef80018 100644
--- a/chrome/browser/views/frame/opaque_browser_frame_view.cc
+++ b/chrome/browser/views/frame/opaque_browser_frame_view.cc
@@ -463,7 +463,7 @@ gfx::Point OpaqueBrowserFrameView::GetSystemMenuPoint() const {
gfx::Point system_menu_point(
MirroredXCoordinateInsideView(FrameBorderThickness()),
NonClientTopBorderHeight() + browser_view_->GetTabStripHeight() -
- (browser_view_->IsFullscreen() ? 0 : kClientEdgeThickness));
+ (frame_->IsFullscreen() ? 0 : kClientEdgeThickness));
ConvertPointToScreen(this, &system_menu_point);
return system_menu_point;
}
@@ -503,7 +503,7 @@ void OpaqueBrowserFrameView::GetWindowMask(const gfx::Size& size,
gfx::Path* window_mask) {
DCHECK(window_mask);
- if (!browser_view_->CanCurrentlyResize())
+ if (frame_->IsMaximized() || frame_->IsFullscreen())
return;
// Redefine the window visible region for the new size.
@@ -540,7 +540,7 @@ void OpaqueBrowserFrameView::ResetWindowControls() {
// OpaqueBrowserFrameView, views::View overrides:
void OpaqueBrowserFrameView::Paint(ChromeCanvas* canvas) {
- if (browser_view_->IsFullscreen())
+ if (frame_->IsFullscreen())
return; // Nothing is visible, so don't bother to paint.
if (frame_->IsMaximized())
@@ -647,7 +647,8 @@ SkBitmap OpaqueBrowserFrameView::GetFavIconForTabIconView() {
// OpaqueBrowserFrameView, private:
int OpaqueBrowserFrameView::FrameBorderThickness() const {
- return browser_view_->CanCurrentlyResize() ? kFrameBorderThickness : 0;
+ return (frame_->IsMaximized() || frame_->IsFullscreen()) ?
+ 0 : kFrameBorderThickness;
}
int OpaqueBrowserFrameView::TopResizeHeight() const {
@@ -657,7 +658,8 @@ int OpaqueBrowserFrameView::TopResizeHeight() const {
int OpaqueBrowserFrameView::NonClientBorderThickness() const {
// When we fill the screen, we don't show a client edge.
return FrameBorderThickness() +
- (browser_view_->CanCurrentlyResize() ? kClientEdgeThickness : 0);
+ ((frame_->IsMaximized() || frame_->IsFullscreen()) ?
+ 0 : kClientEdgeThickness);
}
int OpaqueBrowserFrameView::NonClientTopBorderHeight() const {
@@ -666,8 +668,9 @@ int OpaqueBrowserFrameView::NonClientTopBorderHeight() const {
return TitleCoordinates(&title_top_spacing, &title_thickness);
}
- return FrameBorderThickness() + (browser_view_->CanCurrentlyResize() ?
- kNonClientRestoredExtraThickness : 0);
+ return FrameBorderThickness() +
+ ((frame_->IsMaximized() || frame_->IsFullscreen()) ?
+ 0 : kNonClientRestoredExtraThickness);
}
int OpaqueBrowserFrameView::UnavailablePixelsAtBottomOfNonClientHeight() const {