summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views
diff options
context:
space:
mode:
authorxiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-29 16:20:42 +0000
committerxiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-29 16:20:42 +0000
commit54f31c386a90915be82dde011af97178c745f4e5 (patch)
treef491eebe9e5ec3c9a2f447f27266e8b255824d0a /chrome/browser/views
parent8018e5a1cc744ee4fee99c7f1dd68b8187347632 (diff)
downloadchromium_src-54f31c386a90915be82dde011af97178c745f4e5.zip
chromium_src-54f31c386a90915be82dde011af97178c745f4e5.tar.gz
chromium_src-54f31c386a90915be82dde011af97178c745f4e5.tar.bz2
[ChromeOS] Use maxmized logic for fullscreen browser window.
This should avoid accidental SetVisible on min/max/restore buttons. BUG=chromium-os:8261 TEST=Verify fix for chromium-os:8261. Review URL: http://codereview.chromium.org/4206003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64435 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views')
-rw-r--r--chrome/browser/views/frame/opaque_browser_frame_view.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/chrome/browser/views/frame/opaque_browser_frame_view.cc b/chrome/browser/views/frame/opaque_browser_frame_view.cc
index c3c1a0a..94d0ffa 100644
--- a/chrome/browser/views/frame/opaque_browser_frame_view.cc
+++ b/chrome/browser/views/frame/opaque_browser_frame_view.cc
@@ -919,7 +919,14 @@ void OpaqueBrowserFrameView::LayoutWindowControls() {
close_button_size.height());
#if defined(OS_CHROMEOS)
- if (is_maximized) {
+ // LayoutWindowControls could be triggered from WindowGtk::UpdateWindowTitle,
+ // which could happen when user navigates in fullscreen mode. And because
+ // BrowserFrameChromeos::IsMaximized return false for fullscreen mode, we
+ // explicitly test fullscreen mode here and make it use the same code path
+ // as maximized mode.
+ // TODO(oshima): Optimize the relayout logic to defer the frame view's
+ // relayout until it is necessary, i.e when it becomes visible.
+ if (is_maximized || frame_->GetWindow()->IsFullscreen()) {
minimize_button_->SetVisible(false);
restore_button_->SetVisible(false);
maximize_button_->SetVisible(false);