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

Side by Side Diff: ui/views/widget/widget_observer.h

Issue 851853002: It is time. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Trying to reup because the last upload failed. Created 5 years, 11 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2012 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_WIDGET_WIDGET_OBSERVER_H_
6 #define UI_VIEWS_WIDGET_WIDGET_OBSERVER_H_
7
8 #include "ui/views/views_export.h"
9
10 namespace gfx {
11 class Rect;
12 }
13
14 namespace views {
15
16 class Widget;
17 class View;
18
19 // Observers can listen to various events on the Widgets.
20 class VIEWS_EXPORT WidgetObserver {
21 public:
22 // The closing notification is sent immediately in response to (i.e. in the
23 // same call stack as) a request to close the Widget (via Close() or
24 // CloseNow()).
25 virtual void OnWidgetClosing(Widget* widget) {}
26
27 // Invoked after notification is received from the event loop that the native
28 // widget has been created.
29 virtual void OnWidgetCreated(Widget* widget) {}
30
31 // The destroying event occurs immediately before the widget is destroyed.
32 // This typically occurs asynchronously with respect the the close request, as
33 // a result of a later invocation from the event loop.
34 virtual void OnWidgetDestroying(Widget* widget) {}
35
36 // Invoked after notification is received from the event loop that the native
37 // widget has been destroyed.
38 virtual void OnWidgetDestroyed(Widget* widget) {}
39
40 virtual void OnWidgetVisibilityChanging(Widget* widget, bool visible) {}
41
42 virtual void OnWidgetVisibilityChanged(Widget* widget, bool visible) {}
43
44 virtual void OnWidgetActivationChanged(Widget* widget, bool active) {}
45
46 virtual void OnWidgetBoundsChanged(Widget* widget,
47 const gfx::Rect& new_bounds) {}
48
49 protected:
50 virtual ~WidgetObserver() {}
51 };
52
53 } // namespace views
54
55 #endif // UI_VIEWS_WIDGET_WIDGET_OBSERVER_H_
OLDNEW
« no previous file with comments | « ui/views/widget/widget_interactive_uitest.cc ('k') | ui/views/widget/widget_removals_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698