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

Side by Side Diff: chrome/browser/ui/views/ash/browser_non_client_frame_view_ash.cc

Issue 10795013: Rename bounds accessors to be intuitive and consistent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 5 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
OLDNEW
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/ash/browser_non_client_frame_view_ash.h" 5 #include "chrome/browser/ui/views/ash/browser_non_client_frame_view_ash.h"
6 6
7 #include "ash/wm/frame_painter.h" 7 #include "ash/wm/frame_painter.h"
8 #include "ash/wm/workspace/frame_maximize_button.h" 8 #include "ash/wm/workspace/frame_maximize_button.h"
9 #include "chrome/browser/themes/theme_service.h" 9 #include "chrome/browser/themes/theme_service.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 return tabstrip_top_spacing_short(); 431 return tabstrip_top_spacing_short();
432 return tabstrip_top_spacing_tall(); 432 return tabstrip_top_spacing_tall();
433 } 433 }
434 // For windows without a tab strip (popups, etc.) ensure we have enough space 434 // For windows without a tab strip (popups, etc.) ensure we have enough space
435 // to see the window caption buttons. 435 // to see the window caption buttons.
436 return close_button_->bounds().bottom() - kContentShadowHeight; 436 return close_button_->bounds().bottom() - kContentShadowHeight;
437 } 437 }
438 438
439 bool BrowserNonClientFrameViewAsh::UseShortHeader() const { 439 bool BrowserNonClientFrameViewAsh::UseShortHeader() const {
440 // Window at top of screen -> short header 440 // Window at top of screen -> short header
441 if (frame()->GetWindowScreenBounds().y() == 0) 441 if (frame()->GetWindowBoundsInScreen().y() == 0)
442 return true; 442 return true;
443 // Restored browser -> tall header 443 // Restored browser -> tall header
444 // Maximized browser -> short header 444 // Maximized browser -> short header
445 // App window -> tall header 445 // App window -> tall header
446 // Popup window -> short header 446 // Popup window -> short header
447 // Panel -> short header 447 // Panel -> short header
448 // Dialogs use short header and are handled via CustomFrameViewAsh. 448 // Dialogs use short header and are handled via CustomFrameViewAsh.
449 Browser* browser = browser_view()->browser(); 449 Browser* browser = browser_view()->browser();
450 switch (browser->type()) { 450 switch (browser->type()) {
451 case Browser::TYPE_TABBED: 451 case Browser::TYPE_TABBED:
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 BrowserNonClientFrameViewAsh::GetThemeFrameOverlayImage() const { 592 BrowserNonClientFrameViewAsh::GetThemeFrameOverlayImage() const {
593 ui::ThemeProvider* tp = GetThemeProvider(); 593 ui::ThemeProvider* tp = GetThemeProvider();
594 if (tp->HasCustomImage(IDR_THEME_FRAME_OVERLAY) && 594 if (tp->HasCustomImage(IDR_THEME_FRAME_OVERLAY) &&
595 browser_view()->IsBrowserTypeNormal() && 595 browser_view()->IsBrowserTypeNormal() &&
596 !browser_view()->IsOffTheRecord()) { 596 !browser_view()->IsOffTheRecord()) {
597 return tp->GetImageSkiaNamed(ShouldPaintAsActive() ? 597 return tp->GetImageSkiaNamed(ShouldPaintAsActive() ?
598 IDR_THEME_FRAME_OVERLAY : IDR_THEME_FRAME_OVERLAY_INACTIVE); 598 IDR_THEME_FRAME_OVERLAY : IDR_THEME_FRAME_OVERLAY_INACTIVE);
599 } 599 }
600 return NULL; 600 return NULL;
601 } 601 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/app_menu_button_win.cc ('k') | chrome/browser/ui/views/ash/panel_view_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698