summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/frame/browser_view.cc
diff options
context:
space:
mode:
authormad@chromium.org <mad@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-26 18:36:12 +0000
committermad@chromium.org <mad@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-26 18:36:12 +0000
commit24898094bfdc81622aba5b0adff9beff1c02c665 (patch)
tree8b1a81f35c62e6cd65d4587d9e7c0bacf8b7c1ee /chrome/browser/views/frame/browser_view.cc
parent1ba27c494f174bac77f310de94bd7f1d92e62239 (diff)
downloadchromium_src-24898094bfdc81622aba5b0adff9beff1c02c665.zip
chromium_src-24898094bfdc81622aba5b0adff9beff1c02c665.tar.gz
chromium_src-24898094bfdc81622aba5b0adff9beff1c02c665.tar.bz2
Prevent the display of the resize corner bitmap on top of the download shelf when the browser window is maximized.
BUG=8025 Review URL: http://codereview.chromium.org/28168 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10485 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/frame/browser_view.cc')
-rw-r--r--chrome/browser/views/frame/browser_view.cc19
1 files changed, 14 insertions, 5 deletions
diff --git a/chrome/browser/views/frame/browser_view.cc b/chrome/browser/views/frame/browser_view.cc
index 5976013..f06bd67 100644
--- a/chrome/browser/views/frame/browser_view.cc
+++ b/chrome/browser/views/frame/browser_view.cc
@@ -126,8 +126,14 @@ static const struct {
class ResizeCorner : public views::View {
public:
- ResizeCorner() {}
+ ResizeCorner(const BrowserWindow* parent)
+ : parent_(parent) {
+ }
+
virtual void Paint(ChromeCanvas* canvas) {
+ if (parent_ && (parent_->IsMaximized() || parent_->IsFullscreen()))
+ return;
+
SkBitmap * bitmap = ResourceBundle::GetSharedInstance().GetBitmapNamed(
IDR_TEXTAREA_RESIZER);
bitmap->buildMipMap(false);
@@ -149,6 +155,8 @@ class ResizeCorner : public views::View {
}
virtual gfx::Size GetPreferredSize() {
+ if (parent_ && (parent_->IsMaximized() || parent_->IsFullscreen()))
+ return gfx::Size();
return GetSize();
}
@@ -164,6 +172,7 @@ class ResizeCorner : public views::View {
}
private:
+ const BrowserWindow* parent_;
DISALLOW_COPY_AND_ASSIGN(ResizeCorner);
};
@@ -706,8 +715,8 @@ bool BrowserView::IsBookmarkBarVisible() const {
}
gfx::Rect BrowserView::GetRootWindowResizerRect() const {
- // There is no resize corner when we are maximized
- if (IsMaximized())
+ // There is no resize corner when we are maximized or full screen
+ if (IsMaximized() || IsFullscreen())
return gfx::Rect();
// We don't specify a resize corner size if we have a bottom shelf either.
@@ -1100,7 +1109,7 @@ int BrowserView::NonClientHitTest(const gfx::Point& point) {
// hit-tests of the titlebar.
// There is not resize corner when we are maximised
- if (!IsMaximized()) {
+ if (!IsMaximized() && !IsFullscreen()) {
CRect client_rect;
::GetClientRect(frame_->GetWindow()->GetHWND(), &client_rect);
gfx::Size resize_corner_size = ResizeCorner::GetSize();
@@ -1452,7 +1461,7 @@ bool BrowserView::MaybeShowDownloadShelf(TabContents* contents) {
if (contents && contents->IsDownloadShelfVisible()) {
new_shelf = contents->GetDownloadShelfView();
if (new_shelf != active_download_shelf_)
- new_shelf->AddChildView(new ResizeCorner());
+ new_shelf->AddChildView(new ResizeCorner(this));
}
return UpdateChildViewAndLayout(new_shelf, &active_download_shelf_);
}