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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef UI_VIEWS_DEVTOOLS_OBSERVER_H_
6 #define UI_VIEWS_DEVTOOLS_OBSERVER_H_
7
8 #include "ui/views/view.h"
9 #include "ui/views/views_export.h"
10
11 namespace gfx {
12 class Rect;
13 }
14
15 namespace views {
16
17 // DevTools specific observer for View changes.
18 class VIEWS_EXPORT DevToolsObserver {
19 public:
20 // |view| is not necessarily the target view, but the |view|
21 // that had ViewHierarchyChanged called on it.
22 virtual void OnViewHierarchyChanged(
23 View* view,
24 const View::ViewHierarchyChangedDetails& details) {}
25
26 virtual void OnViewVisibilityChanged(View* widget, bool visible) {}
27
28 virtual void OnViewEnabledChanged(View* view, int index) {}
29
30 virtual void OnViewBoundsChanged(View* widget, const gfx::Rect& new_bounds) {}
31
32 // Invoked whenever a child is moved to another index. This is called on the
33 // parent view. |view| is the child view being reordered to the index.
34 virtual void OnChildViewReordered(View* view, int index) {}
35
36 protected:
37 virtual ~DevToolsObserver() {}
38 };
39
40 } // namespace views
41
42 #endif // UI_VIEWS_DEVTOOLS_OBSERVER_H_
OLDNEW
« 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