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

Unified Diff: ui/views/fill_attribute.cc

Issue 2230913003: Experimental alignment layout manager using a property on the views Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Renamed AlignAttribute and associated types to FillAttribute Created 4 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
« no previous file with comments | « ui/views/fill_attribute.h ('k') | ui/views/layout/align_layout.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/fill_attribute.cc
diff --git a/ui/views/fill_attribute.cc b/ui/views/fill_attribute.cc
new file mode 100644
index 0000000000000000000000000000000000000000..50b86d737904e76d22e7b09dbaa68bdd2ea890fb
--- /dev/null
+++ b/ui/views/fill_attribute.cc
@@ -0,0 +1,26 @@
+// Copyright (c) 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ui/views/fill_attribute.h"
+#include "ui/views/anchor_attribute.h"
+
+namespace views {
+
+AttributeId FillAttribute::Identity() const {
+ return GetAttributeId<FillAttribute>();
+}
+
+void FillAttribute::SetFill(Fill fill) {
+ if (this->fill() != fill) {
+ this->GetContent() = fill;
+ View *view = this->view();
+ if (view) {
+ AnchorAttribute *anchors = nullptr;
+ if (view->attributes().Find(anchors))
+ anchors->Notification(Attribute::NotifyType::AttributeAdded, this);
+ }
+ }
+}
+
+} // namespace views
« no previous file with comments | « ui/views/fill_attribute.h ('k') | ui/views/layout/align_layout.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698