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

Unified Diff: extensions/shell/browser/shell_desktop_controller.h

Issue 480353006: Separate athena's startup process from AppShell's (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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: extensions/shell/browser/shell_desktop_controller.h
diff --git a/extensions/shell/browser/shell_desktop_controller.h b/extensions/shell/browser/shell_desktop_controller.h
index 5d7dc764de210638bfc83fbe9e4993dcef33a7df..6ea981646696522f60f17e0a2b9a96da261e9712 100644
--- a/extensions/shell/browser/shell_desktop_controller.h
+++ b/extensions/shell/browser/shell_desktop_controller.h
@@ -8,6 +8,7 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
+#include "extensions/shell/browser/desktop_controller.h"
#include "ui/aura/client/window_tree_client.h"
#include "ui/aura/window_tree_host_observer.h"
@@ -30,7 +31,6 @@ class BrowserContext;
}
namespace gfx {
-class Insets;
class Size;
}
@@ -43,7 +43,6 @@ class UserActivityPowerManagerNotifier;
namespace wm {
class CompoundEventFilter;
class CursorManager;
-class FocusRules;
class InputMethodEventFilter;
class UserActivityDetector;
}
@@ -54,7 +53,8 @@ class ShellAppWindow;
class ShellAppWindowController;
// Handles desktop-related tasks for app_shell.
-class ShellDesktopController : public aura::client::WindowTreeClient,
+class ShellDesktopController : public DesktopController,
+ public aura::client::WindowTreeClient,
public aura::WindowTreeHostObserver
#if defined(OS_CHROMEOS)
,
@@ -65,29 +65,12 @@ class ShellDesktopController : public aura::client::WindowTreeClient,
ShellDesktopController();
virtual ~ShellDesktopController();
- // Returns the single instance of the desktop. (Stateless functions like
- // ShellAppWindowCreateFunction need to be able to access the desktop, so
- // we need a singleton somewhere).
- static ShellDesktopController* instance();
-
- aura::WindowTreeHost* host() { return host_.get(); }
-
- // Creates the window that hosts the app.
- void CreateRootWindow();
-
- // Sets the controller to create/close the app windows. Takes the ownership of
- // |app_window_controller|.
- void SetAppWindowController(ShellAppWindowController* app_window_controller);
-
- // Creates a new app window and adds it to the desktop. The desktop maintains
- // ownership of the window.
- ShellAppWindow* CreateAppWindow(content::BrowserContext* context);
-
- // Closes and destroys the app windows.
- void CloseAppWindows();
-
- // Sets the screen's work area insets.
- void SetDisplayWorkAreaInsets(const gfx::Insets& insets);
+ // DeskopController:
+ virtual aura::WindowTreeHost* GetHost() OVERRIDE;
+ virtual void CreateRootWindow() OVERRIDE;
+ virtual ShellAppWindow* CreateAppWindow(
+ content::BrowserContext* context) OVERRIDE;
+ virtual void CloseAppWindows() OVERRIDE;
// Overridden from aura::client::WindowTreeClient:
virtual aura::Window* GetDefaultParent(aura::Window* context,
@@ -108,9 +91,6 @@ class ShellDesktopController : public aura::client::WindowTreeClient,
// initialize different sets of the clients.
virtual void InitWindowManager();
- // Creates a focus rule that is to be used in the InitWindowManager.
- virtual wm::FocusRules* CreateFocusRules();
-
private:
// Closes and destroys the root window hosting the app.
void DestroyRootWindow();
@@ -143,7 +123,7 @@ class ShellDesktopController : public aura::client::WindowTreeClient,
#endif
// The desktop supports a single app window.
- scoped_ptr<ShellAppWindowController> app_window_controller_;
+ scoped_ptr<ShellAppWindow> app_window_;
DISALLOW_COPY_AND_ASSIGN(ShellDesktopController);
};

Powered by Google App Engine
This is Rietveld 408576698