Chromium Code Reviews| Index: ash/common/devtools/ash_devtools_dom_agent.h |
| diff --git a/ash/common/devtools/ash_devtools_dom_agent.h b/ash/common/devtools/ash_devtools_dom_agent.h |
| index f1f2a6444ef3ca708d9574da0537053098cfa44f..e79fc941516c16c5b2a87a88368520883e88bde7 100644 |
| --- a/ash/common/devtools/ash_devtools_dom_agent.h |
| +++ b/ash/common/devtools/ash_devtools_dom_agent.h |
| @@ -35,13 +35,20 @@ class ASH_EXPORT AshDevToolsDOMAgent |
| public views::WidgetRemovalsObserver, |
| public views::ViewObserver { |
| public: |
| - explicit AshDevToolsDOMAgent(ash::WmShell* shell); |
| + explicit AshDevToolsDOMAgent( |
|
sadrul
2016/12/06 20:48:59
You don't need explicit anymore.
Sarmad Hashmi
2016/12/06 22:54:34
Done.
|
| + ash::WmShell* shell, |
| + scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner); |
| ~AshDevToolsDOMAgent() override; |
| // DOM::Backend |
| ui::devtools::protocol::Response disable() override; |
| ui::devtools::protocol::Response getDocument( |
| std::unique_ptr<ui::devtools::protocol::DOM::Node>* out_root) override; |
| + ui::devtools::protocol::Response highlightNode( |
| + std::unique_ptr<ui::devtools::protocol::DOM::HighlightConfig> |
| + highlight_config, |
| + ui::devtools::protocol::Maybe<int> node_id) override; |
| + ui::devtools::protocol::Response hideHighlight() override; |
| // WindowObserver |
| void OnWindowTreeChanging(WmWindow* window, |
| @@ -107,9 +114,24 @@ class ASH_EXPORT AshDevToolsDOMAgent |
| views::View* parent, |
| bool remove_observer); |
| + void DestroyHighlightingWidget(); |
| void RemoveObservers(); |
| void Reset(); |
| + using WindowAndBoundsPair = std::pair<WmWindow*, gfx::Rect>; |
| + WindowAndBoundsPair GetNodeWindowAndBounds(int node_id); |
| + void InitializeHighlightingWidget(); |
| + void UpdateHighlight(std::pair<WmWindow*, gfx::Rect>, |
|
sadrul
2016/12/06 20:48:59
const WindowAndBoundsPair&
Sarmad Hashmi
2016/12/06 22:54:34
Done.
|
| + SkColor background, |
| + SkColor border); |
| + void HighlightNode( |
| + std::unique_ptr<ui::devtools::protocol::DOM::HighlightConfig> |
| + highlight_config, |
| + int node_id); |
| + bool IsHighlightingWindow(WmWindow* window); |
| + |
| + std::unique_ptr<views::Widget> widget_for_highlighting_; |
| + scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; |
| ash::WmShell* shell_; |
| using WindowToNodeIdMap = std::unordered_map<WmWindow*, int>; |