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

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

Issue 2526103002: Add live updates for AshDevToolsCSSAgent (Closed)
Patch Set: 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
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..971524b9ad227cf75f820786a16bf69bc6e0da6b 100644
--- a/ash/common/devtools/ash_devtools_css_agent.h
+++ b/ash/common/devtools/ash_devtools_css_agent.h
@@ -7,13 +7,18 @@
#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 WmWindowObserver,
+ public views::WidgetObserver,
+ public views::ViewObserver {
public:
explicit AshDevToolsCSSAgent(AshDevToolsDOMAgent* dom_agent);
~AshDevToolsCSSAgent() override;
@@ -24,9 +29,30 @@ class ASH_EXPORT AshDevToolsCSSAgent
ui::devtools::protocol::Maybe<ui::devtools::protocol::CSS::CSSStyle>*
inlineStyle) override;
+ // AshDevToolsDOMAgentObserver
+ void OnWindowAdded(WmWindow* window) override;
+ void OnWindowRemoved(WmWindow* window) override;
+ void OnWidgetAdded(views::Widget* widget) override;
+ void OnWidgetRemoved(views::Widget* widget) override;
+ void OnViewAdded(views::View* view) override;
+ void OnViewRemoved(views::View* view) override;
+
+ // WmWindowObserver
+ void OnWindowBoundsChanged(WmWindow* window,
+ const gfx::Rect& old_bounds,
+ const gfx::Rect& new_bounds) override;
+
+ // views::WidgetObserver
+ void OnWidgetBoundsChanged(views::Widget* widget,
+ const gfx::Rect& new_bounds) override;
+
+ // views::ViewObserver
+ void OnViewBoundsChanged(views::View* view) override;
+
private:
std::unique_ptr<ui::devtools::protocol::CSS::CSSStyle> GetStylesForNode(
int nodeId);
+ void InvalidateStyleSheet();
AshDevToolsDOMAgent* dom_agent_;
« no previous file with comments | « no previous file | ash/common/devtools/ash_devtools_css_agent.cc » ('j') | ash/common/devtools/ash_devtools_css_agent.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698