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

Unified Diff: views/widget/widget.cc

Issue 8351042: Gets disable inactive frame rendering to work correctly for aura. This (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tweaks Created 9 years, 2 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
Index: views/widget/widget.cc
diff --git a/views/widget/widget.cc b/views/widget/widget.cc
index 6670fe84443ed67296c56ee46ea0c1e4563eef82..5b305c41736450597877828f416eae51a82b78e9 100644
--- a/views/widget/widget.cc
+++ b/views/widget/widget.cc
@@ -534,9 +534,7 @@ bool Widget::IsActive() const {
}
void Widget::DisableInactiveRendering() {
- disable_inactive_rendering_ = true;
- if (non_client_view_)
- non_client_view_->DisableInactiveRendering(disable_inactive_rendering_);
+ SetInactiveRenderingDisabled(true);
}
void Widget::SetAlwaysOnTop(bool on_top) {
@@ -849,9 +847,7 @@ bool Widget::IsInactiveRenderingDisabled() const {
}
void Widget::EnableInactiveRendering() {
- disable_inactive_rendering_ = false;
- if (non_client_view_)
- non_client_view_->DisableInactiveRendering(false);
+ SetInactiveRenderingDisabled(false);
}
void Widget::OnNativeWidgetActivationChanged(bool active) {
@@ -1113,6 +1109,16 @@ bool Widget::ShouldReleaseCaptureOnMouseReleased() const {
return true;
}
+void Widget::SetInactiveRenderingDisabled(bool value) {
+ if (value == disable_inactive_rendering_)
+ return;
+
+ disable_inactive_rendering_ = value;
+ if (non_client_view_)
+ non_client_view_->SetInactiveRenderingDisabled(value);
+ native_widget_->SetInactiveRenderingDisabled(value);
+}
+
void Widget::SaveWindowPlacement() {
// The window delegate does the actual saving for us. It seems like (judging
// by go/crash) that in some circumstances we can end up here after

Powered by Google App Engine
This is Rietveld 408576698