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

Unified Diff: ui/views/window/non_client_view.cc

Issue 99553008: Fix regression where the active window header was not used for apps on CrOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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 side-by-side diff with in-line comments
Download patch
« ui/views/window/non_client_view.h ('K') | « ui/views/window/non_client_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/window/non_client_view.cc
diff --git a/ui/views/window/non_client_view.cc b/ui/views/window/non_client_view.cc
index fbdbce21ba7f7efa343857a7be3f3846fe1c71eb..ba124984741b3eef41352061e6b895a0789e091e 100644
--- a/ui/views/window/non_client_view.cc
+++ b/ui/views/window/non_client_view.cc
@@ -232,12 +232,19 @@ views::View* NonClientView::GetTooltipHandlerForPoint(const gfx::Point& point) {
////////////////////////////////////////////////////////////////////////////////
// NonClientFrameView, public:
+NonClientFrameView::~NonClientFrameView() {
+}
+
void NonClientFrameView::SetInactiveRenderingDisabled(bool disable) {
- if (paint_as_active_ == disable)
+ if (inactive_rendering_disabled_ == disable)
return;
- paint_as_active_ = disable;
- ShouldPaintAsActiveChanged();
+ inactive_rendering_disabled_ = disable;
+ SchedulePaint();
sky 2014/01/06 19:13:49 Is this only necessary if !active?
+}
+
+bool NonClientFrameView::ShouldPaintAsActive() const {
+ return GetWidget()->IsActive() || inactive_rendering_disabled_;
sadrul 2014/01/03 17:59:51 We trigger SchedulePaint() when |inactive_renderin
pkotwicz 2014/01/03 20:57:16 Yes, NativeWidgetAura::OnWindowActivated() does th
sky 2014/01/06 19:13:49 nit: check inactive_rendering_disabled_ first (it'
}
int NonClientFrameView::GetHTComponentForFrame(const gfx::Point& point,
@@ -301,14 +308,6 @@ bool NonClientFrameView::HitTestRect(const gfx::Rect& rect) const {
////////////////////////////////////////////////////////////////////////////////
// NonClientFrameView, protected:
-bool NonClientFrameView::ShouldPaintAsActive() const {
- return GetWidget()->IsActive() || paint_as_active_;
-}
-
-void NonClientFrameView::ShouldPaintAsActiveChanged() {
- SchedulePaint();
-}
-
void NonClientFrameView::GetAccessibleState(ui::AccessibleViewState* state) {
state->role = ui::AccessibilityTypes::ROLE_CLIENT;
}
@@ -322,4 +321,7 @@ void NonClientFrameView::OnBoundsChanged(const gfx::Rect& previous_bounds) {
// FrameView when it is itself laid out, see comment in NonClientView::Layout.
}
+NonClientFrameView::NonClientFrameView() : inactive_rendering_disabled_(false) {
+}
+
} // namespace views
« ui/views/window/non_client_view.h ('K') | « ui/views/window/non_client_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698