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

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

Issue 2776543002: Create a unified UIElement interface for Widget, View and Window. (Closed)
Patch Set: . Created 3 years, 9 months 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 | « ash/common/devtools/ash_devtools_css_agent.cc ('k') | 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 758bf63c251f34ca0e82ae283b8e2a5e59b8ce86..c611eb1355935180eb0b56b7649f32f93df32edd 100644
--- a/ash/common/devtools/ash_devtools_dom_agent.h
+++ b/ash/common/devtools/ash_devtools_dom_agent.h
@@ -6,6 +6,7 @@
#define ASH_COMMON_DEVTOOLS_ASH_DEVTOOLS_DOM_AGENT_H_
#include "ash/ash_export.h"
+#include "ash/common/devtools/ui_element.h"
Fady Samuel 2017/03/24 22:36:21 Get rid of this. Include in the cc. Forward decla
#include "base/macros.h"
#include "base/observer_list.h"
#include "components/ui_devtools/DOM.h"
@@ -25,18 +26,12 @@ namespace devtools {
class ASH_EXPORT AshDevToolsDOMAgentObserver {
public:
- virtual void OnWindowBoundsChanged(WmWindow* window) {}
- virtual void OnWidgetBoundsChanged(views::Widget* widget) {}
- virtual void OnViewBoundsChanged(views::View* view) {}
+ virtual void OnUIElementBoundsChanged(UIElement* ui_element);
};
class ASH_EXPORT AshDevToolsDOMAgent
: public NON_EXPORTED_BASE(ui::devtools::UiDevToolsBaseAgent<
- ui::devtools::protocol::DOM::Metainfo>),
- public aura::WindowObserver,
- public views::WidgetObserver,
- public views::WidgetRemovalsObserver,
- public views::ViewObserver {
+ ui::devtools::protocol::DOM::Metainfo>) {
public:
AshDevToolsDOMAgent();
~AshDevToolsDOMAgent() override;
@@ -51,27 +46,6 @@ class ASH_EXPORT AshDevToolsDOMAgent
ui::devtools::protocol::Maybe<int> node_id) override;
ui::devtools::protocol::Response hideHighlight() override;
- // WindowObserver
- void OnWindowHierarchyChanging(const HierarchyChangeParams& params) override;
- void OnWindowHierarchyChanged(const HierarchyChangeParams& params) override;
- void OnWindowStackingChanged(aura::Window* window) override;
- void OnWindowBoundsChanged(aura::Window* window,
- const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) override;
-
- // views::WidgetRemovalsObserver
- void OnWillRemoveView(views::Widget* widget, views::View* view) override;
-
- // views::WidgetObserver
- void OnWidgetBoundsChanged(views::Widget* widget,
- const gfx::Rect& new_bounds) override;
-
- // views::ViewObserver
- void OnChildViewRemoved(views::View* parent, views::View* view) override;
- void OnChildViewAdded(views::View* parent, views::View* view) override;
- void OnChildViewReordered(views::View* parent, views::View*) override;
- void OnViewBoundsChanged(views::View* view) override;
-
WmWindow* GetWindowFromNodeId(int nodeId);
views::Widget* GetWidgetFromNodeId(int nodeId);
views::View* GetViewFromNodeId(int nodeId);
@@ -92,6 +66,11 @@ class ASH_EXPORT AshDevToolsDOMAgent
std::unique_ptr<ui::devtools::protocol::DOM::Node> BuildTreeForView(
views::View* view);
+ void OnWindowHierarchyChanging(
+ const aura::WindowObserver::HierarchyChangeParams& params);
+ void OnWindowHierarchyChanged(
+ const aura::WindowObserver::HierarchyChangeParams& params);
+
void AddWindowTree(WmWindow* window);
// |remove_observer| ensures that we don't add a duplicate observer in any
// observer callback. For example, |remove_observer| is false when rebuilding
« no previous file with comments | « ash/common/devtools/ash_devtools_css_agent.cc ('k') | ash/common/devtools/ash_devtools_dom_agent.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698