ui_element_delegate.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. // Copyright 2017 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. #ifndef COMPONENTS_UI_DEVTOOLS_UI_ELEMENT_DELEGATE_H_
  5. #define COMPONENTS_UI_DEVTOOLS_UI_ELEMENT_DELEGATE_H_
  6. namespace ui_devtools {
  7. class UIElement;
  8. class UIElementDelegate {
  9. public:
  10. UIElementDelegate() {}
  11. UIElementDelegate(const UIElementDelegate&) = delete;
  12. UIElementDelegate& operator=(const UIElementDelegate&) = delete;
  13. virtual ~UIElementDelegate() {}
  14. virtual void OnUIElementAdded(UIElement* parent, UIElement* child) = 0;
  15. // Move |child| to different sibling index under |parent| in DOM tree.
  16. virtual void OnUIElementReordered(UIElement* parent, UIElement* child) = 0;
  17. // Remove ui_element in DOM tree.
  18. virtual void OnUIElementRemoved(UIElement* ui_element) = 0;
  19. // Update CSS agent when bounds change.
  20. virtual void OnUIElementBoundsChanged(UIElement* ui_element) = 0;
  21. };
  22. } // namespace ui_devtools
  23. #endif // COMPONENTS_UI_DEVTOOLS_UI_ELEMENT_DELEGATE_H_