Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(915)

Unified Diff: chrome/browser/views/frame/browser_view.cc

Issue 28168: Prevent the display of the resize corner bitmap on top of the download shelf ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/frame/browser_view.cc
===================================================================
--- chrome/browser/views/frame/browser_view.cc (revision 10255)
+++ chrome/browser/views/frame/browser_view.cc (working copy)
@@ -126,8 +126,14 @@
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 @@
}
virtual gfx::Size GetPreferredSize() {
+ if (parent_ && (parent_->IsMaximized() || parent_->IsFullscreen()))
+ return gfx::Size();
return GetSize();
}
@@ -164,6 +172,7 @@
}
private:
+ const BrowserWindow* parent_;
DISALLOW_COPY_AND_ASSIGN(ResizeCorner);
};
@@ -710,8 +719,8 @@
}
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.
@@ -1105,7 +1114,7 @@
// 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();
@@ -1439,7 +1448,7 @@
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_);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698