summaryrefslogtreecommitdiffstats
path: root/ui/wm
diff options
context:
space:
mode:
authordmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-12 22:54:17 +0000
committerdmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-12 22:54:17 +0000
commit1bb2aa70728ab0b8917b9c44284bd22f591b1ea0 (patch)
tree3d1c20241b5236a9e6911f1ef01629268259a201 /ui/wm
parent78887cf9abd2a730fe4a784ddfe3251929717cc3 (diff)
downloadchromium_src-1bb2aa70728ab0b8917b9c44284bd22f591b1ea0.zip
chromium_src-1bb2aa70728ab0b8917b9c44284bd22f591b1ea0.tar.gz
chromium_src-1bb2aa70728ab0b8917b9c44284bd22f591b1ea0.tar.bz2
Revert "Move wm/core to wm namespace."
This reverts commit 067d7fe616a07011b9e2d2609fc65af8db6a7dfb. Broke the build: http://build.chromium.org/p/chromium.mac/builders/Mac%20Builder%20%28dbg%29/builds/63598/steps/compile/logs/stdio BUG= TBR=ben Review URL: https://codereview.chromium.org/198283002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256686 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/wm')
-rw-r--r--ui/wm/core/base_focus_rules.cc12
-rw-r--r--ui/wm/core/base_focus_rules.h6
-rw-r--r--ui/wm/core/capture_controller.cc6
-rw-r--r--ui/wm/core/capture_controller.h6
-rw-r--r--ui/wm/core/compound_event_filter.cc6
-rw-r--r--ui/wm/core/compound_event_filter.h6
-rw-r--r--ui/wm/core/compound_event_filter_unittest.cc6
-rw-r--r--ui/wm/core/cursor_manager.cc6
-rw-r--r--ui/wm/core/cursor_manager.h6
-rw-r--r--ui/wm/core/cursor_manager_unittest.cc20
-rw-r--r--ui/wm/core/easy_resize_window_targeter.cc2
-rw-r--r--ui/wm/core/focus_controller.cc10
-rw-r--r--ui/wm/core/focus_controller.h6
-rw-r--r--ui/wm/core/focus_controller_unittest.cc10
-rw-r--r--ui/wm/core/focus_rules.h6
-rw-r--r--ui/wm/core/image_grid.cc6
-rw-r--r--ui/wm/core/image_grid.h6
-rw-r--r--ui/wm/core/image_grid_unittest.cc6
-rw-r--r--ui/wm/core/input_method_event_filter.cc6
-rw-r--r--ui/wm/core/input_method_event_filter.h6
-rw-r--r--ui/wm/core/input_method_event_filter_unittest.cc6
-rw-r--r--ui/wm/core/masked_window_targeter.cc2
-rw-r--r--ui/wm/core/native_cursor_manager.h18
-rw-r--r--ui/wm/core/native_cursor_manager_delegate.h6
-rw-r--r--ui/wm/core/shadow.cc22
-rw-r--r--ui/wm/core/shadow.h6
-rw-r--r--ui/wm/core/shadow_controller.cc6
-rw-r--r--ui/wm/core/shadow_controller.h6
-rw-r--r--ui/wm/core/shadow_controller_unittest.cc10
-rw-r--r--ui/wm/core/shadow_types.cc8
-rw-r--r--ui/wm/core/shadow_types.h6
-rw-r--r--ui/wm/core/transient_window_controller.cc6
-rw-r--r--ui/wm/core/transient_window_controller.h6
-rw-r--r--ui/wm/core/transient_window_manager.cc6
-rw-r--r--ui/wm/core/transient_window_manager.h6
-rw-r--r--ui/wm/core/transient_window_manager_unittest.cc10
-rw-r--r--ui/wm/core/transient_window_observer.h6
-rw-r--r--ui/wm/core/transient_window_stacking_client.cc6
-rw-r--r--ui/wm/core/transient_window_stacking_client.h6
-rw-r--r--ui/wm/core/transient_window_stacking_client_unittest.cc6
-rw-r--r--ui/wm/core/visibility_controller.cc6
-rw-r--r--ui/wm/core/visibility_controller.h6
-rw-r--r--ui/wm/core/visibility_controller_unittest.cc6
-rw-r--r--ui/wm/core/window_animations.cc10
-rw-r--r--ui/wm/core/window_animations.h6
-rw-r--r--ui/wm/core/window_animations_unittest.cc8
-rw-r--r--ui/wm/core/window_modality_controller.cc6
-rw-r--r--ui/wm/core/window_modality_controller.h6
-rw-r--r--ui/wm/core/window_util.cc6
-rw-r--r--ui/wm/core/window_util.h6
-rw-r--r--ui/wm/core/wm_core_export.h8
-rw-r--r--ui/wm/core/wm_core_switches.cc6
-rw-r--r--ui/wm/core/wm_core_switches.h6
-rw-r--r--ui/wm/core/wm_state.cc6
-rw-r--r--ui/wm/core/wm_state.h6
-rw-r--r--ui/wm/public/easy_resize_window_targeter.h (renamed from ui/wm/core/easy_resize_window_targeter.h)9
-rw-r--r--ui/wm/public/masked_window_targeter.h (renamed from ui/wm/core/masked_window_targeter.h)9
-rw-r--r--ui/wm/test/DEPS3
-rw-r--r--ui/wm/test/run_all_unittests.cc48
-rw-r--r--ui/wm/test/wm_test_helper.cc4
-rw-r--r--ui/wm/test/wm_test_helper.h8
-rw-r--r--ui/wm/wm.gyp103
62 files changed, 271 insertions, 309 deletions
diff --git a/ui/wm/core/base_focus_rules.cc b/ui/wm/core/base_focus_rules.cc
index bb90941..1092f07 100644
--- a/ui/wm/core/base_focus_rules.cc
+++ b/ui/wm/core/base_focus_rules.cc
@@ -11,7 +11,8 @@
#include "ui/wm/core/window_modality_controller.h"
#include "ui/wm/core/window_util.h"
-namespace wm {
+namespace views {
+namespace corewm {
namespace {
aura::Window* GetFocusedWindow(aura::Window* context) {
@@ -120,15 +121,15 @@ aura::Window* BaseFocusRules::GetActivatableWindow(aura::Window* window) const {
if (modal_transient)
return GetActivatableWindow(modal_transient);
- if (wm::GetTransientParent(child)) {
+ if (views::corewm::GetTransientParent(child)) {
// To avoid infinite recursion, if |child| has a transient parent
// whose own modal transient is |child| itself, just return |child|.
aura::Window* parent_modal_transient =
- GetModalTransient(wm::GetTransientParent(child));
+ GetModalTransient(views::corewm::GetTransientParent(child));
if (parent_modal_transient == child)
return child;
- return GetActivatableWindow(wm::GetTransientParent(child));
+ return GetActivatableWindow(views::corewm::GetTransientParent(child));
}
parent = parent->parent();
@@ -192,4 +193,5 @@ aura::Window* BaseFocusRules::GetNextActivatableWindow(
return NULL;
}
-} // namespace wm
+} // namespace corewm
+} // namespace views
diff --git a/ui/wm/core/base_focus_rules.h b/ui/wm/core/base_focus_rules.h
index 7195dad..cfa0f94 100644
--- a/ui/wm/core/base_focus_rules.h
+++ b/ui/wm/core/base_focus_rules.h
@@ -9,7 +9,8 @@
#include "base/compiler_specific.h"
#include "ui/wm/core/focus_rules.h"
-namespace wm {
+namespace views {
+namespace corewm {
// A set of basic focus and activation rules. Specializations should most likely
// subclass this and call up to these methods rather than reimplementing them.
@@ -40,6 +41,7 @@ class WM_CORE_EXPORT BaseFocusRules : public FocusRules {
DISALLOW_COPY_AND_ASSIGN(BaseFocusRules);
};
-} // namespace wm
+} // namespace corewm
+} // namespace views
#endif // UI_WM_CORE_BASE_FOCUS_RULES_H_
diff --git a/ui/wm/core/capture_controller.cc b/ui/wm/core/capture_controller.cc
index cea55ba..558ac3d0 100644
--- a/ui/wm/core/capture_controller.cc
+++ b/ui/wm/core/capture_controller.cc
@@ -7,7 +7,8 @@
#include "ui/aura/window.h"
#include "ui/aura/window_event_dispatcher.h"
-namespace wm {
+namespace views {
+namespace corewm {
////////////////////////////////////////////////////////////////////////////////
// CaptureController, public:
@@ -141,4 +142,5 @@ void ScopedCaptureClient::Shutdown() {
root_window_ = NULL;
}
-} // namespace wm
+} // namespace corewm
+} // namespace views
diff --git a/ui/wm/core/capture_controller.h b/ui/wm/core/capture_controller.h
index a368b63..ab9afa8 100644
--- a/ui/wm/core/capture_controller.h
+++ b/ui/wm/core/capture_controller.h
@@ -13,7 +13,8 @@
#include "ui/aura/window_observer.h"
#include "ui/wm/core/wm_core_export.h"
-namespace wm {
+namespace views {
+namespace corewm {
// Internal CaptureClient implementation. See ScopedCaptureClient for details.
class WM_CORE_EXPORT CaptureController : public aura::client::CaptureClient {
@@ -81,6 +82,7 @@ class WM_CORE_EXPORT ScopedCaptureClient : public aura::WindowObserver {
DISALLOW_COPY_AND_ASSIGN(ScopedCaptureClient);
};
-} // namespace wm
+} // namespace corewm
+} // namespace views
#endif // UI_WM_CORE_CAPTURE_CONTROLLER_H_
diff --git a/ui/wm/core/compound_event_filter.cc b/ui/wm/core/compound_event_filter.cc
index f7ab7d7..a1eb7ef 100644
--- a/ui/wm/core/compound_event_filter.cc
+++ b/ui/wm/core/compound_event_filter.cc
@@ -21,7 +21,8 @@
#include "ui/events/x/touch_factory_x11.h"
#endif
-namespace wm {
+namespace views {
+namespace corewm {
namespace {
@@ -293,4 +294,5 @@ void CompoundEventFilter::OnGestureEvent(ui::GestureEvent* event) {
}
}
-} // namespace wm
+} // namespace corewm
+} // namespace views
diff --git a/ui/wm/core/compound_event_filter.h b/ui/wm/core/compound_event_filter.h
index 4b72673..a12e57b 100644
--- a/ui/wm/core/compound_event_filter.h
+++ b/ui/wm/core/compound_event_filter.h
@@ -25,7 +25,8 @@ class MouseEvent;
class TouchEvent;
}
-namespace wm {
+namespace views {
+namespace corewm {
// TODO(beng): This class should die. AddEventHandler() on the root Window
// should be used instead.
@@ -88,6 +89,7 @@ class WM_CORE_EXPORT CompoundEventFilter : public ui::EventHandler {
DISALLOW_COPY_AND_ASSIGN(CompoundEventFilter);
};
-} // namespace wm
+} // namespace corewm
+} // namespace views
#endif // UI_WM_CORE_COMPOUND_EVENT_FILTER_H_
diff --git a/ui/wm/core/compound_event_filter_unittest.cc b/ui/wm/core/compound_event_filter_unittest.cc
index a0d193e..0c73504 100644
--- a/ui/wm/core/compound_event_filter_unittest.cc
+++ b/ui/wm/core/compound_event_filter_unittest.cc
@@ -26,7 +26,8 @@ base::TimeDelta GetTime() {
}
-namespace wm {
+namespace views {
+namespace corewm {
namespace {
@@ -203,4 +204,5 @@ TEST_F(CompoundEventFilterTest, DontHideWhenMouseDown) {
aura::Env::GetInstance()->RemovePreTargetHandler(compound_filter.get());
}
-} // namespace wm
+} // namespace corewm
+} // namespace views
diff --git a/ui/wm/core/cursor_manager.cc b/ui/wm/core/cursor_manager.cc
index 1a95c9f..9d1e2db 100644
--- a/ui/wm/core/cursor_manager.cc
+++ b/ui/wm/core/cursor_manager.cc
@@ -9,7 +9,8 @@
#include "ui/wm/core/native_cursor_manager.h"
#include "ui/wm/core/native_cursor_manager_delegate.h"
-namespace wm {
+namespace views {
+namespace corewm {
namespace internal {
@@ -230,4 +231,5 @@ void CursorManager::CommitMouseEventsEnabled(bool enabled) {
current_state_->SetMouseEventsEnabled(enabled);
}
-} // namespace wm
+} // namespace corewm
+} // namespace views
diff --git a/ui/wm/core/cursor_manager.h b/ui/wm/core/cursor_manager.h
index 3640c7e..1f96ebd 100644
--- a/ui/wm/core/cursor_manager.h
+++ b/ui/wm/core/cursor_manager.h
@@ -20,7 +20,8 @@ namespace gfx {
class Display;
}
-namespace wm {
+namespace views {
+namespace corewm {
namespace internal {
class CursorState;
@@ -85,6 +86,7 @@ class WM_CORE_EXPORT CursorManager : public aura::client::CursorClient,
DISALLOW_COPY_AND_ASSIGN(CursorManager);
};
-} // namespace wm
+} // namespace corewm
+} // namespace views
#endif // UI_WM_CORE_CURSOR_MANAGER_H_
diff --git a/ui/wm/core/cursor_manager_unittest.cc b/ui/wm/core/cursor_manager_unittest.cc
index 9348b9d..f9fa087 100644
--- a/ui/wm/core/cursor_manager_unittest.cc
+++ b/ui/wm/core/cursor_manager_unittest.cc
@@ -10,40 +10,40 @@
namespace {
-class TestingCursorManager : public wm::NativeCursorManager {
+class TestingCursorManager : public views::corewm::NativeCursorManager {
public:
- // Overridden from wm::NativeCursorManager:
+ // Overridden from views::corewm::NativeCursorManager:
virtual void SetDisplay(
const gfx::Display& display,
- wm::NativeCursorManagerDelegate* delegate) OVERRIDE {}
+ views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE {}
virtual void SetCursor(
gfx::NativeCursor cursor,
- wm::NativeCursorManagerDelegate* delegate) OVERRIDE {
+ views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE {
delegate->CommitCursor(cursor);
}
virtual void SetVisibility(
bool visible,
- wm::NativeCursorManagerDelegate* delegate) OVERRIDE {
+ views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE {
delegate->CommitVisibility(visible);
}
virtual void SetMouseEventsEnabled(
bool enabled,
- wm::NativeCursorManagerDelegate* delegate) OVERRIDE {
+ views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE {
delegate->CommitMouseEventsEnabled(enabled);
}
virtual void SetCursorSet(
ui::CursorSetType cursor_set,
- wm::NativeCursorManagerDelegate* delegate) OVERRIDE {
+ views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE {
delegate->CommitCursorSet(cursor_set);
}
virtual void SetScale(
float scale,
- wm::NativeCursorManagerDelegate* delegate) OVERRIDE {
+ views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE {
delegate->CommitScale(scale);
}
};
@@ -54,12 +54,12 @@ class CursorManagerTest : public aura::test::AuraTestBase {
protected:
CursorManagerTest()
: delegate_(new TestingCursorManager),
- cursor_manager_(scoped_ptr<wm::NativeCursorManager>(
+ cursor_manager_(scoped_ptr<views::corewm::NativeCursorManager>(
delegate_)) {
}
TestingCursorManager* delegate_;
- wm::CursorManager cursor_manager_;
+ views::corewm::CursorManager cursor_manager_;
};
class TestingCursorClientObserver : public aura::client::CursorClientObserver {
diff --git a/ui/wm/core/easy_resize_window_targeter.cc b/ui/wm/core/easy_resize_window_targeter.cc
index 24d5760..5b48c81 100644
--- a/ui/wm/core/easy_resize_window_targeter.cc
+++ b/ui/wm/core/easy_resize_window_targeter.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ui/wm/core/easy_resize_window_targeter.h"
+#include "ui/wm/public/easy_resize_window_targeter.h"
#include "ui/aura/client/transient_window_client.h"
#include "ui/aura/window.h"
diff --git a/ui/wm/core/focus_controller.cc b/ui/wm/core/focus_controller.cc
index c4e67cf..197e04a 100644
--- a/ui/wm/core/focus_controller.cc
+++ b/ui/wm/core/focus_controller.cc
@@ -15,7 +15,8 @@
#include "ui/wm/core/focus_rules.h"
#include "ui/wm/core/window_util.h"
-namespace wm {
+namespace views {
+namespace corewm {
namespace {
// When a modal window is activated, we bring its entire transient parent chain
@@ -25,10 +26,10 @@ void StackTransientParentsBelowModalWindow(aura::Window* window) {
if (window->GetProperty(aura::client::kModalKey) != ui::MODAL_TYPE_WINDOW)
return;
- aura::Window* transient_parent = wm::GetTransientParent(window);
+ aura::Window* transient_parent = views::corewm::GetTransientParent(window);
while (transient_parent) {
transient_parent->parent()->StackChildAtTop(transient_parent);
- transient_parent = wm::GetTransientParent(transient_parent);
+ transient_parent = views::corewm::GetTransientParent(transient_parent);
}
}
@@ -374,4 +375,5 @@ void FocusController::WindowFocusedFromInputEvent(aura::Window* window) {
FocusWindow(window);
}
-} // namespace wm
+} // namespace corewm
+} // namespace views
diff --git a/ui/wm/core/focus_controller.h b/ui/wm/core/focus_controller.h
index aa97d4d..9e46ec7 100644
--- a/ui/wm/core/focus_controller.h
+++ b/ui/wm/core/focus_controller.h
@@ -15,7 +15,8 @@
#include "ui/events/event_handler.h"
#include "ui/wm/core/wm_core_export.h"
-namespace wm {
+namespace views {
+namespace corewm {
class FocusRules;
@@ -123,6 +124,7 @@ class WM_CORE_EXPORT FocusController : public aura::client::ActivationClient,
DISALLOW_COPY_AND_ASSIGN(FocusController);
};
-} // namespace wm
+} // namespace corewm
+} // namespace views
#endif // UI_WM_CORE_FOCUS_CONTROLLER_H_
diff --git a/ui/wm/core/focus_controller_unittest.cc b/ui/wm/core/focus_controller_unittest.cc
index aa1dac7..0dd9791 100644
--- a/ui/wm/core/focus_controller_unittest.cc
+++ b/ui/wm/core/focus_controller_unittest.cc
@@ -22,7 +22,8 @@
#include "ui/wm/core/base_focus_rules.h"
#include "ui/wm/core/wm_state.h"
-namespace wm {
+namespace views {
+namespace corewm {
class FocusNotificationObserver : public aura::client::ActivationChangeObserver,
public aura::client::FocusChangeObserver {
@@ -347,7 +348,7 @@ class FocusControllerTestBase : public aura::test::AuraTestBase {
// Overridden from aura::test::AuraTestBase:
virtual void SetUp() OVERRIDE {
- wm_state_.reset(new wm::WMState);
+ wm_state_.reset(new views::corewm::WMState);
// FocusController registers itself as an Env observer so it can catch all
// window initializations, including the root_window()'s, so we create it
// before allowing the base setup.
@@ -446,7 +447,7 @@ class FocusControllerTestBase : public aura::test::AuraTestBase {
private:
scoped_ptr<FocusController> focus_controller_;
TestFocusRules* test_focus_rules_;
- scoped_ptr<wm::WMState> wm_state_;
+ scoped_ptr<views::corewm::WMState> wm_state_;
DISALLOW_COPY_AND_ASSIGN(FocusControllerTestBase);
};
@@ -1199,4 +1200,5 @@ FOCUS_CONTROLLER_TEST(FocusControllerApiTest,
// See description above DontPassDeletedWindow() for details.
FOCUS_CONTROLLER_TEST(FocusControllerApiTest, DontPassDeletedWindow);
-} // namespace wm
+} // namespace corewm
+} // namespace views
diff --git a/ui/wm/core/focus_rules.h b/ui/wm/core/focus_rules.h
index 79ffd74..68cd7c4 100644
--- a/ui/wm/core/focus_rules.h
+++ b/ui/wm/core/focus_rules.h
@@ -11,7 +11,8 @@ namespace aura {
class Window;
}
-namespace wm {
+namespace views {
+namespace corewm {
// Implemented by an object that establishes the rules about what can be
// focused or activated.
@@ -61,6 +62,7 @@ class WM_CORE_EXPORT FocusRules {
aura::Window* ignore) const = 0;
};
-} // namespace wm
+} // namespace corewm
+} // namespace views
#endif // UI_WM_CORE_FOCUS_RULES_H_
diff --git a/ui/wm/core/image_grid.cc b/ui/wm/core/image_grid.cc
index 414a2a6..4650a9f 100644
--- a/ui/wm/core/image_grid.cc
+++ b/ui/wm/core/image_grid.cc
@@ -20,7 +20,8 @@
using std::max;
using std::min;
-namespace wm {
+namespace views {
+namespace corewm {
gfx::RectF ImageGrid::TestAPI::GetTransformedLayerBounds(
const ui::Layer& layer) {
@@ -303,4 +304,5 @@ void ImageGrid::ScaleHeight(gfx::Size center,
transform.Scale(1.0, scale);
}
-} // namespace wm
+} // namespace corewm
+} // namespace views
diff --git a/ui/wm/core/image_grid.h b/ui/wm/core/image_grid.h
index 49ac642..0547157 100644
--- a/ui/wm/core/image_grid.h
+++ b/ui/wm/core/image_grid.h
@@ -18,7 +18,8 @@ namespace gfx {
class Image;
} // namespace gfx
-namespace wm {
+namespace views {
+namespace corewm {
// An ImageGrid is a 3x3 array of ui::Layers, each containing an image.
//
@@ -221,6 +222,7 @@ class WM_CORE_EXPORT ImageGrid {
DISALLOW_COPY_AND_ASSIGN(ImageGrid);
};
-} // namespace wm
+} // namespace corewm
+} // namespace views
#endif // UI_WM_CORE_IMAGE_GRID_H_
diff --git a/ui/wm/core/image_grid_unittest.cc b/ui/wm/core/image_grid_unittest.cc
index 4b413e4..82fa4e3 100644
--- a/ui/wm/core/image_grid_unittest.cc
+++ b/ui/wm/core/image_grid_unittest.cc
@@ -10,7 +10,8 @@
#include "ui/gfx/image/image.h"
#include "ui/gfx/image/image_skia.h"
-namespace wm {
+namespace views {
+namespace corewm {
namespace {
@@ -337,4 +338,5 @@ TEST_F(ImageGridTest, TooSmall) {
EXPECT_TRUE(test_api.bottom_right_clip_rect().IsEmpty());
}
-} // namespace wm
+} // namespace corewm
+} // namespace views
diff --git a/ui/wm/core/input_method_event_filter.cc b/ui/wm/core/input_method_event_filter.cc
index d66846c..d97bf03 100644
--- a/ui/wm/core/input_method_event_filter.cc
+++ b/ui/wm/core/input_method_event_filter.cc
@@ -11,7 +11,8 @@
#include "ui/events/event.h"
#include "ui/events/event_processor.h"
-namespace wm {
+namespace views {
+namespace corewm {
////////////////////////////////////////////////////////////////////////////////
// InputMethodEventFilter, public:
@@ -70,4 +71,5 @@ bool InputMethodEventFilter::DispatchKeyEventPostIME(
return aura_event.handled();
}
-} // namespace wm
+} // namespace corewm
+} // namespace views
diff --git a/ui/wm/core/input_method_event_filter.h b/ui/wm/core/input_method_event_filter.h
index 17a6a0e..9ed5216 100644
--- a/ui/wm/core/input_method_event_filter.h
+++ b/ui/wm/core/input_method_event_filter.h
@@ -18,7 +18,8 @@ class EventProcessor;
class InputMethod;
}
-namespace wm {
+namespace views {
+namespace corewm {
// An event filter that forwards a KeyEvent to a system IME, and dispatches a
// TranslatedKeyEvent to the root window as needed.
@@ -48,6 +49,7 @@ class WM_CORE_EXPORT InputMethodEventFilter
DISALLOW_COPY_AND_ASSIGN(InputMethodEventFilter);
};
-} // namespace wm
+} // namespace corewm
+} // namespace views
#endif // UI_WM_CORE_INPUT_METHOD_EVENT_FILTER_H_
diff --git a/ui/wm/core/input_method_event_filter_unittest.cc b/ui/wm/core/input_method_event_filter_unittest.cc
index e5a35e8..ef1a847 100644
--- a/ui/wm/core/input_method_event_filter_unittest.cc
+++ b/ui/wm/core/input_method_event_filter_unittest.cc
@@ -22,7 +22,8 @@
DISABLED_TestInputMethodKeyEventPropagation
#endif
-namespace wm {
+namespace views {
+namespace corewm {
typedef aura::test::AuraTestBase InputMethodEventFilterTest;
@@ -86,4 +87,5 @@ TEST_F(InputMethodEventFilterTest, TestInputMethodKeyEventPropagation) {
window.reset();
}
-} // namespace wm
+} // namespace corewm
+} // namespace views
diff --git a/ui/wm/core/masked_window_targeter.cc b/ui/wm/core/masked_window_targeter.cc
index 4cc26d5..c6277fb 100644
--- a/ui/wm/core/masked_window_targeter.cc
+++ b/ui/wm/core/masked_window_targeter.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ui/wm/core/masked_window_targeter.h"
+#include "ui/wm/public/masked_window_targeter.h"
#include "ui/aura/window.h"
#include "ui/gfx/path.h"
diff --git a/ui/wm/core/native_cursor_manager.h b/ui/wm/core/native_cursor_manager.h
index 68c9d46..def5c96 100644
--- a/ui/wm/core/native_cursor_manager.h
+++ b/ui/wm/core/native_cursor_manager.h
@@ -13,7 +13,8 @@ namespace gfx {
class Display;
}
-namespace wm {
+namespace views {
+namespace corewm {
// Interface where platforms such as Ash or Desktop aura are notified of
// requested changes to cursor state. When requested, implementer should tell
@@ -26,40 +27,41 @@ class WM_CORE_EXPORT NativeCursorManager {
// A request to set the screen DPI. Can cause changes in the current cursor.
virtual void SetDisplay(
const gfx::Display& display,
- wm::NativeCursorManagerDelegate* delegate) = 0;
+ views::corewm::NativeCursorManagerDelegate* delegate) = 0;
// A request to set the cursor to |cursor|. At minimum, implementer should
// call NativeCursorManagerDelegate::CommitCursor() with whatever cursor is
// actually used.
virtual void SetCursor(
gfx::NativeCursor cursor,
- wm::NativeCursorManagerDelegate* delegate) = 0;
+ views::corewm::NativeCursorManagerDelegate* delegate) = 0;
// A request to set the visibility of the cursor. At minimum, implementer
// should call NativeCursorManagerDelegate::CommitVisibility() with whatever
// the visibility is.
virtual void SetVisibility(
bool visible,
- wm::NativeCursorManagerDelegate* delegate) = 0;
+ views::corewm::NativeCursorManagerDelegate* delegate) = 0;
// A request to set the scale of the cursor icon.
virtual void SetScale(
float scale,
- wm::NativeCursorManagerDelegate* delegate) = 0;
+ views::corewm::NativeCursorManagerDelegate* delegate) = 0;
// A request to set the scale of the cursor icon.
virtual void SetCursorSet(
ui::CursorSetType cursor_set,
- wm::NativeCursorManagerDelegate* delegate) = 0;
+ views::corewm::NativeCursorManagerDelegate* delegate) = 0;
// A request to set whether mouse events are disabled. At minimum,
// implementer should call NativeCursorManagerDelegate::
// CommitMouseEventsEnabled() with whether mouse events are actually enabled.
virtual void SetMouseEventsEnabled(
bool enabled,
- wm::NativeCursorManagerDelegate* delegate) = 0;
+ views::corewm::NativeCursorManagerDelegate* delegate) = 0;
};
-} // namespace wm
+} // namespace corewm
+} // namespace views
#endif // UI_WM_CORE_NATIVE_CURSOR_MANAGER_H_
diff --git a/ui/wm/core/native_cursor_manager_delegate.h b/ui/wm/core/native_cursor_manager_delegate.h
index 0571d57..c147700 100644
--- a/ui/wm/core/native_cursor_manager_delegate.h
+++ b/ui/wm/core/native_cursor_manager_delegate.h
@@ -9,7 +9,8 @@
#include "ui/gfx/native_widget_types.h"
#include "ui/wm/core/wm_core_export.h"
-namespace wm {
+namespace views {
+namespace corewm {
// The non-public interface that CursorManager exposes to its users. This
// gives accessors to all the current state, and mutators to all the current
@@ -29,6 +30,7 @@ class WM_CORE_EXPORT NativeCursorManagerDelegate {
virtual void CommitMouseEventsEnabled(bool enabled) = 0;
};
-} // namespace wm
+} // namespace corewm
+} // namespace views
#endif // UI_WM_CORE_NATIVE_CURSOR_MANAGER_DELEGATE_H_
diff --git a/ui/wm/core/shadow.cc b/ui/wm/core/shadow.cc
index 1eb0ac6..fb2d940 100644
--- a/ui/wm/core/shadow.cc
+++ b/ui/wm/core/shadow.cc
@@ -24,25 +24,25 @@ const int kSmallInteriorInset = 5;
// Duration for opacity animation in milliseconds.
const int kShadowAnimationDurationMs = 100;
-float GetOpacityForStyle(wm::Shadow::Style style) {
+float GetOpacityForStyle(views::corewm::Shadow::Style style) {
switch (style) {
- case wm::Shadow::STYLE_ACTIVE:
+ case views::corewm::Shadow::STYLE_ACTIVE:
return kActiveShadowOpacity;
- case wm::Shadow::STYLE_INACTIVE:
+ case views::corewm::Shadow::STYLE_INACTIVE:
return kInactiveShadowOpacity;
- case wm::Shadow::STYLE_SMALL:
+ case views::corewm::Shadow::STYLE_SMALL:
return kSmallShadowOpacity;
}
return 1.0f;
}
-int GetInteriorInsetForStyle(wm::Shadow::Style style) {
+int GetInteriorInsetForStyle(views::corewm::Shadow::Style style) {
switch (style) {
- case wm::Shadow::STYLE_ACTIVE:
+ case views::corewm::Shadow::STYLE_ACTIVE:
return kActiveInteriorInset;
- case wm::Shadow::STYLE_INACTIVE:
+ case views::corewm::Shadow::STYLE_INACTIVE:
return kInactiveInteriorInset;
- case wm::Shadow::STYLE_SMALL:
+ case views::corewm::Shadow::STYLE_SMALL:
return kSmallInteriorInset;
}
return 0;
@@ -50,7 +50,8 @@ int GetInteriorInsetForStyle(wm::Shadow::Style style) {
} // namespace
-namespace wm {
+namespace views {
+namespace corewm {
Shadow::Shadow() : style_(STYLE_ACTIVE), interior_inset_(0) {
}
@@ -190,4 +191,5 @@ void Shadow::UpdateImageGridBounds() {
image_grid_->SetContentBounds(image_grid_bounds);
}
-} // namespace wm
+} // namespace corewm
+} // namespace views
diff --git a/ui/wm/core/shadow.h b/ui/wm/core/shadow.h
index fa42976..0513782 100644
--- a/ui/wm/core/shadow.h
+++ b/ui/wm/core/shadow.h
@@ -15,7 +15,8 @@ namespace ui {
class Layer;
} // namespace ui
-namespace wm {
+namespace views {
+namespace corewm {
class ImageGrid;
@@ -81,6 +82,7 @@ class WM_CORE_EXPORT Shadow : public ui::ImplicitAnimationObserver {
DISALLOW_COPY_AND_ASSIGN(Shadow);
};
-} // namespace wm
+} // namespace corewm
+} // namespace views
#endif // UI_WM_CORE_SHADOW_H_
diff --git a/ui/wm/core/shadow_controller.cc b/ui/wm/core/shadow_controller.cc
index 31fb140..5dcc942 100644
--- a/ui/wm/core/shadow_controller.cc
+++ b/ui/wm/core/shadow_controller.cc
@@ -23,7 +23,8 @@
using std::make_pair;
-namespace wm {
+namespace views {
+namespace corewm {
namespace {
@@ -269,4 +270,5 @@ Shadow* ShadowController::TestApi::GetShadowForWindow(aura::Window* window) {
return controller_->impl_->GetShadowForWindow(window);
}
-} // namespace wm
+} // namespace corewm
+} // namespace views
diff --git a/ui/wm/core/shadow_controller.h b/ui/wm/core/shadow_controller.h
index d9451e7..3f3d1d9 100644
--- a/ui/wm/core/shadow_controller.h
+++ b/ui/wm/core/shadow_controller.h
@@ -23,7 +23,8 @@ namespace gfx {
class Rect;
}
-namespace wm {
+namespace views {
+namespace corewm {
class Shadow;
@@ -64,6 +65,7 @@ class WM_CORE_EXPORT ShadowController :
DISALLOW_COPY_AND_ASSIGN(ShadowController);
};
-} // namespace wm
+} // namespace corewm
+} // namespace views
#endif // UI_WM_CORE_SHADOW_CONTROLLER_H_
diff --git a/ui/wm/core/shadow_controller_unittest.cc b/ui/wm/core/shadow_controller_unittest.cc
index 3f31b2f..057f2b2 100644
--- a/ui/wm/core/shadow_controller_unittest.cc
+++ b/ui/wm/core/shadow_controller_unittest.cc
@@ -19,7 +19,8 @@
#include "ui/wm/core/window_util.h"
#include "ui/wm/core/wm_state.h"
-namespace wm {
+namespace views {
+namespace corewm {
class ShadowControllerTest : public aura::test::AuraTestBase {
public:
@@ -27,7 +28,7 @@ class ShadowControllerTest : public aura::test::AuraTestBase {
virtual ~ShadowControllerTest() {}
virtual void SetUp() OVERRIDE {
- wm_state_.reset(new wm::WMState);
+ wm_state_.reset(new views::corewm::WMState);
AuraTestBase::SetUp();
aura::client::ActivationClient* activation_client =
aura::client::GetActivationClient(root_window());
@@ -51,7 +52,7 @@ class ShadowControllerTest : public aura::test::AuraTestBase {
private:
scoped_ptr<ShadowController> shadow_controller_;
- scoped_ptr<wm::WMState> wm_state_;
+ scoped_ptr<views::corewm::WMState> wm_state_;
DISALLOW_COPY_AND_ASSIGN(ShadowControllerTest);
};
@@ -214,4 +215,5 @@ TEST_F(ShadowControllerTest, TransientParentKeepsActiveShadow) {
EXPECT_EQ(Shadow::STYLE_ACTIVE, shadow1->style());
}
-} // namespace wm
+} // namespace corewm
+} // namespace views
diff --git a/ui/wm/core/shadow_types.cc b/ui/wm/core/shadow_types.cc
index a7afe89..c6a590d7 100644
--- a/ui/wm/core/shadow_types.cc
+++ b/ui/wm/core/shadow_types.cc
@@ -6,9 +6,10 @@
#include "ui/aura/window_property.h"
-DECLARE_WINDOW_PROPERTY_TYPE(wm::ShadowType);
+DECLARE_WINDOW_PROPERTY_TYPE(views::corewm::ShadowType);
-namespace wm {
+namespace views {
+namespace corewm {
void SetShadowType(aura::Window* window, ShadowType shadow_type) {
window->SetProperty(kShadowTypeKey, shadow_type);
@@ -20,4 +21,5 @@ ShadowType GetShadowType(aura::Window* window) {
DEFINE_WINDOW_PROPERTY_KEY(ShadowType, kShadowTypeKey, SHADOW_TYPE_NONE);
-} // namespace wm
+} // namespace corewm
+} // namespace views
diff --git a/ui/wm/core/shadow_types.h b/ui/wm/core/shadow_types.h
index 49c92fd..235b48f 100644
--- a/ui/wm/core/shadow_types.h
+++ b/ui/wm/core/shadow_types.h
@@ -12,7 +12,8 @@ namespace aura {
class Window;
}
-namespace wm {
+namespace views {
+namespace corewm {
// Different types of drop shadows that can be drawn under a window by the
// shell. Used as a value for the kShadowTypeKey property.
@@ -29,6 +30,7 @@ WM_CORE_EXPORT ShadowType GetShadowType(aura::Window* window);
// window. If unset, no shadow is displayed.
extern const aura::WindowProperty<ShadowType>* const kShadowTypeKey;
-} // namespace wm
+} // namespace corewm
+} // namespace views
#endif // UI_WM_CORE_SHADOW_TYPES_H_
diff --git a/ui/wm/core/transient_window_controller.cc b/ui/wm/core/transient_window_controller.cc
index bb1945c..c0fbce1 100644
--- a/ui/wm/core/transient_window_controller.cc
+++ b/ui/wm/core/transient_window_controller.cc
@@ -6,7 +6,8 @@
#include "ui/wm/core/transient_window_manager.h"
-namespace wm {
+namespace views {
+namespace corewm {
TransientWindowController::TransientWindowController() {
}
@@ -37,4 +38,5 @@ const aura::Window* TransientWindowController::GetTransientParent(
return window_manager ? window_manager->transient_parent() : NULL;
}
-} // namespace wm
+} // namespace corewm
+} // namespace views
diff --git a/ui/wm/core/transient_window_controller.h b/ui/wm/core/transient_window_controller.h
index 598904e..01a8de2 100644
--- a/ui/wm/core/transient_window_controller.h
+++ b/ui/wm/core/transient_window_controller.h
@@ -8,7 +8,8 @@
#include "ui/aura/client/transient_window_client.h"
#include "ui/wm/core/wm_core_export.h"
-namespace wm {
+namespace views {
+namespace corewm {
// TransientWindowClient implementation. Uses TransientWindowManager to handle
// tracking transient per window.
@@ -31,6 +32,7 @@ class WM_CORE_EXPORT TransientWindowController
DISALLOW_COPY_AND_ASSIGN(TransientWindowController);
};
-} // namespace wm
+} // namespace corewm
+} // namespace views
#endif // UI_WM_CORE_TRANSIENT_WINDOW_CONTROLLER_H_
diff --git a/ui/wm/core/transient_window_manager.cc b/ui/wm/core/transient_window_manager.cc
index 6166e770..eb67bd3 100644
--- a/ui/wm/core/transient_window_manager.cc
+++ b/ui/wm/core/transient_window_manager.cc
@@ -17,7 +17,8 @@
using aura::Window;
-namespace wm {
+namespace views {
+namespace corewm {
DEFINE_OWNED_WINDOW_PROPERTY_KEY(TransientWindowManager, kPropertyKey, NULL);
@@ -151,4 +152,5 @@ void TransientWindowManager::OnWindowDestroying(Window* window) {
DCHECK(transient_children_.empty());
}
-} // namespace wm
+} // namespace corewm
+} // namespace views
diff --git a/ui/wm/core/transient_window_manager.h b/ui/wm/core/transient_window_manager.h
index 0f84ba3..bd4ef02 100644
--- a/ui/wm/core/transient_window_manager.h
+++ b/ui/wm/core/transient_window_manager.h
@@ -11,7 +11,8 @@
#include "ui/aura/window_observer.h"
#include "ui/wm/core/wm_core_export.h"
-namespace wm {
+namespace views {
+namespace corewm {
class TransientWindowObserver;
@@ -97,6 +98,7 @@ class WM_CORE_EXPORT TransientWindowManager : public aura::WindowObserver {
DISALLOW_COPY_AND_ASSIGN(TransientWindowManager);
};
-} // namespace wm
+} // namespace corewm
+} // namespace views
#endif // UI_WM_CORE_TRANSIENT_WINDOW_MANAGER_H_
diff --git a/ui/wm/core/transient_window_manager_unittest.cc b/ui/wm/core/transient_window_manager_unittest.cc
index 5064854..c344552 100644
--- a/ui/wm/core/transient_window_manager_unittest.cc
+++ b/ui/wm/core/transient_window_manager_unittest.cc
@@ -19,7 +19,8 @@ using aura::Window;
using aura::test::ChildWindowIDsAsString;
using aura::test::CreateTestWindowWithId;
-namespace wm {
+namespace views {
+namespace corewm {
class TestTransientWindowObserver : public TransientWindowObserver {
public:
@@ -56,7 +57,7 @@ class TransientWindowManagerTest : public aura::test::AuraTestBase {
virtual void SetUp() OVERRIDE {
AuraTestBase::SetUp();
- wm_state_.reset(new wm::WMState);
+ wm_state_.reset(new views::corewm::WMState);
}
virtual void TearDown() OVERRIDE {
@@ -77,7 +78,7 @@ class TransientWindowManagerTest : public aura::test::AuraTestBase {
}
private:
- scoped_ptr<wm::WMState> wm_state_;
+ scoped_ptr<views::corewm::WMState> wm_state_;
DISALLOW_COPY_AND_ASSIGN(TransientWindowManagerTest);
};
@@ -633,4 +634,5 @@ TEST_F(TransientWindowManagerTest, TransientWindowObserverNotified) {
TransientWindowManager::Get(parent.get())->RemoveObserver(&test_observer);
}
-} // namespace wm
+} // namespace corewm
+} // namespace views
diff --git a/ui/wm/core/transient_window_observer.h b/ui/wm/core/transient_window_observer.h
index 6a7a2e2..0f7df7c 100644
--- a/ui/wm/core/transient_window_observer.h
+++ b/ui/wm/core/transient_window_observer.h
@@ -11,7 +11,8 @@ namespace aura {
class Window;
}
-namespace wm {
+namespace views {
+namespace corewm {
class WM_CORE_EXPORT TransientWindowObserver {
public:
@@ -27,6 +28,7 @@ class WM_CORE_EXPORT TransientWindowObserver {
virtual ~TransientWindowObserver() {}
};
-} // namespace wm
+} // namespace corewm
+} // namespace views
#endif // UI_WM_CORE_TRANSIENT_WINDOW_OBSERVER_H_
diff --git a/ui/wm/core/transient_window_stacking_client.cc b/ui/wm/core/transient_window_stacking_client.cc
index 7ba7c6a..c217bea 100644
--- a/ui/wm/core/transient_window_stacking_client.cc
+++ b/ui/wm/core/transient_window_stacking_client.cc
@@ -11,7 +11,8 @@
using aura::Window;
-namespace wm {
+namespace views {
+namespace corewm {
namespace {
@@ -129,4 +130,5 @@ bool TransientWindowStackingClient::AdjustStacking(
return *child != *target;
}
-} // namespace wm
+} // namespace corewm
+} // namespace views
diff --git a/ui/wm/core/transient_window_stacking_client.h b/ui/wm/core/transient_window_stacking_client.h
index 5641a22..8384b3f 100644
--- a/ui/wm/core/transient_window_stacking_client.h
+++ b/ui/wm/core/transient_window_stacking_client.h
@@ -8,7 +8,8 @@
#include "ui/aura/client/window_stacking_client.h"
#include "ui/wm/core/wm_core_export.h"
-namespace wm {
+namespace views {
+namespace corewm {
class TransientWindowManager;
@@ -32,6 +33,7 @@ class WM_CORE_EXPORT TransientWindowStackingClient
DISALLOW_COPY_AND_ASSIGN(TransientWindowStackingClient);
};
-} // namespace wm
+} // namespace corewm
+} // namespace views
#endif // UI_WM_CORE_TRANSIENT_WINDOW_STACKING_CLIENT_H_
diff --git a/ui/wm/core/transient_window_stacking_client_unittest.cc b/ui/wm/core/transient_window_stacking_client_unittest.cc
index c5d3bd0..c05520b 100644
--- a/ui/wm/core/transient_window_stacking_client_unittest.cc
+++ b/ui/wm/core/transient_window_stacking_client_unittest.cc
@@ -14,7 +14,8 @@ using aura::test::ChildWindowIDsAsString;
using aura::test::CreateTestWindowWithId;
using aura::Window;
-namespace wm {
+namespace views {
+namespace corewm {
class TransientWindowStackingClientTest : public aura::test::AuraTestBase {
public:
@@ -212,4 +213,5 @@ TEST_F(TransientWindowStackingClientTest,
ui::test::ChildLayerNamesAsString(*root_window()->layer()));
}
-} // namespace wm
+} // namespace corewm
+} // namespace views
diff --git a/ui/wm/core/visibility_controller.cc b/ui/wm/core/visibility_controller.cc
index fc187a9..d4c9784 100644
--- a/ui/wm/core/visibility_controller.cc
+++ b/ui/wm/core/visibility_controller.cc
@@ -9,7 +9,8 @@
#include "ui/compositor/layer.h"
#include "ui/wm/core/window_animations.h"
-namespace wm {
+namespace views {
+namespace corewm {
namespace {
@@ -85,5 +86,6 @@ void SetChildWindowVisibilityChangesAnimated(aura::Window* window) {
window->SetProperty(kChildWindowVisibilityChangesAnimatedKey, true);
}
-} // namespace wm
+} // namespace corewm
+} // namespace views
diff --git a/ui/wm/core/visibility_controller.h b/ui/wm/core/visibility_controller.h
index 912e974..3a08aa3 100644
--- a/ui/wm/core/visibility_controller.h
+++ b/ui/wm/core/visibility_controller.h
@@ -10,7 +10,8 @@
#include "ui/aura/client/visibility_client.h"
#include "ui/wm/core/wm_core_export.h"
-namespace wm {
+namespace views {
+namespace corewm {
class WM_CORE_EXPORT VisibilityController
: public aura::client::VisibilityClient {
@@ -69,6 +70,7 @@ class WM_CORE_EXPORT SuspendChildWindowVisibilityAnimations {
void WM_CORE_EXPORT SetChildWindowVisibilityChangesAnimated(
aura::Window* window);
-} // namespace wm
+} // namespace corewm
+} // namespace views
#endif // UI_WM_CORE_VISIBILITY_CONTROLLER_H_
diff --git a/ui/wm/core/visibility_controller_unittest.cc b/ui/wm/core/visibility_controller_unittest.cc
index 70d1386..81e7978d 100644
--- a/ui/wm/core/visibility_controller_unittest.cc
+++ b/ui/wm/core/visibility_controller_unittest.cc
@@ -14,7 +14,8 @@
#include "ui/compositor/scoped_animation_duration_scale_mode.h"
#include "ui/compositor/scoped_layer_animation_settings.h"
-namespace wm {
+namespace views {
+namespace corewm {
typedef aura::test::AuraTestBase VisibilityControllerTest;
@@ -90,4 +91,5 @@ TEST_F(VisibilityControllerTest, AnimateTransparencyToZeroAndHideHides) {
EXPECT_FALSE(window->IsVisible());
}
-} // namespace wm
+} // namespace corewm
+} // namespace views
diff --git a/ui/wm/core/window_animations.cc b/ui/wm/core/window_animations.cc
index 3b09188..feccce3 100644
--- a/ui/wm/core/window_animations.cc
+++ b/ui/wm/core/window_animations.cc
@@ -37,8 +37,8 @@
#include "ui/wm/core/wm_core_switches.h"
DECLARE_WINDOW_PROPERTY_TYPE(int)
-DECLARE_WINDOW_PROPERTY_TYPE(wm::WindowVisibilityAnimationType)
-DECLARE_WINDOW_PROPERTY_TYPE(wm::WindowVisibilityAnimationTransition)
+DECLARE_WINDOW_PROPERTY_TYPE(views::corewm::WindowVisibilityAnimationType)
+DECLARE_WINDOW_PROPERTY_TYPE(views::corewm::WindowVisibilityAnimationTransition)
DECLARE_WINDOW_PROPERTY_TYPE(float)
DECLARE_EXPORTED_WINDOW_PROPERTY_TYPE(WM_CORE_EXPORT, bool)
@@ -46,7 +46,8 @@ using aura::Window;
using base::TimeDelta;
using ui::Layer;
-namespace wm {
+namespace views {
+namespace corewm {
namespace {
const float kWindowAnimation_Vertical_TranslateY = 15.f;
} // namespace
@@ -553,4 +554,5 @@ bool WindowAnimationsDisabled(aura::Window* window) {
switches::kWindowAnimationsDisabled));
}
-} // namespace wm
+} // namespace corewm
+} // namespace views
diff --git a/ui/wm/core/window_animations.h b/ui/wm/core/window_animations.h
index 73a8173..2c7997d 100644
--- a/ui/wm/core/window_animations.h
+++ b/ui/wm/core/window_animations.h
@@ -24,7 +24,8 @@ class Layer;
class LayerAnimationSequence;
}
-namespace wm {
+namespace views {
+namespace corewm {
// A variety of canned animations for window transitions.
enum WindowVisibilityAnimationType {
@@ -98,6 +99,7 @@ WM_CORE_EXPORT bool AnimateWindow(aura::Window* window,
// if the global flag disabling window animations is present.
WM_CORE_EXPORT bool WindowAnimationsDisabled(aura::Window* window);
-} // namespace wm
+} // namespace corewm
+} // namespace views
#endif // UI_WM_CORE_WINDOW_ANIMATIONS_H_
diff --git a/ui/wm/core/window_animations_unittest.cc b/ui/wm/core/window_animations_unittest.cc
index edce6af..20428fa 100644
--- a/ui/wm/core/window_animations_unittest.cc
+++ b/ui/wm/core/window_animations_unittest.cc
@@ -18,7 +18,8 @@
using aura::Window;
using ui::Layer;
-namespace wm {
+namespace views {
+namespace corewm {
class WindowAnimationsTest : public aura::test::AuraTestBase {
public:
@@ -128,7 +129,7 @@ TEST_F(WindowAnimationsTest, NotifyHideCompleted) {
NotifyHideCompletedAnimationHost animation_host;
scoped_ptr<aura::Window> window(aura::test::CreateTestWindowWithId(0, NULL));
aura::client::SetAnimationHost(window.get(), &animation_host);
- wm::SetWindowVisibilityAnimationType(
+ views::corewm::SetWindowVisibilityAnimationType(
window.get(), WINDOW_VISIBILITY_ANIMATION_TYPE_FADE);
AnimateOnChildWindowVisibilityChanged(window.get(), true);
EXPECT_TRUE(window->layer()->visible());
@@ -138,4 +139,5 @@ TEST_F(WindowAnimationsTest, NotifyHideCompleted) {
EXPECT_TRUE(animation_host.hide_completed());
}
-} // namespace wm
+} // namespace corewm
+} // namespace views
diff --git a/ui/wm/core/window_modality_controller.cc b/ui/wm/core/window_modality_controller.cc
index 2eca7e2..7372e1e 100644
--- a/ui/wm/core/window_modality_controller.cc
+++ b/ui/wm/core/window_modality_controller.cc
@@ -19,7 +19,8 @@
#include "ui/wm/core/window_animations.h"
#include "ui/wm/core/window_util.h"
-namespace wm {
+namespace views {
+namespace corewm {
// Transient child's modal parent.
extern const aura::WindowProperty<aura::Window*>* const kModalParentKey;
@@ -191,4 +192,5 @@ bool WindowModalityController::ProcessLocatedEvent(aura::Window* target,
return !!modal_transient_child;
}
-} // namespace wm
+} // namespace corewm
+} // namespace views
diff --git a/ui/wm/core/window_modality_controller.h b/ui/wm/core/window_modality_controller.h
index d098d57..f31162a 100644
--- a/ui/wm/core/window_modality_controller.h
+++ b/ui/wm/core/window_modality_controller.h
@@ -18,7 +18,8 @@ class EventTarget;
class LocatedEvent;
}
-namespace wm {
+namespace views {
+namespace corewm {
// Sets the modal parent for the child.
WM_CORE_EXPORT void SetModalParent(aura::Window* child, aura::Window* parent);
@@ -66,6 +67,7 @@ class WM_CORE_EXPORT WindowModalityController : public ui::EventHandler,
DISALLOW_COPY_AND_ASSIGN(WindowModalityController);
};
-} // namespace wm
+} // namespace corewm
+} // namespace views
#endif // UI_WM_CORE_WINDOW_MODALITY_CONTROLLER_H_
diff --git a/ui/wm/core/window_util.cc b/ui/wm/core/window_util.cc
index dff8339..9af7cfa 100644
--- a/ui/wm/core/window_util.cc
+++ b/ui/wm/core/window_util.cc
@@ -35,7 +35,8 @@ void CloneChildren(ui::Layer* to_clone, ui::Layer* parent) {
} // namespace
-namespace wm {
+namespace views {
+namespace corewm {
void ActivateWindow(aura::Window* window) {
DCHECK(window);
@@ -126,4 +127,5 @@ bool HasTransientAncestor(const aura::Window* window,
HasTransientAncestor(transient_parent, ancestor) : false;
}
-} // namespace wm
+} // namespace corewm
+} // namespace views
diff --git a/ui/wm/core/window_util.h b/ui/wm/core/window_util.h
index 81989f9..3cb7484 100644
--- a/ui/wm/core/window_util.h
+++ b/ui/wm/core/window_util.h
@@ -22,7 +22,8 @@ class LayerOwner;
class LayerTreeOwner;
}
-namespace wm {
+namespace views {
+namespace corewm {
WM_CORE_EXPORT void ActivateWindow(aura::Window* window);
WM_CORE_EXPORT void DeactivateWindow(aura::Window* window);
@@ -64,6 +65,7 @@ WM_CORE_EXPORT void RemoveTransientChild(aura::Window* parent,
WM_CORE_EXPORT bool HasTransientAncestor(const aura::Window* window,
const aura::Window* ancestor);
-} // namespace wm
+} // namespace corewm
+} // namespace views
#endif // UI_WM_CORE_WINDOW_UTIL_H_
diff --git a/ui/wm/core/wm_core_export.h b/ui/wm/core/wm_core_export.h
index 2056ccc..c38c731 100644
--- a/ui/wm/core/wm_core_export.h
+++ b/ui/wm/core/wm_core_export.h
@@ -5,6 +5,12 @@
#ifndef UI_WM_CORE_WM_CORE_EXPORT_H_
#define UI_WM_CORE_WM_CORE_EXPORT_H_
+#include "ui/views/views_export.h"
+
+#if 1
+#define WM_CORE_EXPORT VIEWS_EXPORT
+#else
+
// Defines WM_CORE_EXPORT so that functionality implemented by the Views module
// can be exported to consumers.
@@ -29,4 +35,6 @@
#define WM_CORE_EXPORT
#endif
+#endif
+
#endif // UI_WM_CORE_WM_CORE_EXPORT_H_
diff --git a/ui/wm/core/wm_core_switches.cc b/ui/wm/core/wm_core_switches.cc
index 12fbfcc..a417ed8 100644
--- a/ui/wm/core/wm_core_switches.cc
+++ b/ui/wm/core/wm_core_switches.cc
@@ -6,11 +6,13 @@
#include "base/command_line.h"
-namespace wm {
+namespace views {
+namespace corewm {
namespace switches {
// If present animations are disabled.
const char kWindowAnimationsDisabled[] = "wm-window-animations-disabled";
} // namespace switches
-} // namespace wm
+} // namespace corewm
+} // namespace views
diff --git a/ui/wm/core/wm_core_switches.h b/ui/wm/core/wm_core_switches.h
index dd48025..77bcdb0 100644
--- a/ui/wm/core/wm_core_switches.h
+++ b/ui/wm/core/wm_core_switches.h
@@ -8,7 +8,8 @@
#include "build/build_config.h"
#include "ui/wm/core/wm_core_export.h"
-namespace wm {
+namespace views {
+namespace corewm {
namespace switches {
// Note: If you add a switch, consider if it needs to be copied to a subsequent
@@ -19,6 +20,7 @@ namespace switches {
WM_CORE_EXPORT extern const char kWindowAnimationsDisabled[];
} // namespace switches
-} // namespace wm
+} // namespace corewm
+} // namespace views
#endif // UI_WM_CORE_WM_CORE_SWITCHES_H_
diff --git a/ui/wm/core/wm_state.cc b/ui/wm/core/wm_state.cc
index afb84c7..aa2a5ef 100644
--- a/ui/wm/core/wm_state.cc
+++ b/ui/wm/core/wm_state.cc
@@ -7,7 +7,8 @@
#include "ui/wm/core/transient_window_controller.h"
#include "ui/wm/core/transient_window_stacking_client.h"
-namespace wm {
+namespace views {
+namespace corewm {
WMState::WMState()
: window_stacking_client_(new TransientWindowStackingClient),
@@ -26,4 +27,5 @@ WMState::~WMState() {
}
}
-} // namespace wm
+} // namespace corewm
+} // namespace views
diff --git a/ui/wm/core/wm_state.h b/ui/wm/core/wm_state.h
index b846f70..f3573e0 100644
--- a/ui/wm/core/wm_state.h
+++ b/ui/wm/core/wm_state.h
@@ -8,7 +8,8 @@
#include "base/memory/scoped_ptr.h"
#include "ui/wm/core/wm_core_export.h"
-namespace wm {
+namespace views {
+namespace corewm {
class TransientWindowController;
class TransientWindowStackingClient;
@@ -27,6 +28,7 @@ class WM_CORE_EXPORT WMState {
DISALLOW_COPY_AND_ASSIGN(WMState);
};
-} // namespace wm
+} // namespace corewm
+} // namespace views
#endif // UI_WM_CORE_WM_STATE_H_
diff --git a/ui/wm/core/easy_resize_window_targeter.h b/ui/wm/public/easy_resize_window_targeter.h
index fae6d46..f873509 100644
--- a/ui/wm/core/easy_resize_window_targeter.h
+++ b/ui/wm/public/easy_resize_window_targeter.h
@@ -2,18 +2,17 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef UI_WM_CORE_EASY_RESIZE_WINDOW_TARGETER_H_
-#define UI_WM_CORE_EASY_RESIZE_WINDOW_TARGETER_H_
+#ifndef UI_WM_PUBLIC_EASY_RESIZE_WINDOW_TARGETER_H_
+#define UI_WM_PUBLIC_EASY_RESIZE_WINDOW_TARGETER_H_
#include "ui/aura/window_targeter.h"
#include "ui/gfx/geometry/insets.h"
-#include "ui/wm/core/wm_core_export.h"
namespace wm {
// An EventTargeter for a container window that uses a slightly larger
// hit-target region for easier resize.
-class WM_CORE_EXPORT EasyResizeWindowTargeter : public aura::WindowTargeter {
+class EasyResizeWindowTargeter : public aura::WindowTargeter {
public:
// |container| window is the owner of this targeter.
EasyResizeWindowTargeter(aura::Window* container,
@@ -50,4 +49,4 @@ class WM_CORE_EXPORT EasyResizeWindowTargeter : public aura::WindowTargeter {
} // namespace wm
-#endif // UI_WM_CORE_EASY_RESIZE_WINDOW_TARGETER_H_
+#endif // UI_WM_PUBLIC_EASY_RESIZE_WINDOW_TARGETER_H_
diff --git a/ui/wm/core/masked_window_targeter.h b/ui/wm/public/masked_window_targeter.h
index 846021a..ad3140d3 100644
--- a/ui/wm/core/masked_window_targeter.h
+++ b/ui/wm/public/masked_window_targeter.h
@@ -2,11 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef UI_WM_CORE_MASKED_WINDOW_TARGETER_H_
-#define UI_WM_CORE_MASKED_WINDOW_TARGETER_H_
+#ifndef UI_WM_PUBLIC_MASKED_WINDOW_TARGETER_H_
+#define UI_WM_PUBLIC_MASKED_WINDOW_TARGETER_H_
#include "ui/aura/window_targeter.h"
-#include "ui/wm/core/wm_core_export.h"
namespace gfx {
class Path;
@@ -14,7 +13,7 @@ class Path;
namespace wm {
-class WM_CORE_EXPORT MaskedWindowTargeter : public aura::WindowTargeter {
+class MaskedWindowTargeter : public aura::WindowTargeter {
public:
explicit MaskedWindowTargeter(aura::Window* masked_window);
virtual ~MaskedWindowTargeter();
@@ -37,4 +36,4 @@ class WM_CORE_EXPORT MaskedWindowTargeter : public aura::WindowTargeter {
} // namespace wm
-#endif // UI_WM_CORE_MASKED_WINDOW_TARGETER_H_
+#endif // UI_WM_PUBLIC_MASKED_WINDOW_TARGETER_H_
diff --git a/ui/wm/test/DEPS b/ui/wm/test/DEPS
index 412f2e6..78adcc9 100644
--- a/ui/wm/test/DEPS
+++ b/ui/wm/test/DEPS
@@ -1,7 +1,4 @@
include_rules = [
"+ui/aura",
- "+ui/base/resource/resource_bundle.h",
- "+ui/base/ui_base_paths.h",
- "+ui/gl",
"+ui/views",
]
diff --git a/ui/wm/test/run_all_unittests.cc b/ui/wm/test/run_all_unittests.cc
deleted file mode 100644
index d399ca1..0000000
--- a/ui/wm/test/run_all_unittests.cc
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/basictypes.h"
-#include "base/bind.h"
-#include "base/compiler_specific.h"
-#include "base/path_service.h"
-#include "base/test/launcher/unit_test_launcher.h"
-#include "base/test/test_suite.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/base/ui_base_paths.h"
-#include "ui/gl/gl_surface.h"
-
-class WMTestSuite : public base::TestSuite {
- public:
- WMTestSuite(int argc, char** argv) : base::TestSuite(argc, argv) {}
-
- protected:
- virtual void Initialize() OVERRIDE {
- base::TestSuite::Initialize();
- gfx::GLSurface::InitializeOneOffForTests();
- ui::RegisterPathProvider();
-
- base::FilePath pak_dir;
- PathService::Get(base::DIR_MODULE, &pak_dir);
-
- base::FilePath pak_file;
- pak_file = pak_dir.Append(FILE_PATH_LITERAL("ui_test.pak"));
-
- ui::ResourceBundle::InitSharedInstanceWithPakPath(pak_file);
- }
-
- virtual void Shutdown() OVERRIDE {
- ui::ResourceBundle::CleanupSharedInstance();
- base::TestSuite::Shutdown();
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(WMTestSuite);
-};
-
-int main(int argc, char** argv) {
- WMTestSuite test_suite(argc, argv);
-
- return base::LaunchUnitTests(
- argc, argv, base::Bind(&WMTestSuite::Run, base::Unretained(&test_suite)));
-}
diff --git a/ui/wm/test/wm_test_helper.cc b/ui/wm/test/wm_test_helper.cc
index 160923c8..a8f9aa8 100644
--- a/ui/wm/test/wm_test_helper.cc
+++ b/ui/wm/test/wm_test_helper.cc
@@ -23,11 +23,11 @@ WMTestHelper::WMTestHelper(const gfx::Size& default_window_size) {
focus_client_.reset(new aura::test::TestFocusClient);
aura::client::SetFocusClient(host_->window(), focus_client_.get());
- root_window_event_filter_ = new wm::CompoundEventFilter;
+ root_window_event_filter_ = new views::corewm::CompoundEventFilter;
// Pass ownership of the filter to the root_window.
host_->window()->SetEventFilter(root_window_event_filter_);
- input_method_filter_.reset(new wm::InputMethodEventFilter(
+ input_method_filter_.reset(new views::corewm::InputMethodEventFilter(
host_->GetAcceleratedWidget()));
input_method_filter_->SetInputMethodPropertyInRootWindow(host_->window());
root_window_event_filter_->AddHandler(input_method_filter_.get());
diff --git a/ui/wm/test/wm_test_helper.h b/ui/wm/test/wm_test_helper.h
index e01486b..d6720c0 100644
--- a/ui/wm/test/wm_test_helper.h
+++ b/ui/wm/test/wm_test_helper.h
@@ -25,10 +25,12 @@ class Rect;
class Size;
}
-namespace wm {
+namespace views {
+namespace corewm {
class CompoundEventFilter;
class InputMethodEventFilter;
}
+}
namespace wm {
@@ -51,10 +53,10 @@ class WMTestHelper : public aura::client::WindowTreeClient {
scoped_ptr<aura::WindowTreeHost> host_;
// Owned by the root Window.
- wm::CompoundEventFilter* root_window_event_filter_;
+ views::corewm::CompoundEventFilter* root_window_event_filter_;
scoped_ptr<aura::client::DefaultCaptureClient> capture_client_;
- scoped_ptr<wm::InputMethodEventFilter> input_method_filter_;
+ scoped_ptr<views::corewm::InputMethodEventFilter> input_method_filter_;
scoped_ptr<aura::client::DefaultActivationClient> activation_client_;
scoped_ptr<aura::client::FocusClient> focus_client_;
diff --git a/ui/wm/wm.gyp b/ui/wm/wm.gyp
index 1670428..6071fac 100644
--- a/ui/wm/wm.gyp
+++ b/ui/wm/wm.gyp
@@ -16,75 +16,11 @@
'../gfx/gfx.gyp:gfx_geometry',
],
'sources': [
- 'public/window_types.h',
- ],
- },
- {
- 'target_name': 'wm_core',
- 'type': '<(component)',
- 'dependencies': [
- '../../base/base.gyp:base',
- '../../skia/skia.gyp:skia',
- '../aura/aura.gyp:aura',
- '../compositor/compositor.gyp:compositor',
- '../events/events.gyp:events_base',
- '../events/events.gyp:events',
- '../gfx/gfx.gyp:gfx_geometry',
- '../gfx/gfx.gyp:gfx',
- '../resources/ui_resources.gyp:ui_resources',
- '../ui.gyp:ui',
- ],
- 'defines': [
- 'WM_CORE_IMPLEMENTATION',
- ],
- 'sources': [
- 'core/base_focus_rules.cc',
- 'core/base_focus_rules.h',
- 'core/capture_controller.cc',
- 'core/capture_controller.h',
- 'core/compound_event_filter.cc',
- 'core/compound_event_filter.h',
- 'core/cursor_manager.cc',
- 'core/cursor_manager.h',
'core/easy_resize_window_targeter.cc',
- 'core/easy_resize_window_targeter.h',
- 'core/focus_controller.cc',
- 'core/focus_controller.h',
- 'core/focus_rules.h',
- 'core/image_grid.cc',
- 'core/image_grid.h',
- 'core/input_method_event_filter.cc',
- 'core/input_method_event_filter.h',
'core/masked_window_targeter.cc',
- 'core/masked_window_targeter.h',
- 'core/native_cursor_manager.h',
- 'core/native_cursor_manager_delegate.h',
- 'core/shadow.cc',
- 'core/shadow.h',
- 'core/shadow_controller.cc',
- 'core/shadow_controller.h',
- 'core/shadow_types.cc',
- 'core/shadow_types.h',
- 'core/transient_window_controller.cc',
- 'core/transient_window_controller.h',
- 'core/transient_window_manager.cc',
- 'core/transient_window_manager.h',
- 'core/transient_window_observer.h',
- 'core/transient_window_stacking_client.cc',
- 'core/transient_window_stacking_client.h',
- 'core/visibility_controller.cc',
- 'core/visibility_controller.h',
- 'core/window_animations.cc',
- 'core/window_animations.h',
- 'core/window_modality_controller.cc',
- 'core/window_modality_controller.h',
- 'core/window_util.cc',
- 'core/window_util.h',
- 'core/wm_core_export.h',
- 'core/wm_core_switches.cc',
- 'core/wm_core_switches.h',
- 'core/wm_state.cc',
- 'core/wm_state.h',
+ 'public/easy_resize_window_targeter.h',
+ 'public/masked_window_targeter.h',
+ 'public/window_types.h',
],
},
{
@@ -99,38 +35,5 @@
'test/wm_test_helper.h',
],
},
- {
- 'target_name': 'wm_core_unittests',
- 'type': 'executable',
- 'dependencies': [
- '../../base/base.gyp:base',
- '../../base/base.gyp:test_support_base',
- '../../skia/skia.gyp:skia',
- '../../testing/gtest.gyp:gtest',
- '../aura/aura.gyp:aura',
- '../aura/aura.gyp:aura_test_support',
- '../compositor/compositor.gyp:compositor',
- '../events/events.gyp:events_base',
- '../events/events.gyp:events',
- '../gfx/gfx.gyp:gfx_geometry',
- '../gfx/gfx.gyp:gfx',
- '../ui.gyp:ui',
- 'wm_core',
- 'wm_test_support',
- ],
- 'sources': [
- 'test/run_all_unittests.cc',
- 'core/compound_event_filter_unittest.cc',
- 'core/cursor_manager_unittest.cc',
- 'core/focus_controller_unittest.cc',
- 'core/input_method_event_filter_unittest.cc',
- 'core/image_grid_unittest.cc',
- 'core/shadow_controller_unittest.cc',
- 'core/transient_window_manager_unittest.cc',
- 'core/transient_window_stacking_client_unittest.cc',
- 'core/visibility_controller_unittest.cc',
- 'core/window_animations_unittest.cc',
- ],
- },
],
}