OLD | NEW |
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 "ash/wm/frame_painter.h" | 5 #include "ash/wm/frame_painter.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/shell_window_ids.h" | 8 #include "ash/shell_window_ids.h" |
9 #include "ash/wm/window_util.h" | 9 #include "ash/wm/window_util.h" |
10 #include "base/logging.h" // DCHECK | 10 #include "base/logging.h" // DCHECK |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 canvas->DrawPath(path, *paint); | 112 canvas->DrawPath(path, *paint); |
113 canvas->sk_canvas()->translate(SkIntToScalar(bitmap_offset_x), 0); | 113 canvas->sk_canvas()->translate(SkIntToScalar(bitmap_offset_x), 0); |
114 } | 114 } |
115 | 115 |
116 // Returns true if |window| is a visible, normal window. | 116 // Returns true if |window| is a visible, normal window. |
117 bool IsVisibleNormalWindow(aura::Window* window) { | 117 bool IsVisibleNormalWindow(aura::Window* window) { |
118 // We must use TargetVisibility() because windows animate in and out and | 118 // We must use TargetVisibility() because windows animate in and out and |
119 // IsVisible() also tracks the layer visibility state. | 119 // IsVisible() also tracks the layer visibility state. |
120 return window && | 120 return window && |
121 window->TargetVisibility() && | 121 window->TargetVisibility() && |
122 window->type() == aura::client::WINDOW_TYPE_NORMAL; | 122 (window->type() == aura::client::WINDOW_TYPE_NORMAL || |
| 123 window->type() == aura::client::WINDOW_TYPE_PANEL); |
123 } | 124 } |
124 | 125 |
125 } // namespace | 126 } // namespace |
126 | 127 |
127 namespace ash { | 128 namespace ash { |
128 | 129 |
129 // static | 130 // static |
130 int FramePainter::kActiveWindowOpacity = 230; // "Linus-approved" values | 131 int FramePainter::kActiveWindowOpacity = 230; // "Linus-approved" values |
131 int FramePainter::kInactiveWindowOpacity = 204; | 132 int FramePainter::kInactiveWindowOpacity = 204; |
132 int FramePainter::kSoloWindowOpacity = 51; | 133 int FramePainter::kSoloWindowOpacity = 51; |
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
589 for (std::set<FramePainter*>::const_iterator it = instances_->begin(); | 590 for (std::set<FramePainter*>::const_iterator it = instances_->begin(); |
590 it != instances_->end(); | 591 it != instances_->end(); |
591 ++it) { | 592 ++it) { |
592 FramePainter* painter = *it; | 593 FramePainter* painter = *it; |
593 if (IsVisibleNormalWindow(painter->window_)) | 594 if (IsVisibleNormalWindow(painter->window_)) |
594 painter->frame_->non_client_view()->SchedulePaint(); | 595 painter->frame_->non_client_view()->SchedulePaint(); |
595 } | 596 } |
596 } | 597 } |
597 | 598 |
598 } // namespace ash | 599 } // namespace ash |
OLD | NEW |