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

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

Issue 9265018: Change grow box computation back to a method on BrowserWindow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 8 years, 11 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 | « chrome/browser/ui/views/frame/browser_view.h ('k') | chrome/browser/ui/views/frame/browser_view_layout.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/frame/browser_view.cc
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index 31173f3ba0a60814be43b71d2a38fa0141fbfadd..bbd364b084f7ba34043383991633d1539ee59db5 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -76,7 +76,6 @@
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#include "content/browser/renderer_host/render_view_host.h"
-#include "content/browser/renderer_host/render_widget_host_view.h"
#include "content/public/browser/download_manager.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/user_metrics.h"
@@ -294,7 +293,6 @@ class ResizeCorner : public views::View {
gfx::Size ps = GetPreferredSize();
// No need to handle Right to left text direction here,
// our parent must take care of it for us...
- // TODO(alekseys): fix it.
SetBounds(parent()->width() - ps.width(),
parent()->height() - ps.height(), ps.width(), ps.height());
}
@@ -1030,6 +1028,27 @@ bool BrowserView::IsToolbarVisible() const {
browser_->SupportsWindowFeature(Browser::FEATURE_LOCATIONBAR);
}
+gfx::Rect BrowserView::GetRootWindowResizerRect() const {
+ if (frame_->IsMaximized() || frame_->IsFullscreen())
+ return gfx::Rect();
+
+ // We don't specify a resize corner size if we have a bottom shelf either.
+ // This is because we take care of drawing the resize corner on top of that
+ // shelf, so we don't want others to do it for us in this case.
+ // Currently, the only visible bottom shelf is the download shelf.
+ // Other tests should be added here if we add more bottom shelves.
+ if (IsDownloadShelfVisible())
+ return gfx::Rect();
+
+ gfx::Rect client_rect = contents_split_->bounds();
+ gfx::Size resize_corner_size = ResizeCorner::GetSize();
+ int x = client_rect.width() - resize_corner_size.width();
+ if (base::i18n::IsRTL())
+ x = 0;
+ return gfx::Rect(x, client_rect.height() - resize_corner_size.height(),
+ resize_corner_size.width(), resize_corner_size.height());
+}
+
bool BrowserView::IsPanel() const {
return false;
}
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.h ('k') | chrome/browser/ui/views/frame/browser_view_layout.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698