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

Side by Side Diff: chrome/browser/views/frame/opaque_non_client_view.cc

Issue 27247: Non-functional cleanup:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/views/frame/browser_view.cc ('k') | chrome/views/window.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/views/frame/opaque_non_client_view.h" 5 #include "chrome/browser/views/frame/opaque_non_client_view.h"
6 6
7 #include "chrome/browser/views/frame/browser_view.h" 7 #include "chrome/browser/views/frame/browser_view.h"
8 #include "chrome/browser/views/tabs/tab_strip.h" 8 #include "chrome/browser/views/tabs/tab_strip.h"
9 #include "chrome/common/gfx/chrome_font.h" 9 #include "chrome/common/gfx/chrome_font.h"
10 #include "chrome/common/gfx/path.h" 10 #include "chrome/common/gfx/path.h"
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 return 0; 662 return 0;
663 return frame_->IsMaximized() ? 663 return frame_->IsMaximized() ?
664 GetSystemMetrics(SM_CXSIZEFRAME) : kFrameBorderThickness; 664 GetSystemMetrics(SM_CXSIZEFRAME) : kFrameBorderThickness;
665 } 665 }
666 666
667 int OpaqueNonClientView::TopResizeHeight() const { 667 int OpaqueNonClientView::TopResizeHeight() const {
668 return FrameBorderThickness() - kTopResizeAdjust; 668 return FrameBorderThickness() - kTopResizeAdjust;
669 } 669 }
670 670
671 int OpaqueNonClientView::NonClientBorderThickness() const { 671 int OpaqueNonClientView::NonClientBorderThickness() const {
672 // In maximized mode, we don't show a client edge. 672 // When we fill the screen, we don't show a client edge.
673 return FrameBorderThickness() + 673 return FrameBorderThickness() +
674 ((frame_->IsMaximized() || browser_view_->IsFullscreen()) ? 674 (browser_view_->CanCurrentlyResize() ? kClientEdgeThickness : 0);
675 0 : kClientEdgeThickness);
676 } 675 }
677 676
678 int OpaqueNonClientView::NonClientTopBorderHeight() const { 677 int OpaqueNonClientView::NonClientTopBorderHeight() const {
679 if (frame_->window_delegate()->ShouldShowWindowTitle()) { 678 if (frame_->window_delegate()->ShouldShowWindowTitle()) {
680 int title_top_spacing, title_thickness; 679 int title_top_spacing, title_thickness;
681 return TitleCoordinates(&title_top_spacing, &title_thickness); 680 return TitleCoordinates(&title_top_spacing, &title_thickness);
682 } 681 }
683 682
684 return FrameBorderThickness() + 683 return FrameBorderThickness() + (browser_view_->CanCurrentlyResize() ?
685 ((frame_->IsMaximized() || browser_view_->IsFullscreen()) ? 684 kNonClientRestoredExtraThickness : 0);
686 0 : kNonClientRestoredExtraThickness);
687 } 685 }
688 686
689 int OpaqueNonClientView::UnavailablePixelsAtBottomOfNonClientHeight() const { 687 int OpaqueNonClientView::UnavailablePixelsAtBottomOfNonClientHeight() const {
690 // Tricky: When a toolbar is edging the titlebar, it not only draws its own 688 // Tricky: When a toolbar is edging the titlebar, it not only draws its own
691 // shadow and client edge, but an extra, light "shadow" pixel as well, which 689 // shadow and client edge, but an extra, light "shadow" pixel as well, which
692 // is treated as available space. Thus the nonclient area actually _fails_ to 690 // is treated as available space. Thus the nonclient area actually _fails_ to
693 // include some available pixels, leading to a negative number here. 691 // include some available pixels, leading to a negative number here.
694 if (browser_view_->IsToolbarVisible()) 692 if (browser_view_->IsToolbarVisible())
695 return -kFrameShadowThickness; 693 return -kFrameShadowThickness;
696 694
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
1063 } 1061 }
1064 1062
1065 // static 1063 // static
1066 void OpaqueNonClientView::InitAppWindowResources() { 1064 void OpaqueNonClientView::InitAppWindowResources() {
1067 static bool initialized = false; 1065 static bool initialized = false;
1068 if (!initialized) { 1066 if (!initialized) {
1069 title_font_ = win_util::GetWindowTitleFont(); 1067 title_font_ = win_util::GetWindowTitleFont();
1070 initialized = true; 1068 initialized = true;
1071 } 1069 }
1072 } 1070 }
OLDNEW
« no previous file with comments | « chrome/browser/views/frame/browser_view.cc ('k') | chrome/views/window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698