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

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

Issue 696063008: Refactor ShellDesktopController and ShellNativeAppWindow to allow for non-aura implementations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: + Created 6 years, 1 month 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/desktop_controller.h
diff --git a/extensions/shell/browser/desktop_controller.h b/extensions/shell/browser/desktop_controller.h
index 40a4e537e8ab2f0395953d6de56a7be27ff89719..84e02fea1a0f13af6363ca79b7d8de00d9eaa6d4 100644
--- a/extensions/shell/browser/desktop_controller.h
+++ b/extensions/shell/browser/desktop_controller.h
@@ -5,6 +5,8 @@
#ifndef EXTENSIONS_SHELL_BROWSER_DESKTOP_CONTROLLER_H_
#define EXTENSIONS_SHELL_BROWSER_DESKTOP_CONTROLLER_H_
+#include "ui/gfx/native_widget_types.h"
+
namespace aura {
class Window;
class WindowTreeHost;
@@ -14,14 +16,19 @@ namespace content {
class BrowserContext;
}
+namespace gfx {
+class Size;
+}
+
namespace extensions {
class AppWindow;
class Extension;
class ShellAppWindow;
// DesktopController is an interface to construct the window environment in
-// extensions shell. ShellDesktopController provides a default implementation
-// for app_shell, and embedder (such as athena) can provide its own.
+// extensions shell. ShellDesktopControllerAura provides a default
+// implementation for app_shell, and other embedders (such as athena) can
+// provide their own.
// TODO(jamescook|oshima): Clean up this interface now that there is only one
// way to create an app window.
class DesktopController {
@@ -34,8 +41,9 @@ class DesktopController {
// we need a singleton somewhere).
static DesktopController* instance();
- // Returns the WindowTreeHost created by this DesktopController.
- virtual aura::WindowTreeHost* GetHost() = 0;
+ // Get the size of the window created by this DesktopController. This should
+ // typically be full-screen.
+ virtual gfx::Size GetWindowSize() = 0;
// Creates a new app window and adds it to the desktop. The desktop maintains
// ownership of the window. The window must be closed before |extension| is
@@ -44,7 +52,7 @@ class DesktopController {
const Extension* extension) = 0;
// Attaches the window to our window hierarchy.
- virtual void AddAppWindow(aura::Window* window) = 0;
+ virtual void AddAppWindow(gfx::NativeWindow window) = 0;
// Removes the window from the desktop.
virtual void RemoveAppWindow(AppWindow* window) = 0;
« no previous file with comments | « extensions/shell/browser/default_shell_browser_main_delegate.cc ('k') | extensions/shell/browser/shell_app_window_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698