Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(58)

Unified Diff: ash/common/devtools/ash_devtools_dom_agent.h

Issue 2542243002: Add hovering feature to AshDevToolsDOMAgent (Closed)
Patch Set: Mask colors when converting RGBA to SkColor Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ash/common/devtools/ash_devtools_dom_agent.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..194dc66fbe27c4bfe29a6b9efa48d2b5715306fc 100644
--- a/ash/common/devtools/ash_devtools_dom_agent.h
+++ b/ash/common/devtools/ash_devtools_dom_agent.h
@@ -35,13 +35,18 @@ class ASH_EXPORT AshDevToolsDOMAgent
public views::WidgetRemovalsObserver,
public views::ViewObserver {
public:
- explicit AshDevToolsDOMAgent(ash::WmShell* shell);
+ AshDevToolsDOMAgent(ash::WmShell* shell);
~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 +112,23 @@ 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(const WindowAndBoundsPair& window_and_bounds,
+ SkColor background,
+ SkColor border);
+ ui::devtools::protocol::Response 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_;
ash::WmShell* shell_;
using WindowToNodeIdMap = std::unordered_map<WmWindow*, int>;
« no previous file with comments | « no previous file | ash/common/devtools/ash_devtools_dom_agent.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698