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

Side by Side Diff: chrome/browser/ui/panels/panel_browser_frame_view.cc

Issue 10408047: Fix bug 105043: Panels [WIN]: For minimize panels, taskbar hover preview show the 4-pixel represent… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix win_aura Created 8 years, 7 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/ui/panels/panel.cc ('k') | chrome/browser/ui/panels/panel_browser_view.h » ('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) 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/panels/panel_browser_frame_view.h" 5 #include "chrome/browser/ui/panels/panel_browser_frame_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/themes/theme_service.h" 10 #include "chrome/browser/themes/theme_service.h"
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 430
431 void PanelBrowserFrameView::UpdateWindowIcon() { 431 void PanelBrowserFrameView::UpdateWindowIcon() {
432 title_icon_->SchedulePaint(); 432 title_icon_->SchedulePaint();
433 } 433 }
434 434
435 void PanelBrowserFrameView::OnPaint(gfx::Canvas* canvas) { 435 void PanelBrowserFrameView::OnPaint(gfx::Canvas* canvas) {
436 // The font and color need to be updated depending on the panel's state. 436 // The font and color need to be updated depending on the panel's state.
437 PaintState paint_state; 437 PaintState paint_state;
438 if (panel_browser_view_->panel()->IsDrawingAttention()) 438 if (panel_browser_view_->panel()->IsDrawingAttention())
439 paint_state = PAINT_FOR_ATTENTION; 439 paint_state = PAINT_FOR_ATTENTION;
440 else if (panel_browser_view_->focused()) 440 else if (panel_browser_view_->focused() &&
441 !panel_browser_view_->force_to_paint_as_inactive())
441 paint_state = PAINT_AS_ACTIVE; 442 paint_state = PAINT_AS_ACTIVE;
442 else 443 else
443 paint_state = PAINT_AS_INACTIVE; 444 paint_state = PAINT_AS_INACTIVE;
444 445
445 UpdateControlStyles(paint_state); 446 UpdateControlStyles(paint_state);
446 PaintFrameBackground(canvas); 447 PaintFrameBackground(canvas);
447 PaintFrameEdge(canvas); 448 PaintFrameEdge(canvas);
448 PaintClientEdge(canvas); 449 PaintClientEdge(canvas);
449 } 450 }
450 451
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
797 } 798 }
798 799
799 bool PanelBrowserFrameView::CanResize() const { 800 bool PanelBrowserFrameView::CanResize() const {
800 return panel_browser_view_->panel()->CanResizeByMouse() != 801 return panel_browser_view_->panel()->CanResizeByMouse() !=
801 panel::NOT_RESIZABLE; 802 panel::NOT_RESIZABLE;
802 } 803 }
803 804
804 bool PanelBrowserFrameView::IsShowingTitlebarOnly() const { 805 bool PanelBrowserFrameView::IsShowingTitlebarOnly() const {
805 return height() <= kTitlebarHeight; 806 return height() <= kTitlebarHeight;
806 } 807 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/panel.cc ('k') | chrome/browser/ui/panels/panel_browser_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698