summaryrefslogtreecommitdiffstats
path: root/ash/wm/workspace
diff options
context:
space:
mode:
authorerg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-13 21:09:17 +0000
committererg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-13 21:09:17 +0000
commit1a2145b860591d2e868ab98147ea4f162636d7eb (patch)
tree26a65524e4698ffc4b76eeb3409bbd0fca2ae238 /ash/wm/workspace
parent73238e09cc56e8b1b599ec978bec7bdd7a7730a8 (diff)
downloadchromium_src-1a2145b860591d2e868ab98147ea4f162636d7eb.zip
chromium_src-1a2145b860591d2e868ab98147ea4f162636d7eb.tar.gz
chromium_src-1a2145b860591d2e868ab98147ea4f162636d7eb.tar.bz2
Recommit r125950, which was reverted by r125958 due to link failures on win_aura bot.
Aura/Ash split: Move ScreenAura to aura::RootWindowScreen. What is now aura::RootWindowScreen was tightly bundled with aura::RootWindow. Instead of moving it to ash::ScreenAsh, I renamed it aurea::RootWindowScreen because there's a bunch of unit tests that use RootWindow as if it were the desktop. Screen integration stuff has been moved out of RootWindow (and related observers) and into ash::Shell. BUG=116458 First Review URL: http://codereview.chromium.org/9616045 Review URL: http://codereview.chromium.org/9696008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126464 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/wm/workspace')
-rw-r--r--ash/wm/workspace/workspace_event_filter.cc2
-rw-r--r--ash/wm/workspace/workspace_layout_manager.cc2
-rw-r--r--ash/wm/workspace/workspace_manager.cc4
-rw-r--r--ash/wm/workspace/workspace_manager_unittest.cc6
-rw-r--r--ash/wm/workspace/workspace_window_resizer_unittest.cc8
5 files changed, 11 insertions, 11 deletions
diff --git a/ash/wm/workspace/workspace_event_filter.cc b/ash/wm/workspace/workspace_event_filter.cc
index 84046b9..786c1c5 100644
--- a/ash/wm/workspace/workspace_event_filter.cc
+++ b/ash/wm/workspace/workspace_event_filter.cc
@@ -4,6 +4,7 @@
#include "ash/wm/workspace/workspace_event_filter.h"
+#include "ash/screen_ash.h"
#include "ash/wm/property_util.h"
#include "ash/wm/window_frame.h"
#include "ash/wm/window_util.h"
@@ -11,7 +12,6 @@
#include "ash/wm/workspace/workspace_window_resizer.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/event.h"
-#include "ui/aura/screen_aura.h"
#include "ui/aura/window.h"
#include "ui/aura/window_delegate.h"
#include "ui/base/hit_test.h"
diff --git a/ash/wm/workspace/workspace_layout_manager.cc b/ash/wm/workspace/workspace_layout_manager.cc
index 52c50c4..b984493 100644
--- a/ash/wm/workspace/workspace_layout_manager.cc
+++ b/ash/wm/workspace/workspace_layout_manager.cc
@@ -4,6 +4,7 @@
#include "ash/wm/workspace/workspace_layout_manager.h"
+#include "ash/screen_ash.h"
#include "ash/wm/property_util.h"
#include "ash/wm/window_util.h"
#include "ash/wm/workspace/workspace.h"
@@ -12,7 +13,6 @@
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/event.h"
#include "ui/aura/root_window.h"
-#include "ui/aura/screen_aura.h"
#include "ui/aura/window.h"
#include "ui/aura/window_observer.h"
#include "ui/base/ui_base_types.h"
diff --git a/ash/wm/workspace/workspace_manager.cc b/ash/wm/workspace/workspace_manager.cc
index caf7d93..1aaa8d0 100644
--- a/ash/wm/workspace/workspace_manager.cc
+++ b/ash/wm/workspace/workspace_manager.cc
@@ -6,6 +6,7 @@
#include <algorithm>
+#include "ash/screen_ash.h"
#include "ash/shell.h"
#include "ash/wm/property_util.h"
#include "ash/wm/shelf_layout_manager.h"
@@ -19,7 +20,6 @@
#include "base/stl_util.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/root_window.h"
-#include "ui/aura/screen_aura.h"
#include "ui/aura/window.h"
#include "ui/base/ui_base_types.h"
#include "ui/gfx/compositor/layer.h"
@@ -288,7 +288,7 @@ void WorkspaceManager::SetActiveWorkspace(Workspace* workspace) {
gfx::Rect WorkspaceManager::GetWorkAreaBounds() {
gfx::Rect bounds(workspace_size_);
- bounds.Inset(Shell::GetRootWindow()->screen()->work_area_insets());
+ bounds.Inset(Shell::GetInstance()->screen()->work_area_insets());
return bounds;
}
diff --git a/ash/wm/workspace/workspace_manager_unittest.cc b/ash/wm/workspace/workspace_manager_unittest.cc
index a9312ca..20fa704 100644
--- a/ash/wm/workspace/workspace_manager_unittest.cc
+++ b/ash/wm/workspace/workspace_manager_unittest.cc
@@ -4,6 +4,7 @@
#include "ash/wm/workspace/workspace_manager.h"
+#include "ash/screen_ash.h"
#include "ash/shell.h"
#include "ash/shell_window_ids.h"
#include "ash/test/ash_test_base.h"
@@ -15,7 +16,6 @@
#include "ash/wm/workspace/workspace_layout_manager.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/root_window.h"
-#include "ui/aura/screen_aura.h"
#include "ui/aura/window.h"
#include "ui/base/ui_base_types.h"
#include "ui/gfx/screen.h"
@@ -174,7 +174,7 @@ TEST_F(WorkspaceManagerTest, ResizeMaximizedWindowOnWorkAreaInsetsChange) {
EXPECT_EQ(251, w1->bounds().height());
// Maximize the window.
- Shell::GetRootWindow()->SetScreenWorkAreaInsets(
+ Shell::GetInstance()->SetScreenWorkAreaInsets(
gfx::Insets(0, 0, 30, 0));
w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED);
@@ -187,7 +187,7 @@ TEST_F(WorkspaceManagerTest, ResizeMaximizedWindowOnWorkAreaInsetsChange) {
EXPECT_EQ(GetWorkAreaBounds().height(), w1->bounds().height());
// Change work area insets.
- Shell::GetRootWindow()->SetScreenWorkAreaInsets(
+ Shell::GetInstance()->SetScreenWorkAreaInsets(
gfx::Insets(0, 0, 60, 0));
// Should be 1 workspace, TYPE_MAXIMIZED with w1, fills the changed work
diff --git a/ash/wm/workspace/workspace_window_resizer_unittest.cc b/ash/wm/workspace/workspace_window_resizer_unittest.cc
index 83b5770..f26460a 100644
--- a/ash/wm/workspace/workspace_window_resizer_unittest.cc
+++ b/ash/wm/workspace/workspace_window_resizer_unittest.cc
@@ -4,12 +4,12 @@
#include "ash/wm/workspace/workspace_window_resizer.h"
+#include "ash/screen_ash.h"
#include "ash/shell.h"
#include "ash/test/ash_test_base.h"
#include "ash/wm/property_util.h"
#include "base/string_number_conversions.h"
#include "ui/aura/root_window.h"
-#include "ui/aura/screen_aura.h"
#include "ui/aura/test/test_window_delegate.h"
#include "ui/base/hit_test.h"
@@ -52,7 +52,7 @@ class WorkspaceWindowResizerTest : public test::AshTestBase {
root->SetBounds(gfx::Rect(0, 0, 800, kRootHeight));
gfx::Rect root_bounds(root->bounds());
EXPECT_EQ(kRootHeight, root_bounds.height());
- root->SetScreenWorkAreaInsets(gfx::Insets());
+ Shell::GetInstance()->SetScreenWorkAreaInsets(gfx::Insets());
window_.reset(new aura::Window(&delegate_));
window_->Init(ui::Layer::LAYER_NOT_DRAWN);
window_->SetParent(Shell::GetInstance()->GetRootWindow());
@@ -547,7 +547,7 @@ TEST_F(WorkspaceWindowResizerTest, AttachedResize_BOTTOM_2_REMEMBER) {
TEST_F(WorkspaceWindowResizerTest, AttachedResize_BOTTOM_3) {
aura::RootWindow* root = Shell::GetInstance()->GetRootWindow();
root->SetBounds(gfx::Rect(0, 0, 600, 800));
- root->SetScreenWorkAreaInsets(gfx::Insets());
+ Shell::GetInstance()->SetScreenWorkAreaInsets(gfx::Insets());
window_->SetBounds(gfx::Rect( 300, 100, 300, 200));
window2_->SetBounds(gfx::Rect(300, 300, 200, 150));
@@ -589,7 +589,7 @@ TEST_F(WorkspaceWindowResizerTest, AttachedResize_BOTTOM_3) {
TEST_F(WorkspaceWindowResizerTest, AttachedResize_BOTTOM_RememberHeight) {
aura::RootWindow* root = Shell::GetInstance()->GetRootWindow();
root->SetBounds(gfx::Rect(0, 0, 600, 800));
- root->SetScreenWorkAreaInsets(gfx::Insets());
+ Shell::GetInstance()->SetScreenWorkAreaInsets(gfx::Insets());
window_->SetBounds(gfx::Rect( 300, 100, 300, 200));
window2_->SetBounds(gfx::Rect(300, 300, 200, 150));