summaryrefslogtreecommitdiffstats
path: root/ui/aura_shell/examples/aura_shell_main.cc
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-11 19:42:24 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-11 19:42:24 +0000
commit2b99f8c694b33c716cd99ff89619eeae0d7c5abc (patch)
tree64ad774abf18ff65e9a7899cc227475fe3bdc9cf /ui/aura_shell/examples/aura_shell_main.cc
parent76b77002a7fa5d9c77f1d0765b433251003da9b1 (diff)
downloadchromium_src-2b99f8c694b33c716cd99ff89619eeae0d7c5abc.zip
chromium_src-2b99f8c694b33c716cd99ff89619eeae0d7c5abc.tar.gz
chromium_src-2b99f8c694b33c716cd99ff89619eeae0d7c5abc.tar.bz2
Some launcher tweaks:
. Creates a model for the launcher. . Makes the launcher support laying out and calculating a preferred size. . Adds a ShellDelegate class that is used for interesting things. BUG=97262 TEST=none R=ben@chromium.org Review URL: http://codereview.chromium.org/8220030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104943 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/aura_shell/examples/aura_shell_main.cc')
-rw-r--r--ui/aura_shell/examples/aura_shell_main.cc25
1 files changed, 24 insertions, 1 deletions
diff --git a/ui/aura_shell/examples/aura_shell_main.cc b/ui/aura_shell/examples/aura_shell_main.cc
index b556ffa..0c06b79 100644
--- a/ui/aura_shell/examples/aura_shell_main.cc
+++ b/ui/aura_shell/examples/aura_shell_main.cc
@@ -8,11 +8,34 @@
#include "base/memory/scoped_ptr.h"
#include "base/message_loop.h"
#include "ui/aura/desktop.h"
+#include "ui/aura_shell/examples/toplevel_window.h"
#include "ui/aura_shell/shell.h"
+#include "ui/aura_shell/shell_delegate.h"
#include "ui/aura_shell/shell_factory.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/ui_base_paths.h"
+namespace {
+
+class ShellDelegateImpl : public aura_shell::ShellDelegate {
+ public:
+ ShellDelegateImpl() {
+ }
+
+ virtual void CreateNewWindow() OVERRIDE {
+ aura_shell::examples::ToplevelWindow::CreateParams create_params;
+ create_params.can_resize = true;
+ create_params.can_maximize = true;
+ aura_shell::examples::ToplevelWindow::CreateToplevelWindow(create_params);
+ }
+
+ virtual void ShowApps() OVERRIDE {
+ NOTIMPLEMENTED();
+ }
+};
+
+} // namesapce
+
int main(int argc, char** argv) {
CommandLine::Init(argc, argv);
@@ -26,7 +49,7 @@ int main(int argc, char** argv) {
// Create the message-loop here before creating the desktop.
MessageLoop message_loop(MessageLoop::TYPE_UI);
- aura_shell::Shell::GetInstance();
+ aura_shell::Shell::GetInstance()->SetDelegate(new ShellDelegateImpl);;
aura_shell::examples::InitWindowTypeLauncher();