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

Side by Side Diff: ui/views/devtools_observer.h

Issue 2500623002: Add ViewObserver to View for view updates (Closed)
Patch Set: Ensure single call of OnViewHierarchyChanged 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
« no previous file with comments | « ui/views/BUILD.gn ('k') | ui/views/view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved.
sadrul 2016/11/18 19:07:51 No (c)
Sarmad Hashmi 2016/11/19 00:29:51 Done.
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 // Called whenever target |view| is being moved. If |old_parent| is NULL,
21 // the target is being added. If the |new_parent| is NULL, then the target
22 // is being removed.
23 virtual void OnViewHierarchyChanged(View* target,
24 View* old_parent,
25 View* new_parent) {}
26
27 virtual void OnViewVisibilityChanged(View* view, bool visible) {}
28
29 virtual void OnViewEnabledChanged(View* view, int index) {}
30
31 virtual void OnViewBoundsChanged(View* view, const gfx::Rect& new_bounds) {}
32
33 // Invoked whenever a child is moved to another index. This is called on the
34 // parent view. |view| is the child view being reordered to the index.
35 virtual void OnChildViewReordered(View* view, int index) {}
36
37 protected:
38 virtual ~DevToolsObserver() {}
39 };
40
41 } // namespace views
42
43 #endif // UI_VIEWS_DEVTOOLS_OBSERVER_H_
OLDNEW
« no previous file with comments | « ui/views/BUILD.gn ('k') | ui/views/view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698