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

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

Issue 2053563002: Incognito icon shows up again when opening incognito browser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Created 4 years, 6 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
« no previous file with comments | « no previous file | 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/ash_layout_constants.h" 9 #include "ash/ash_layout_constants.h"
10 #include "ash/common/material_design/material_design_controller.h" 10 #include "ash/common/material_design/material_design_controller.h"
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 views::WidgetDelegate* delegate = frame()->widget_delegate(); 390 views::WidgetDelegate* delegate = frame()->widget_delegate();
391 return delegate ? delegate->GetWindowIcon() : gfx::ImageSkia(); 391 return delegate ? delegate->GetWindowIcon() : gfx::ImageSkia();
392 } 392 }
393 393
394 /////////////////////////////////////////////////////////////////////////////// 394 ///////////////////////////////////////////////////////////////////////////////
395 // BrowserNonClientFrameViewAsh, protected: 395 // BrowserNonClientFrameViewAsh, protected:
396 396
397 // BrowserNonClientFrameView: 397 // BrowserNonClientFrameView:
398 void BrowserNonClientFrameViewAsh::UpdateProfileIcons() { 398 void BrowserNonClientFrameViewAsh::UpdateProfileIcons() {
399 Browser* browser = browser_view()->browser(); 399 Browser* browser = browser_view()->browser();
400 if ((browser->is_type_tabbed() || browser->is_app()) && 400 const Profile* profile = browser_view()->browser()->profile();
401 bool is_incognito = profile->GetProfileType() == Profile::INCOGNITO_PROFILE;
402 if (((browser->is_type_tabbed() || browser->is_app()) &&
401 chrome::MultiUserWindowManager::ShouldShowAvatar( 403 chrome::MultiUserWindowManager::ShouldShowAvatar(
402 browser_view()->GetNativeWindow())) { 404 browser_view()->GetNativeWindow())) || is_incognito) {
jdufault 2016/06/09 15:54:40 The (((a || b) && c) || d) structure is hard to pa
sammiequon 2016/06/10 04:16:04 Done.
403 UpdateProfileIndicatorIcon(); 405 UpdateProfileIndicatorIcon();
404 } 406 }
405 } 407 }
406 408
407 /////////////////////////////////////////////////////////////////////////////// 409 ///////////////////////////////////////////////////////////////////////////////
408 // BrowserNonClientFrameViewAsh, private: 410 // BrowserNonClientFrameViewAsh, private:
409 411
410 // views::NonClientFrameView: 412 // views::NonClientFrameView:
411 bool BrowserNonClientFrameViewAsh::DoesIntersectRect( 413 bool BrowserNonClientFrameViewAsh::DoesIntersectRect(
412 const views::View* target, 414 const views::View* target,
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 // TODO(pkasting): The "2 *" part of this makes no sense to me. 585 // TODO(pkasting): The "2 *" part of this makes no sense to me.
584 canvas->TileImageInt(*right, 0, 0, w - (2 * kClientEdgeThickness) - img_w, 586 canvas->TileImageInt(*right, 0, 0, w - (2 * kClientEdgeThickness) - img_w,
585 img_y, img_w, img_h); 587 img_y, img_w, img_h);
586 588
587 // Toolbar/content separator. 589 // Toolbar/content separator.
588 toolbar_bounds.Inset(kClientEdgeThickness, h - kClientEdgeThickness, 590 toolbar_bounds.Inset(kClientEdgeThickness, h - kClientEdgeThickness,
589 kClientEdgeThickness, 0); 591 kClientEdgeThickness, 0);
590 canvas->FillRect(toolbar_bounds, separator_color); 592 canvas->FillRect(toolbar_bounds, separator_color);
591 } 593 }
592 } 594 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698