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

Unified Diff: ui/views/widget/widget_observer.h

Issue 10834079: views: Extract Widget observer into its own header file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 | « ui/views/widget/widget.cc ('k') | ui/views/widget/widget_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/widget_observer.h
diff --git a/ui/views/widget/widget_observer.h b/ui/views/widget/widget_observer.h
new file mode 100644
index 0000000000000000000000000000000000000000..ba9539ed1ff3f25bb150350615d45d998423ba79
--- /dev/null
+++ b/ui/views/widget/widget_observer.h
@@ -0,0 +1,31 @@
+// Copyright (c) 2012 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_WIDGET_WIDGET_OBSERVER_H_
+#define UI_VIEWS_WIDGET_WIDGET_OBSERVER_H_
+
+#include "ui/views/views_export.h"
+
+namespace views {
+
+class Widget;
+
+// Observers can listen to various events on the Widgets.
+class VIEWS_EXPORT WidgetObserver {
+ public:
+ virtual void OnWidgetClosing(Widget* widget) {}
+
+ virtual void OnWidgetVisibilityChanged(Widget* widget, bool visible) {}
+
+ virtual void OnWidgetActivationChanged(Widget* widget, bool active) {}
+
+ virtual void OnWidgetMoved(Widget* widget) {}
+
+ protected:
+ virtual ~WidgetObserver() {}
+};
+
+} // namespace views
+
+#endif // UI_VIEWS_WIDGET_WIDGET_OBSERVER_H_
« no previous file with comments | « ui/views/widget/widget.cc ('k') | ui/views/widget/widget_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698