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

Unified Diff: ui/aura_shell/shell.h

Issue 8247012: Positions the launcher in the bottom left corner. Adds ShellDelegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix TestDesktopDelegate Created 9 years, 2 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
Index: ui/aura_shell/shell.h
diff --git a/ui/aura_shell/shell.h b/ui/aura_shell/shell.h
index 879bc35463a13a2190f9e66bcdbabfec2ebaf16d..55c0b7a5d397210d0b7619dd1e023f6116670131 100644
--- a/ui/aura_shell/shell.h
+++ b/ui/aura_shell/shell.h
@@ -6,6 +6,7 @@
#define UI_AURA_SHELL_SHELL_H_
#pragma once
+#include <map>
#include <utility>
#include <vector>
@@ -16,7 +17,6 @@
#include "base/memory/weak_ptr.h"
#include "ui/aura/desktop_delegate.h"
#include "ui/aura_shell/aura_shell_export.h"
-#include "views/controls/button/button.h"
namespace aura {
class Window;
@@ -24,19 +24,14 @@ class Window;
namespace gfx {
class Rect;
}
-namespace views {
-class ImageButton;
-}
namespace aura_shell {
-class LauncherModel;
class ShellDelegate;
// Shell is a singleton object that presents the Shell API and implements the
// Desktop's delegate interface.
-class AURA_SHELL_EXPORT Shell : public aura::DesktopDelegate,
- public views::ButtonListener {
+class AURA_SHELL_EXPORT Shell : public aura::DesktopDelegate {
public:
// Upon creation, the Shell sets itself as the Desktop's delegate, which takes
// ownership of the Shell.
@@ -49,6 +44,7 @@ class AURA_SHELL_EXPORT Shell : public aura::DesktopDelegate,
// Sets the delegate. Shell owns its delegate.
void SetDelegate(ShellDelegate* delegate);
+ ShellDelegate* delegate() { return delegate_.get(); }
aura::Window* GetContainer(int container_id);
const aura::Window* GetContainer(int container_id) const;
@@ -59,16 +55,12 @@ class AURA_SHELL_EXPORT Shell : public aura::DesktopDelegate,
private:
typedef std::pair<aura::Window*, gfx::Rect> WindowAndBoundsPair;
- void InitLauncherModel();
-
// Overridden from aura::DesktopDelegate:
virtual void AddChildToDefaultParent(aura::Window* window) OVERRIDE;
virtual aura::Window* GetTopmostWindowToActivate(
aura::Window* ignore) const OVERRIDE;
-
- // Overriden from views::ButtonListener:
- virtual void ButtonPressed(views::Button* sender,
- const views::Event& event) OVERRIDE;
+ virtual void WindowAdded(aura::Window* window) OVERRIDE;
+ virtual void WillRemoveWindow(aura::Window* window) OVERRIDE;
static Shell* instance_;
@@ -76,10 +68,6 @@ class AURA_SHELL_EXPORT Shell : public aura::DesktopDelegate,
base::WeakPtrFactory<Shell> method_factory_;
- scoped_ptr<LauncherModel> launcher_model_;
- views::ImageButton* new_browser_button_;
- views::ImageButton* show_apps_button_;
-
scoped_ptr<ShellDelegate> delegate_;
DISALLOW_COPY_AND_ASSIGN(Shell);

Powered by Google App Engine
This is Rietveld 408576698