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

Unified Diff: ui/views/examples/widget_example.h

Issue 11571023: Move ash/wm's DialogFrameView to ui/views/window; etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reorder DialogDelegate functions; inline Get*Params into WidgetExample::ButtonPressed; etc. Created 8 years 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 | « chrome/browser/ui/views/uninstall_view.cc ('k') | ui/views/examples/widget_example.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/examples/widget_example.h
diff --git a/ui/views/examples/widget_example.h b/ui/views/examples/widget_example.h
index 88a8c4220d5dc7394939f07c08836dc2374e7032..7c3085e02e841c1c8de5eaf101948df42427caf1 100644
--- a/ui/views/examples/widget_example.h
+++ b/ui/views/examples/widget_example.h
@@ -9,7 +9,7 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
-#include "ui/views/controls/button/text_button.h"
+#include "ui/views/controls/button/button.h"
#include "ui/views/examples/example_base.h"
#include "ui/views/widget/widget.h"
@@ -26,23 +26,19 @@ class WidgetExample : public ExampleBase, public ButtonListener {
virtual void CreateExampleView(View* container) OVERRIDE;
private:
+ // Button tags used to identify various commands.
enum Command {
- POPUP,
- CHILD,
- TRANSPARENT_POPUP,
- TRANSPARENT_CHILD,
- CLOSE_WIDGET,
+ POPUP, // Show a popup widget.
+ DIALOG, // Show a dialog widget.
+ CHILD, // Show a child widget.
+ CLOSE_WIDGET, // Close the sender button's widget.
};
+ // Construct a button with the specified |label| and |tag| in |container|.
void BuildButton(View* container, const std::string& label, int tag);
- void InitWidget(Widget* widget, bool transparent);
-
-#if defined(OS_LINUX)
- void CreateChild(View* parent, bool transparent);
-#endif
-
- void CreatePopup(View* parent, bool transparent);
+ // Construct a Widget for |sender|, initialize with |params|, and call Show().
+ void ShowWidget(View* sender, Widget::InitParams params);
// Overridden from ButtonListener:
virtual void ButtonPressed(Button* sender, const ui::Event& event) OVERRIDE;
« no previous file with comments | « chrome/browser/ui/views/uninstall_view.cc ('k') | ui/views/examples/widget_example.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698