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

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

Issue 2526103002: Add live updates for AshDevToolsCSSAgent (Closed)
Patch Set: Override enable/disable methods to attach/detach observer to DOMAgent Created 4 years, 1 month 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_css_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_css_agent.h
diff --git a/ash/common/devtools/ash_devtools_css_agent.h b/ash/common/devtools/ash_devtools_css_agent.h
index c957da51e3e151bf025b9a7cd106a0e094e7874d..342f21071ac575ee4bd020c42cb147fceee2f66d 100644
--- a/ash/common/devtools/ash_devtools_css_agent.h
+++ b/ash/common/devtools/ash_devtools_css_agent.h
@@ -7,26 +7,36 @@
#include "ash/common/devtools/ash_devtools_dom_agent.h"
#include "components/ui_devtools/CSS.h"
+#include "ui/views/widget/widget_observer.h"
namespace ash {
namespace devtools {
class ASH_EXPORT AshDevToolsCSSAgent
: public NON_EXPORTED_BASE(ui::devtools::UiDevToolsBaseAgent<
- ui::devtools::protocol::CSS::Metainfo>) {
+ ui::devtools::protocol::CSS::Metainfo>),
+ public AshDevToolsDOMAgentObserver {
public:
explicit AshDevToolsCSSAgent(AshDevToolsDOMAgent* dom_agent);
~AshDevToolsCSSAgent() override;
// CSS::Backend
+ ui::devtools::protocol::Response enable() override;
+ ui::devtools::protocol::Response disable() override;
ui::devtools::protocol::Response getMatchedStylesForNode(
- int nodeId,
+ int node_id,
ui::devtools::protocol::Maybe<ui::devtools::protocol::CSS::CSSStyle>*
- inlineStyle) override;
+ inline_style) override;
+
+ // AshDevToolsDOMAgentObserver
+ void OnWindowBoundsChanged(WmWindow* window) override;
+ void OnWidgetBoundsChanged(views::Widget* widget) override;
+ void OnViewBoundsChanged(views::View* view) override;
private:
std::unique_ptr<ui::devtools::protocol::CSS::CSSStyle> GetStylesForNode(
- int nodeId);
+ int node_id);
+ void InvalidateStyleSheet(int node_id);
AshDevToolsDOMAgent* dom_agent_;
« no previous file with comments | « no previous file | ash/common/devtools/ash_devtools_css_agent.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698