OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ui/views/frame/opaque_browser_frame_view.h" | 5 #include "chrome/browser/ui/views/frame/opaque_browser_frame_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 570 matching lines...) Loading... |
581 | 581 |
582 int OpaqueBrowserFrameView::NonClientBorderThickness() const { | 582 int OpaqueBrowserFrameView::NonClientBorderThickness() const { |
583 return layout_->NonClientBorderThickness(); | 583 return layout_->NonClientBorderThickness(); |
584 } | 584 } |
585 | 585 |
586 gfx::Rect OpaqueBrowserFrameView::IconBounds() const { | 586 gfx::Rect OpaqueBrowserFrameView::IconBounds() const { |
587 return layout_->IconBounds(); | 587 return layout_->IconBounds(); |
588 } | 588 } |
589 | 589 |
590 bool OpaqueBrowserFrameView::ShouldShowWindowTitleBar() const { | 590 bool OpaqueBrowserFrameView::ShouldShowWindowTitleBar() const { |
591 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | |
592 // Do not show the custom title bar if the system title bar option is enabled. | 591 // Do not show the custom title bar if the system title bar option is enabled. |
593 if (!frame()->UseCustomFrame()) | 592 if (!frame()->UseCustomFrame()) |
594 return false; | 593 return false; |
595 #endif | |
596 | 594 |
597 // Do not show caption buttons if the window manager is forcefully providing a | 595 // Do not show caption buttons if the window manager is forcefully providing a |
598 // title bar (e.g., in Ubuntu Unity, if the window is maximized). | 596 // title bar (e.g., in Ubuntu Unity, if the window is maximized). |
599 if (!views::ViewsDelegate::views_delegate) | 597 if (!views::ViewsDelegate::views_delegate) |
600 return true; | 598 return true; |
601 return !views::ViewsDelegate::views_delegate->WindowManagerProvidesTitleBar( | 599 return !views::ViewsDelegate::views_delegate->WindowManagerProvidesTitleBar( |
602 IsMaximized()); | 600 IsMaximized()); |
603 } | 601 } |
604 | 602 |
605 void OpaqueBrowserFrameView::PaintRestoredFrameBorder(gfx::Canvas* canvas) { | 603 void OpaqueBrowserFrameView::PaintRestoredFrameBorder(gfx::Canvas* canvas) { |
(...skipping 318 matching lines...) Loading... |
924 | 922 |
925 int OpaqueBrowserFrameView::GetTopAreaHeight() const { | 923 int OpaqueBrowserFrameView::GetTopAreaHeight() const { |
926 gfx::ImageSkia* frame_image = GetFrameImage(); | 924 gfx::ImageSkia* frame_image = GetFrameImage(); |
927 int top_area_height = frame_image->height(); | 925 int top_area_height = frame_image->height(); |
928 if (browser_view()->IsTabStripVisible()) { | 926 if (browser_view()->IsTabStripVisible()) { |
929 top_area_height = std::max(top_area_height, | 927 top_area_height = std::max(top_area_height, |
930 GetBoundsForTabStrip(browser_view()->tabstrip()).bottom()); | 928 GetBoundsForTabStrip(browser_view()->tabstrip()).bottom()); |
931 } | 929 } |
932 return top_area_height; | 930 return top_area_height; |
933 } | 931 } |
OLD | NEW |