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

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

Issue 25270004: Fix bugs wrt to the content edge for v1 apps and panels (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nit as per jamescook@ Created 7 years, 2 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 | « ash/wm/panels/panel_frame_view.cc ('k') | no next file » | 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) 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/browser_non_client_frame_view_ash.h" 5 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.h"
6 6
7 #include "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/wm/caption_buttons/frame_caption_button_container_view.h" 8 #include "ash/wm/caption_buttons/frame_caption_button_container_view.h"
9 #include "ash/wm/frame_painter.h" 9 #include "ash/wm/frame_painter.h"
10 #include "chrome/browser/themes/theme_properties.h" 10 #include "chrome/browser/themes/theme_properties.h"
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 return delegate->GetWindowIcon(); 365 return delegate->GetWindowIcon();
366 } 366 }
367 367
368 /////////////////////////////////////////////////////////////////////////////// 368 ///////////////////////////////////////////////////////////////////////////////
369 // BrowserNonClientFrameViewAsh, private: 369 // BrowserNonClientFrameViewAsh, private:
370 370
371 int BrowserNonClientFrameViewAsh::NonClientTopBorderHeight() const { 371 int BrowserNonClientFrameViewAsh::NonClientTopBorderHeight() const {
372 if (!ShouldPaint() || browser_view()->IsTabStripVisible()) 372 if (!ShouldPaint() || browser_view()->IsTabStripVisible())
373 return 0; 373 return 0;
374 374
375 // For windows without a tab strip (popups, etc.) ensure we have enough space 375 int caption_buttons_bottom = caption_button_container_->bounds().bottom();
376 // to see the window caption buttons. 376 if (browser_view()->IsToolbarVisible())
377 return caption_button_container_->bounds().bottom() - kContentShadowHeight; 377 return caption_buttons_bottom - kContentShadowHeight;
378 return caption_buttons_bottom + kClientEdgeThickness;
378 } 379 }
379 380
380 bool BrowserNonClientFrameViewAsh::UseShortHeader() const { 381 bool BrowserNonClientFrameViewAsh::UseShortHeader() const {
381 // Restored browser -> tall header 382 // Restored browser -> tall header
382 // Maximized browser -> short header 383 // Maximized browser -> short header
383 // Fullscreen browser, no immersive reveal -> hidden or super short light bar 384 // Fullscreen browser, no immersive reveal -> hidden or super short light bar
384 // Fullscreen browser, immersive reveal -> short header 385 // Fullscreen browser, immersive reveal -> short header
385 // Popup&App window -> tall header 386 // Popup&App window -> tall header
386 // Panels use short header and are handled via ash::PanelFrameView. 387 // Panels use short header and are handled via ash::PanelFrameView.
387 // Dialogs use short header and are handled via ash::CustomFrameViewAsh. 388 // Dialogs use short header and are handled via ash::CustomFrameViewAsh.
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 int BrowserNonClientFrameViewAsh::GetThemeFrameOverlayImageId() const { 556 int BrowserNonClientFrameViewAsh::GetThemeFrameOverlayImageId() const {
556 ui::ThemeProvider* tp = GetThemeProvider(); 557 ui::ThemeProvider* tp = GetThemeProvider();
557 if (tp->HasCustomImage(IDR_THEME_FRAME_OVERLAY) && 558 if (tp->HasCustomImage(IDR_THEME_FRAME_OVERLAY) &&
558 browser_view()->IsBrowserTypeNormal() && 559 browser_view()->IsBrowserTypeNormal() &&
559 !browser_view()->IsOffTheRecord()) { 560 !browser_view()->IsOffTheRecord()) {
560 return ShouldPaintAsActive() ? 561 return ShouldPaintAsActive() ?
561 IDR_THEME_FRAME_OVERLAY : IDR_THEME_FRAME_OVERLAY_INACTIVE; 562 IDR_THEME_FRAME_OVERLAY : IDR_THEME_FRAME_OVERLAY_INACTIVE;
562 } 563 }
563 return 0; 564 return 0;
564 } 565 }
OLDNEW
« no previous file with comments | « ash/wm/panels/panel_frame_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698