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

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

Issue 123043002: Use the tall header for restored browser popups (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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/caption_buttons/frame_caption_button.h ('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_border_hit_test_controller.h" 9 #include "ash/wm/frame_border_hit_test_controller.h"
10 #include "ash/wm/header_painter.h" 10 #include "ash/wm/header_painter.h"
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 return avatar_button() ? kAvatarSideSpacing + 359 return avatar_button() ? kAvatarSideSpacing +
360 browser_view()->GetOTRAvatarIcon().width() + kAvatarSideSpacing : 360 browser_view()->GetOTRAvatarIcon().width() + kAvatarSideSpacing :
361 kTabstripLeftSpacing; 361 kTabstripLeftSpacing;
362 } 362 }
363 363
364 int BrowserNonClientFrameViewAsh::GetTabStripRightInset() const { 364 int BrowserNonClientFrameViewAsh::GetTabStripRightInset() const {
365 return header_painter_->GetRightInset() + kTabstripRightSpacing; 365 return header_painter_->GetRightInset() + kTabstripRightSpacing;
366 } 366 }
367 367
368 bool BrowserNonClientFrameViewAsh::UseShortHeader() const { 368 bool BrowserNonClientFrameViewAsh::UseShortHeader() const {
369 // Restored tabbed browser windows use the tall header. All other windows use 369 // Restored browser windows use the tall header. All other windows use the
370 // the short header. 370 // short header.
371 return frame()->IsMaximized() || 371 return frame()->IsMaximized() ||
372 frame()->IsFullscreen() || 372 frame()->IsFullscreen() ||
373 !browser_view()->IsBrowserTypeNormal(); 373 browser_view()->browser()->is_app();
374 } 374 }
375 375
376 bool BrowserNonClientFrameViewAsh::UseImmersiveLightbarHeaderStyle() const { 376 bool BrowserNonClientFrameViewAsh::UseImmersiveLightbarHeaderStyle() const {
377 ImmersiveModeController* immersive_controller = 377 ImmersiveModeController* immersive_controller =
378 browser_view()->immersive_mode_controller(); 378 browser_view()->immersive_mode_controller();
379 return immersive_controller->IsEnabled() && 379 return immersive_controller->IsEnabled() &&
380 !immersive_controller->IsRevealed() && 380 !immersive_controller->IsRevealed() &&
381 browser_view()->IsTabStripVisible(); 381 browser_view()->IsTabStripVisible();
382 } 382 }
383 383
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 int BrowserNonClientFrameViewAsh::GetThemeFrameOverlayImageId() const { 534 int BrowserNonClientFrameViewAsh::GetThemeFrameOverlayImageId() const {
535 ui::ThemeProvider* tp = GetThemeProvider(); 535 ui::ThemeProvider* tp = GetThemeProvider();
536 if (tp->HasCustomImage(IDR_THEME_FRAME_OVERLAY) && 536 if (tp->HasCustomImage(IDR_THEME_FRAME_OVERLAY) &&
537 browser_view()->IsBrowserTypeNormal() && 537 browser_view()->IsBrowserTypeNormal() &&
538 !browser_view()->IsOffTheRecord()) { 538 !browser_view()->IsOffTheRecord()) {
539 return ShouldPaintAsActive() ? 539 return ShouldPaintAsActive() ?
540 IDR_THEME_FRAME_OVERLAY : IDR_THEME_FRAME_OVERLAY_INACTIVE; 540 IDR_THEME_FRAME_OVERLAY : IDR_THEME_FRAME_OVERLAY_INACTIVE;
541 } 541 }
542 return 0; 542 return 0;
543 } 543 }
OLDNEW
« no previous file with comments | « ash/wm/caption_buttons/frame_caption_button.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698