| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ash/wm/workspace/workspace_manager.h" | 5 #include "ash/wm/workspace/workspace_manager.h" |
| 6 | 6 |
| 7 #include "ash/shell_window_ids.h" | 7 #include "ash/shell_window_ids.h" |
| 8 #include "ash/wm/activation_controller.h" | 8 #include "ash/wm/activation_controller.h" |
| 9 #include "ash/wm/workspace/workspace.h" | 9 #include "ash/wm/workspace/workspace.h" |
| 10 #include "ash/wm/workspace/workspace_observer.h" | 10 #include "ash/wm/workspace/workspace_observer.h" |
| 11 #include "ui/aura/client/aura_constants.h" | 11 #include "ui/aura/client/aura_constants.h" |
| 12 #include "ui/aura/root_window.h" | 12 #include "ui/aura/root_window.h" |
| 13 #include "ui/aura/screen_aura.h" | 13 #include "ui/aura/screen_aura.h" |
| 14 #include "ui/aura/test/aura_test_base.h" | 14 #include "ui/aura/test/aura_test_base.h" |
| 15 #include "ui/aura/window.h" | 15 #include "ui/aura/window.h" |
| 16 #include "ui/base/ui_base_types.h" | 16 #include "ui/base/ui_base_types.h" |
| 17 | 17 |
| 18 namespace { | 18 namespace { |
| 19 using aura_shell::internal::Workspace; | 19 using ash::internal::Workspace; |
| 20 using aura_shell::internal::WorkspaceManager; | 20 using ash::internal::WorkspaceManager; |
| 21 using aura::Window; | 21 using aura::Window; |
| 22 | 22 |
| 23 class TestWorkspaceObserver : public aura_shell::internal::WorkspaceObserver { | 23 class TestWorkspaceObserver : public ash::internal::WorkspaceObserver { |
| 24 public: | 24 public: |
| 25 explicit TestWorkspaceObserver(WorkspaceManager* manager) | 25 explicit TestWorkspaceObserver(WorkspaceManager* manager) |
| 26 : manager_(manager), | 26 : manager_(manager), |
| 27 move_source_(NULL), | 27 move_source_(NULL), |
| 28 move_target_(NULL), | 28 move_target_(NULL), |
| 29 active_workspace_(NULL), | 29 active_workspace_(NULL), |
| 30 old_active_workspace_(NULL) { | 30 old_active_workspace_(NULL) { |
| 31 manager_->AddObserver(this); | 31 manager_->AddObserver(this); |
| 32 } | 32 } |
| 33 | 33 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 Window* move_source_; | 66 Window* move_source_; |
| 67 Window* move_target_; | 67 Window* move_target_; |
| 68 Workspace* active_workspace_; | 68 Workspace* active_workspace_; |
| 69 Workspace* old_active_workspace_; | 69 Workspace* old_active_workspace_; |
| 70 | 70 |
| 71 DISALLOW_COPY_AND_ASSIGN(TestWorkspaceObserver); | 71 DISALLOW_COPY_AND_ASSIGN(TestWorkspaceObserver); |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 } // namespace | 74 } // namespace |
| 75 | 75 |
| 76 namespace aura_shell { | 76 namespace ash { |
| 77 namespace internal { | 77 namespace internal { |
| 78 | 78 |
| 79 class WorkspaceManagerTestBase : public aura::test::AuraTestBase { | 79 class WorkspaceManagerTestBase : public aura::test::AuraTestBase { |
| 80 public: | 80 public: |
| 81 WorkspaceManagerTestBase() { | 81 WorkspaceManagerTestBase() { |
| 82 aura::RootWindow::GetInstance()->set_id( | 82 aura::RootWindow::GetInstance()->set_id( |
| 83 internal::kShellWindowId_DefaultContainer); | 83 internal::kShellWindowId_DefaultContainer); |
| 84 activation_controller_.reset(new internal::ActivationController); | 84 activation_controller_.reset(new internal::ActivationController); |
| 85 activation_controller_->set_default_container_for_test( | 85 activation_controller_->set_default_container_for_test( |
| 86 aura::RootWindow::GetInstance()); | 86 aura::RootWindow::GetInstance()); |
| (...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 557 EXPECT_FALSE(ws->ContainsFullscreenWindow()); | 557 EXPECT_FALSE(ws->ContainsFullscreenWindow()); |
| 558 | 558 |
| 559 w2->SetIntProperty(aura::client::kShowStateKey, ui::SHOW_STATE_FULLSCREEN); | 559 w2->SetIntProperty(aura::client::kShowStateKey, ui::SHOW_STATE_FULLSCREEN); |
| 560 EXPECT_TRUE(ws->ContainsFullscreenWindow()); | 560 EXPECT_TRUE(ws->ContainsFullscreenWindow()); |
| 561 | 561 |
| 562 w2->Hide(); | 562 w2->Hide(); |
| 563 EXPECT_FALSE(ws->ContainsFullscreenWindow()); | 563 EXPECT_FALSE(ws->ContainsFullscreenWindow()); |
| 564 } | 564 } |
| 565 | 565 |
| 566 } // namespace internal | 566 } // namespace internal |
| 567 } // namespace aura_shell | 567 } // namespace ash |
| OLD | NEW |