From 54f31c386a90915be82dde011af97178c745f4e5 Mon Sep 17 00:00:00 2001 From: "xiyuan@chromium.org" Date: Fri, 29 Oct 2010 16:20:42 +0000 Subject: [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 --- chrome/browser/views/frame/opaque_browser_frame_view.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'chrome/browser/views') 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); -- cgit v1.1