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

Unified Diff: ash/wm/frame_painter.cc

Issue 23496024: Introduce RootWindowProperty for RootWindow's properties (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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: ash/wm/frame_painter.cc
diff --git a/ash/wm/frame_painter.cc b/ash/wm/frame_painter.cc
index 31e823260ddb67184584b5f0bd1046a69bbacc73..430fcadb15d5f4f71756d330c76dc53e9ba56ede 100644
--- a/ash/wm/frame_painter.cc
+++ b/ash/wm/frame_painter.cc
@@ -8,6 +8,7 @@
#include "ash/ash_constants.h"
#include "ash/root_window_controller.h"
+#include "ash/root_window_property.h"
#include "ash/shell.h"
#include "ash/shell_window_ids.h"
#include "ash/wm/property_util.h"
@@ -755,7 +756,7 @@ bool FramePainter::UseSoloWindowHeader() const {
return false;
// Don't recompute every time, as it would require many window property
// lookups.
- return root->GetProperty(internal::kSoloWindowHeaderKey);
+ return internal::GetRootWindowProperty(root)->solo_window_header;
}
// static
@@ -794,11 +795,14 @@ void FramePainter::UpdateSoloWindowInRoot(RootWindow* root,
#endif
if (!root)
return;
- bool old_solo_header = root->GetProperty(internal::kSoloWindowHeaderKey);
+ internal::RootWindowProperty* root_window_property =
+ internal::GetRootWindowProperty(root);
+ bool old_solo_header = root_window_property->solo_window_header;
bool new_solo_header = UseSoloWindowHeaderInRoot(root, ignore_window);
if (old_solo_header == new_solo_header)
return;
- root->SetProperty(internal::kSoloWindowHeaderKey, new_solo_header);
+ root_window_property->solo_window_header = new_solo_header;
+
// Invalidate all the window frames in the desktop. There should only be
// a few.
std::vector<Window*> windows = GetWindowsForSoloHeaderUpdate(root);

Powered by Google App Engine
This is Rietveld 408576698