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

Unified Diff: ui/views/devtools_observer.h

Issue 2500623002: Add ViewObserver to View for view updates (Closed)
Patch Set: Add DevToolsobserver to View for view updates 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 | « ui/views/BUILD.gn ('k') | ui/views/view.h » ('j') | ui/views/view.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/devtools_observer.h
diff --git a/ui/views/devtools_observer.h b/ui/views/devtools_observer.h
new file mode 100644
index 0000000000000000000000000000000000000000..3c6169ab1807c766e042536949d6431a0fe2d73b
--- /dev/null
+++ b/ui/views/devtools_observer.h
@@ -0,0 +1,42 @@
+// Copyright (c) 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_VIEWS_DEVTOOLS_OBSERVER_H_
+#define UI_VIEWS_DEVTOOLS_OBSERVER_H_
+
+#include "ui/views/view.h"
+#include "ui/views/views_export.h"
+
+namespace gfx {
+class Rect;
+}
+
+namespace views {
+
+// DevTools specific observer for View changes.
+class VIEWS_EXPORT DevToolsObserver {
+ public:
+ // |view| is not necessarily the target view, but the |view|
+ // that had ViewHierarchyChanged called on it.
+ virtual void OnViewHierarchyChanged(
+ View* view,
+ const View::ViewHierarchyChangedDetails& details) {}
+
+ virtual void OnViewVisibilityChanged(View* widget, bool visible) {}
+
+ virtual void OnViewEnabledChanged(View* view, int index) {}
+
+ virtual void OnViewBoundsChanged(View* widget, const gfx::Rect& new_bounds) {}
+
+ // Invoked whenever a child is moved to another index. This is called on the
+ // parent view. |view| is the child view being reordered to the index.
+ virtual void OnChildViewReordered(View* view, int index) {}
+
+ protected:
+ virtual ~DevToolsObserver() {}
+};
+
+} // namespace views
+
+#endif // UI_VIEWS_DEVTOOLS_OBSERVER_H_
« no previous file with comments | « ui/views/BUILD.gn ('k') | ui/views/view.h » ('j') | ui/views/view.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698