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

Unified Diff: athena/util/fill_layout_manager.cc

Issue 697143005: Fills athena background always. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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: athena/util/fill_layout_manager.cc
diff --git a/athena/util/fill_layout_manager.cc b/athena/util/fill_layout_manager.cc
index 8e239a22f50941a61d53bf9cb1b96a1ad8babc89..f0d95a328f8a05ca1db7c3bb594cca5e3ec34925 100644
--- a/athena/util/fill_layout_manager.cc
+++ b/athena/util/fill_layout_manager.cc
@@ -6,19 +6,25 @@
#include "base/logging.h"
#include "ui/aura/window.h"
+#include "ui/aura/window_property.h"
+
+DECLARE_EXPORTED_WINDOW_PROPERTY_TYPE(ATHENA_EXPORT, bool);
namespace athena {
namespace {
// TODO(oshima): Implement real window/layout manager. crbug.com/388362.
bool ShouldFill(aura::Window* window) {
- return window->type() != ui::wm::WINDOW_TYPE_MENU &&
- window->type() != ui::wm::WINDOW_TYPE_TOOLTIP &&
- window->type() != ui::wm::WINDOW_TYPE_POPUP;
+ return window->GetProperty(kAlwaysFillWindowKey) ||
+ (window->type() != ui::wm::WINDOW_TYPE_MENU &&
+ window->type() != ui::wm::WINDOW_TYPE_TOOLTIP &&
+ window->type() != ui::wm::WINDOW_TYPE_POPUP);
}
} // namespace
+DEFINE_WINDOW_PROPERTY_KEY(bool, kAlwaysFillWindowKey, false);
+
FillLayoutManager::FillLayoutManager(aura::Window* container)
: container_(container) {
DCHECK(container_);

Powered by Google App Engine
This is Rietveld 408576698