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

Unified Diff: ui/views/widget/desktop_layout_manager.h

Issue 10941040: linux_aura: Make combo boxes work with DesktopRootWindowHostLinux. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move the DesktopLayoutManager to ui/views/ Created 8 years, 3 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
« no previous file with comments | « ui/views/views.gyp ('k') | ui/views/widget/desktop_layout_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/desktop_layout_manager.h
diff --git a/ash/wm/root_window_layout_manager.h b/ui/views/widget/desktop_layout_manager.h
similarity index 54%
copy from ash/wm/root_window_layout_manager.h
copy to ui/views/widget/desktop_layout_manager.h
index 708e306b75b24b1e693cf303e85eb8031fbbe769..f6795d0e3f6a8fa27a0540439d1dc77586576e0c 100644
--- a/ash/wm/root_window_layout_manager.h
+++ b/ui/views/widget/desktop_layout_manager.h
@@ -2,37 +2,27 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef ASH_WM_ROOT_WINDOW_LAYOUT_MANAGER_H_
-#define ASH_WM_ROOT_WINDOW_LAYOUT_MANAGER_H_
+#ifndef UI_VIEWS_WIDGET_DESKTOP_LAYOUT_MANAGER_H_
+#define UI_VIEWS_WIDGET_DESKTOP_LAYOUT_MANAGER_H_
-#include "ash/shell_window_ids.h"
#include "base/basictypes.h"
#include "base/compiler_specific.h"
-#include "base/memory/scoped_ptr.h"
#include "ui/aura/layout_manager.h"
+#include "ui/views/views_export.h"
namespace aura {
+class RootWindow;
class Window;
}
-namespace gfx {
-class Rect;
-}
-namespace ui {
-class Layer;
-}
-namespace views {
-class Widget;
-}
-namespace ash {
-namespace internal {
+namespace views {
-// A layout manager for the root window.
-// Resizes all of its immediate children to fill the bounds of the root window.
-class RootWindowLayoutManager : public aura::LayoutManager {
+// A LayoutManager that by default makes the first Window added to a
+// RootWindow the full size, and will be resized as the RootWindow is resized.
+class VIEWS_EXPORT DesktopLayoutManager : public aura::LayoutManager {
public:
- explicit RootWindowLayoutManager(aura::Window* owner);
- virtual ~RootWindowLayoutManager();
+ explicit DesktopLayoutManager(aura::RootWindow* root_window);
+ virtual ~DesktopLayoutManager();
// Overridden from aura::LayoutManager:
virtual void OnWindowResized() OVERRIDE;
@@ -45,12 +35,15 @@ class RootWindowLayoutManager : public aura::LayoutManager {
const gfx::Rect& requested_bounds) OVERRIDE;
private:
- aura::Window* owner_;
+ // Sets the size of |main_window_| to the internal bounds of |root_window_|.
+ void SetMainWindowSize();
+
+ aura::RootWindow* root_window_;
+ aura::Window* main_window_;
- DISALLOW_COPY_AND_ASSIGN(RootWindowLayoutManager);
+ DISALLOW_COPY_AND_ASSIGN(DesktopLayoutManager);
};
-} // namespace internal
-} // namespace ash
+} // namespace views
-#endif // ASH_WM_ROOT_WINDOW_LAYOUT_MANAGER_H_
+#endif // UI_VIEWS_WIDGET_DESKTOP_LAYOUT_MANAGER_H_
« no previous file with comments | « ui/views/views.gyp ('k') | ui/views/widget/desktop_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698