dom_agent_views.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. // Copyright 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. #ifndef COMPONENTS_UI_DEVTOOLS_VIEWS_DOM_AGENT_VIEWS_H_
  5. #define COMPONENTS_UI_DEVTOOLS_VIEWS_DOM_AGENT_VIEWS_H_
  6. #include "components/ui_devtools/dom.h"
  7. #include "components/ui_devtools/dom_agent.h"
  8. namespace ui_devtools {
  9. class DOMAgentViews : public DOMAgent {
  10. public:
  11. DOMAgentViews(const DOMAgentViews&) = delete;
  12. DOMAgentViews& operator=(const DOMAgentViews&) = delete;
  13. ~DOMAgentViews() override;
  14. static std::unique_ptr<DOMAgentViews> Create();
  15. protected:
  16. DOMAgentViews();
  17. virtual std::unique_ptr<protocol::DOM::Node> BuildTreeForWindow(
  18. UIElement* window_element_root) = 0;
  19. std::unique_ptr<protocol::DOM::Node> BuildTreeForRootWidget(
  20. UIElement* widget_element);
  21. std::unique_ptr<protocol::DOM::Node> BuildTreeForView(
  22. UIElement* view_element);
  23. std::unique_ptr<protocol::DOM::Node> BuildTreeForUIElement(
  24. UIElement* ui_element) override;
  25. };
  26. } // namespace ui_devtools
  27. #endif // COMPONENTS_UI_DEVTOOLS_VIEWS_DOM_AGENT_VIEWS_H_