| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef ASH_COMMON_DEVTOOLS_ASH_DEVTOOLS_DOM_AGENT_H_ | 5 #ifndef ASH_COMMON_DEVTOOLS_ASH_DEVTOOLS_DOM_AGENT_H_ |
| 6 #define ASH_COMMON_DEVTOOLS_ASH_DEVTOOLS_DOM_AGENT_H_ | 6 #define ASH_COMMON_DEVTOOLS_ASH_DEVTOOLS_DOM_AGENT_H_ |
| 7 | 7 |
| 8 #include "ash/common/wm_shell.h" | 8 #include "ash/common/wm_shell.h" |
| 9 #include "base/compiler_specific.h" |
| 9 #include "components/ui_devtools/DOM.h" | 10 #include "components/ui_devtools/DOM.h" |
| 10 #include "components/ui_devtools/devtools_base_agent.h" | 11 #include "components/ui_devtools/devtools_base_agent.h" |
| 11 | 12 |
| 12 namespace ash { | 13 namespace ash { |
| 13 namespace devtools { | 14 namespace devtools { |
| 14 | 15 |
| 15 class AshDevToolsDOMAgent : public ui::devtools::UiDevToolsBaseAgent< | 16 class ASH_EXPORT AshDevToolsDOMAgent |
| 16 ui::devtools::protocol::DOM::Metainfo> { | 17 : public NON_EXPORTED_BASE(ui::devtools::UiDevToolsBaseAgent< |
| 18 ui::devtools::protocol::DOM::Metainfo>) { |
| 17 public: | 19 public: |
| 18 explicit AshDevToolsDOMAgent(ash::WmShell* shell); | 20 explicit AshDevToolsDOMAgent(ash::WmShell* shell); |
| 19 ~AshDevToolsDOMAgent() override; | 21 ~AshDevToolsDOMAgent() override; |
| 20 | 22 |
| 21 private: | |
| 22 std::unique_ptr<ui::devtools::protocol::DOM::Node> BuildInitialTree(); | |
| 23 | |
| 24 // DOM::Backend | 23 // DOM::Backend |
| 25 ui::devtools::protocol::Response enable() override; | 24 ui::devtools::protocol::Response enable() override; |
| 26 ui::devtools::protocol::Response disable() override; | 25 ui::devtools::protocol::Response disable() override; |
| 27 ui::devtools::protocol::Response getDocument( | 26 ui::devtools::protocol::Response getDocument( |
| 28 std::unique_ptr<ui::devtools::protocol::DOM::Node>* out_root) override; | 27 std::unique_ptr<ui::devtools::protocol::DOM::Node>* out_root) override; |
| 29 | 28 |
| 29 private: |
| 30 std::unique_ptr<ui::devtools::protocol::DOM::Node> BuildInitialTree(); |
| 31 |
| 30 ash::WmShell* shell_; | 32 ash::WmShell* shell_; |
| 31 | 33 |
| 32 DISALLOW_COPY_AND_ASSIGN(AshDevToolsDOMAgent); | 34 DISALLOW_COPY_AND_ASSIGN(AshDevToolsDOMAgent); |
| 33 }; | 35 }; |
| 34 | 36 |
| 35 } // namespace devtools | 37 } // namespace devtools |
| 36 } // namespace ash | 38 } // namespace ash |
| 37 | 39 |
| 38 #endif // ASH_COMMON_DEVTOOLS_ASH_DEVTOOLS_DOM_AGENT_H_ | 40 #endif // ASH_COMMON_DEVTOOLS_ASH_DEVTOOLS_DOM_AGENT_H_ |
| OLD | NEW |