OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "ui/views/fill_attribute.h" |
| 6 #include "ui/views/anchor_attribute.h" |
| 7 |
| 8 namespace views { |
| 9 |
| 10 AttributeId FillAttribute::Identity() const { |
| 11 return GetAttributeId<FillAttribute>(); |
| 12 } |
| 13 |
| 14 void FillAttribute::SetFill(Fill fill) { |
| 15 if (this->fill() != fill) { |
| 16 this->GetContent() = fill; |
| 17 View *view = this->view(); |
| 18 if (view) { |
| 19 AnchorAttribute *anchors = nullptr; |
| 20 if (view->attributes().Find(anchors)) |
| 21 anchors->Notification(Attribute::NotifyType::AttributeAdded, this); |
| 22 } |
| 23 } |
| 24 } |
| 25 |
| 26 } // namespace views |
OLD | NEW |