diff options
author | dmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-12 22:54:17 +0000 |
---|---|---|
committer | dmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-12 22:54:17 +0000 |
commit | 1bb2aa70728ab0b8917b9c44284bd22f591b1ea0 (patch) | |
tree | 3d1c20241b5236a9e6911f1ef01629268259a201 /ash | |
parent | 78887cf9abd2a730fe4a784ddfe3251929717cc3 (diff) | |
download | chromium_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 'ash')
72 files changed, 250 insertions, 238 deletions
diff --git a/ash/accelerators/accelerator_filter.cc b/ash/accelerators/accelerator_filter.cc index da552b9..64fe9a6 100644 --- a/ash/accelerators/accelerator_filter.cc +++ b/ash/accelerators/accelerator_filter.cc @@ -47,7 +47,7 @@ bool IsSystemKey(ui::KeyboardCode key_code) { bool CanConsumeSystemKeys(aura::Window* target) { if (!target) // Can be NULL in tests. return false; - aura::Window* top_level = ::wm::GetToplevelWindow(target); + aura::Window* top_level = views::corewm::GetToplevelWindow(target); return top_level && wm::GetWindowState(top_level)->can_consume_system_keys(); } diff --git a/ash/ash.gyp b/ash/ash.gyp index 4055c3e..96ba4d7 100644 --- a/ash/ash.gyp +++ b/ash/ash.gyp @@ -39,7 +39,6 @@ '../ui/views/controls/webview/webview.gyp:webview', '../ui/views/views.gyp:views', '../ui/web_dialogs/web_dialogs.gyp:web_dialogs', - '../ui/wm/wm.gyp:wm_core', '../ui/wm/wm.gyp:wm_public', '../url/url.gyp:url_lib', 'ash_strings.gyp:ash_strings', @@ -839,7 +838,6 @@ '../ui/views/views.gyp:views_test_support', '../ui/views/views.gyp:views_with_content_test_support', '../ui/web_dialogs/web_dialogs.gyp:web_dialogs_test_support', - '../ui/wm/wm.gyp:wm_core', '../url/url.gyp:url_lib', 'ash_strings.gyp:ash_strings', 'ash', @@ -1065,7 +1063,6 @@ '../ui/message_center/message_center.gyp:message_center', '../ui/resources/ui_resources.gyp:ui_resources', '../ui/ui.gyp:ui', - '../ui/wm/wm.gyp:wm_core', '../ui/views/views.gyp:views', '../ui/views/views.gyp:views_examples_lib', '../ui/views/views.gyp:views_examples_with_content_lib', diff --git a/ash/default_user_wallpaper_delegate.cc b/ash/default_user_wallpaper_delegate.cc index 99c1d58..f6fed24 100644 --- a/ash/default_user_wallpaper_delegate.cc +++ b/ash/default_user_wallpaper_delegate.cc @@ -11,7 +11,7 @@ namespace ash { int DefaultUserWallpaperDelegate::GetAnimationType() { - return wm::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE; + return views::corewm::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE; } int DefaultUserWallpaperDelegate::GetAnimationDurationOverride() { diff --git a/ash/desktop_background/desktop_background_view.cc b/ash/desktop_background/desktop_background_view.cc index 0f14604..245df74 100644 --- a/ash/desktop_background/desktop_background_view.cc +++ b/ash/desktop_background/desktop_background_view.cc @@ -191,7 +191,7 @@ views::Widget* CreateDesktopBackground(aura::Window* root_window, desktop_widget->SetContentsView( new LayerControlView(new DesktopBackgroundView())); int animation_type = wallpaper_delegate->GetAnimationType(); - wm::SetWindowVisibilityAnimationType( + views::corewm::SetWindowVisibilityAnimationType( desktop_widget->GetNativeView(), animation_type); RootWindowController* root_window_controller = @@ -205,18 +205,18 @@ views::Widget* CreateDesktopBackground(aura::Window* root_window, if (wallpaper_delegate->ShouldShowInitialAnimation() || root_window_controller->animating_wallpaper_controller() || Shell::GetInstance()->session_state_delegate()->NumberOfLoggedInUsers()) { - wm::SetWindowVisibilityAnimationTransition( - desktop_widget->GetNativeView(), wm::ANIMATE_SHOW); + views::corewm::SetWindowVisibilityAnimationTransition( + desktop_widget->GetNativeView(), views::corewm::ANIMATE_SHOW); int duration_override = wallpaper_delegate->GetAnimationDurationOverride(); if (duration_override) { - wm::SetWindowVisibilityAnimationDuration( + views::corewm::SetWindowVisibilityAnimationDuration( desktop_widget->GetNativeView(), base::TimeDelta::FromMilliseconds(duration_override)); } } else { // Disable animation if transition to login screen from an empty background. - wm::SetWindowVisibilityAnimationTransition( - desktop_widget->GetNativeView(), wm::ANIMATE_NONE); + views::corewm::SetWindowVisibilityAnimationTransition( + desktop_widget->GetNativeView(), views::corewm::ANIMATE_NONE); } desktop_widget->SetBounds(params.parent->bounds()); diff --git a/ash/display/screen_position_controller.cc b/ash/display/screen_position_controller.cc index c0079c8..e76fdc4 100644 --- a/ash/display/screen_position_controller.cc +++ b/ash/display/screen_position_controller.cc @@ -40,7 +40,7 @@ void MoveAllTransientChildrenToNewRoot(const gfx::Display& display, aura::Window* dst_root = Shell::GetInstance()->display_controller()-> GetRootWindowForDisplayId(display.id()); aura::Window::Windows transient_children = - ::wm::GetTransientChildren(window); + views::corewm::GetTransientChildren(window); for (aura::Window::Windows::iterator iter = transient_children.begin(); iter != transient_children.end(); ++iter) { aura::Window* transient_child = *iter; @@ -163,7 +163,7 @@ void ScreenPositionController::SetBounds(aura::Window* window, // b) if the window or its ancestor has kStayInSameRootWindowkey. It's // intentionally kept in the same root window even if the bounds is // outside of the display. - if (!::wm::GetTransientParent(window) && + if (!views::corewm::GetTransientParent(window) && !ShouldStayInSameRootWindow(window)) { aura::Window* dst_root = Shell::GetInstance()->display_controller()->GetRootWindowForDisplayId( diff --git a/ash/drag_drop/drag_image_view.cc b/ash/drag_drop/drag_image_view.cc index 5beb81f..c03b581 100644 --- a/ash/drag_drop/drag_image_view.cc +++ b/ash/drag_drop/drag_image_view.cc @@ -33,7 +33,7 @@ Widget* CreateDragWidget(gfx::NativeView context) { drag_widget->SetOpacity(0xFF); drag_widget->GetNativeWindow()->set_owned_by_parent(false); drag_widget->GetNativeWindow()->SetName("DragWidget"); - SetShadowType(drag_widget->GetNativeView(), wm::SHADOW_TYPE_NONE); + SetShadowType(drag_widget->GetNativeView(), views::corewm::SHADOW_TYPE_NONE); return drag_widget; } } diff --git a/ash/ime/candidate_window_view.cc b/ash/ime/candidate_window_view.cc index ca37b23..ac520f9 100644 --- a/ash/ime/candidate_window_view.cc +++ b/ash/ime/candidate_window_view.cc @@ -191,9 +191,9 @@ CandidateWindowView::~CandidateWindowView() { views::Widget* CandidateWindowView::InitWidget() { views::Widget* widget = BubbleDelegateView::CreateBubble(this); - wm::SetWindowVisibilityAnimationType( + views::corewm::SetWindowVisibilityAnimationType( widget->GetNativeView(), - wm::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE); + views::corewm::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE); GetBubbleFrameView()->SetBubbleBorder(scoped_ptr<views::BubbleBorder>( new CandidateWindowBorder(parent_window()))); diff --git a/ash/ime/infolist_window.cc b/ash/ime/infolist_window.cc index e48e88e..b268ee7 100644 --- a/ash/ime/infolist_window.cc +++ b/ash/ime/infolist_window.cc @@ -211,9 +211,9 @@ InfolistWindow::~InfolistWindow() { void InfolistWindow::InitWidget() { views::Widget* widget = views::BubbleDelegateView::CreateBubble(this); - wm::SetWindowVisibilityAnimationType( + views::corewm::SetWindowVisibilityAnimationType( widget->GetNativeView(), - wm::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE); + views::corewm::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE); // BubbleFrameView will be initialized through CreateBubble. GetBubbleFrameView()->SetBubbleBorder( diff --git a/ash/ime/mode_indicator_view.cc b/ash/ime/mode_indicator_view.cc index ccc1eae..e7d514f 100644 --- a/ash/ime/mode_indicator_view.cc +++ b/ash/ime/mode_indicator_view.cc @@ -58,9 +58,9 @@ ModeIndicatorView::ModeIndicatorView(gfx::NativeView parent, ModeIndicatorView::~ModeIndicatorView() {} void ModeIndicatorView::ShowAndFadeOut() { - wm::SetWindowVisibilityAnimationTransition( + views::corewm::SetWindowVisibilityAnimationTransition( GetWidget()->GetNativeView(), - wm::ANIMATE_HIDE); + views::corewm::ANIMATE_HIDE); GetWidget()->Show(); timer_.Start(FROM_HERE, base::TimeDelta::FromMilliseconds(kShowingDuration), diff --git a/ash/popup_message.cc b/ash/popup_message.cc index f321789..bd1aea4 100644 --- a/ash/popup_message.cc +++ b/ash/popup_message.cc @@ -194,10 +194,10 @@ PopupMessage::PopupMessage(const base::string16& caption, widget_ = view_->GetWidget(); gfx::NativeView native_view = widget_->GetNativeView(); - wm::SetWindowVisibilityAnimationType( - native_view, wm::WINDOW_VISIBILITY_ANIMATION_TYPE_VERTICAL); - wm::SetWindowVisibilityAnimationTransition( - native_view, wm::ANIMATE_HIDE); + views::corewm::SetWindowVisibilityAnimationType( + native_view, views::corewm::WINDOW_VISIBILITY_ANIMATION_TYPE_VERTICAL); + views::corewm::SetWindowVisibilityAnimationTransition( + native_view, views::corewm::ANIMATE_HIDE); view_->GetWidget()->Show(); } @@ -219,8 +219,8 @@ void PopupMessage::CancelHidingAnimation() { return; gfx::NativeView native_view = widget_->GetNativeView(); - wm::SetWindowVisibilityAnimationTransition( - native_view, wm::ANIMATE_NONE); + views::corewm::SetWindowVisibilityAnimationTransition( + native_view, views::corewm::ANIMATE_NONE); } } // namespace ash diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc index 3982ad7..0ba6a20 100644 --- a/ash/root_window_controller.cc +++ b/ash/root_window_controller.cc @@ -66,9 +66,9 @@ #include "ui/views/view_model.h" #include "ui/views/view_model_utils.h" #include "ui/wm/core/capture_controller.h" -#include "ui/wm/core/easy_resize_window_targeter.h" #include "ui/wm/core/visibility_controller.h" #include "ui/wm/core/window_util.h" +#include "ui/wm/public/easy_resize_window_targeter.h" #include "ui/wm/public/window_types.h" #if defined(OS_CHROMEOS) @@ -600,7 +600,7 @@ const aura::Window* RootWindowController::GetWindowForFullscreenMode() const { while (topmost_window) { if (wm::GetWindowState(topmost_window)->IsFullscreen()) return topmost_window; - topmost_window = ::wm::GetTransientParent(topmost_window); + topmost_window = views::corewm::GetTransientParent(topmost_window); } return NULL; } @@ -668,7 +668,8 @@ RootWindowController::RootWindowController(aura::WindowTreeHost* host) stacking_controller_.reset(new StackingController); aura::client::SetWindowTreeClient(root_window(), stacking_controller_.get()); - capture_client_.reset(new ::wm::ScopedCaptureClient(root_window())); + capture_client_.reset( + new views::corewm::ScopedCaptureClient(root_window())); } void RootWindowController::Init(RootWindowType root_window_type, @@ -816,7 +817,8 @@ void RootWindowController::CreateContainersInRootWindow( kShellWindowId_DesktopBackgroundContainer, "DesktopBackgroundContainer", root_window); - ::wm::SetChildWindowVisibilityChangesAnimated(desktop_background_container); + views::corewm::SetChildWindowVisibilityChangesAnimated( + desktop_background_container); aura::Window* non_lock_screen_containers = CreateContainer( kShellWindowId_NonLockScreenContainersContainer, @@ -827,7 +829,8 @@ void RootWindowController::CreateContainersInRootWindow( kShellWindowId_LockScreenBackgroundContainer, "LockScreenBackgroundContainer", root_window); - ::wm::SetChildWindowVisibilityChangesAnimated(lock_background_containers); + views::corewm::SetChildWindowVisibilityChangesAnimated( + lock_background_containers); aura::Window* lock_screen_containers = CreateContainer( kShellWindowId_LockScreenContainersContainer, @@ -846,7 +849,7 @@ void RootWindowController::CreateContainersInRootWindow( kShellWindowId_DefaultContainer, "DefaultContainer", non_lock_screen_containers); - ::wm::SetChildWindowVisibilityChangesAnimated(default_container); + views::corewm::SetChildWindowVisibilityChangesAnimated(default_container); SetUsesScreenCoordinates(default_container); SetUsesEasyResizeTargeter(default_container); @@ -854,14 +857,15 @@ void RootWindowController::CreateContainersInRootWindow( kShellWindowId_AlwaysOnTopContainer, "AlwaysOnTopContainer", non_lock_screen_containers); - ::wm::SetChildWindowVisibilityChangesAnimated(always_on_top_container); + views::corewm::SetChildWindowVisibilityChangesAnimated( + always_on_top_container); SetUsesScreenCoordinates(always_on_top_container); aura::Window* docked_container = CreateContainer( kShellWindowId_DockedContainer, "DockedContainer", non_lock_screen_containers); - ::wm::SetChildWindowVisibilityChangesAnimated(docked_container); + views::corewm::SetChildWindowVisibilityChangesAnimated(docked_container); SetUsesScreenCoordinates(docked_container); SetUsesEasyResizeTargeter(docked_container); @@ -898,7 +902,7 @@ void RootWindowController::CreateContainersInRootWindow( non_lock_screen_containers); modal_container->SetLayoutManager( new SystemModalContainerLayoutManager(modal_container)); - ::wm::SetChildWindowVisibilityChangesAnimated(modal_container); + views::corewm::SetChildWindowVisibilityChangesAnimated(modal_container); SetUsesScreenCoordinates(modal_container); SetUsesEasyResizeTargeter(modal_container); @@ -906,7 +910,8 @@ void RootWindowController::CreateContainersInRootWindow( kShellWindowId_InputMethodContainer, "InputMethodContainer", non_lock_screen_containers); - ::wm::SetChildWindowVisibilityChangesAnimated(input_method_container); + views::corewm::SetChildWindowVisibilityChangesAnimated( + input_method_container); SetUsesScreenCoordinates(input_method_container); // TODO(beng): Figure out if we can make this use @@ -926,7 +931,7 @@ void RootWindowController::CreateContainersInRootWindow( lock_screen_containers); lock_modal_container->SetLayoutManager( new SystemModalContainerLayoutManager(lock_modal_container)); - ::wm::SetChildWindowVisibilityChangesAnimated(lock_modal_container); + views::corewm::SetChildWindowVisibilityChangesAnimated(lock_modal_container); SetUsesScreenCoordinates(lock_modal_container); SetUsesEasyResizeTargeter(lock_modal_container); @@ -941,7 +946,8 @@ void RootWindowController::CreateContainersInRootWindow( kShellWindowId_SettingBubbleContainer, "SettingBubbleContainer", lock_screen_related_containers); - ::wm::SetChildWindowVisibilityChangesAnimated(settings_bubble_container); + views::corewm::SetChildWindowVisibilityChangesAnimated( + settings_bubble_container); SetUsesScreenCoordinates(settings_bubble_container); DescendantShouldStayInSameRootWindow(settings_bubble_container); @@ -949,14 +955,14 @@ void RootWindowController::CreateContainersInRootWindow( kShellWindowId_MenuContainer, "MenuContainer", lock_screen_related_containers); - ::wm::SetChildWindowVisibilityChangesAnimated(menu_container); + views::corewm::SetChildWindowVisibilityChangesAnimated(menu_container); SetUsesScreenCoordinates(menu_container); aura::Window* drag_drop_container = CreateContainer( kShellWindowId_DragImageAndTooltipContainer, "DragImageAndTooltipContainer", lock_screen_related_containers); - ::wm::SetChildWindowVisibilityChangesAnimated(drag_drop_container); + views::corewm::SetChildWindowVisibilityChangesAnimated(drag_drop_container); SetUsesScreenCoordinates(drag_drop_container); aura::Window* overlay_container = CreateContainer( diff --git a/ash/root_window_controller.h b/ash/root_window_controller.h index ddf6355..d347d81 100644 --- a/ash/root_window_controller.h +++ b/ash/root_window_controller.h @@ -28,23 +28,23 @@ namespace gfx { class Point; } -namespace keyboard { -class KeyboardController; -} - -namespace ui { -class EventHandler; -} - namespace views { class Widget; -} -namespace wm { +namespace corewm { class InputMethodEventFilter; class RootWindowEventFilter; class ScopedCaptureClient; } +} + +namespace keyboard { +class KeyboardController; +} + +namespace ui { +class EventHandler; +} namespace ash { class ShelfWidget; @@ -307,7 +307,7 @@ class ASH_EXPORT RootWindowController : public ShellObserver { scoped_ptr<DesktopBackgroundWidgetController> wallpaper_controller_; scoped_ptr<AnimatingDesktopController> animating_wallpaper_controller_; - scoped_ptr< ::wm::ScopedCaptureClient> capture_client_; + scoped_ptr<views::corewm::ScopedCaptureClient> capture_client_; DISALLOW_COPY_AND_ASSIGN(RootWindowController); }; diff --git a/ash/shelf/shelf_tooltip_manager.cc b/ash/shelf/shelf_tooltip_manager.cc index 15afb08..48b943f 100644 --- a/ash/shelf/shelf_tooltip_manager.cc +++ b/ash/shelf/shelf_tooltip_manager.cc @@ -324,8 +324,8 @@ void ShelfTooltipManager::CancelHidingAnimation() { return; gfx::NativeView native_view = widget_->GetNativeView(); - wm::SetWindowVisibilityAnimationTransition( - native_view, wm::ANIMATE_NONE); + views::corewm::SetWindowVisibilityAnimationTransition( + native_view, views::corewm::ANIMATE_NONE); } void ShelfTooltipManager::CloseSoon() { @@ -359,10 +359,10 @@ void ShelfTooltipManager::CreateBubble(views::View* anchor, view_->SetText(text_); gfx::NativeView native_view = widget_->GetNativeView(); - wm::SetWindowVisibilityAnimationType( - native_view, wm::WINDOW_VISIBILITY_ANIMATION_TYPE_VERTICAL); - wm::SetWindowVisibilityAnimationTransition( - native_view, wm::ANIMATE_HIDE); + views::corewm::SetWindowVisibilityAnimationType( + native_view, views::corewm::WINDOW_VISIBILITY_ANIMATION_TYPE_VERTICAL); + views::corewm::SetWindowVisibilityAnimationTransition( + native_view, views::corewm::ANIMATE_HIDE); } void ShelfTooltipManager::CreateTimer(int delay_in_ms) { diff --git a/ash/shelf/shelf_widget.cc b/ash/shelf/shelf_widget.cc index 47c6d07..3595833 100644 --- a/ash/shelf/shelf_widget.cc +++ b/ash/shelf/shelf_widget.cc @@ -37,7 +37,7 @@ #include "ui/views/accessible_pane_view.h" #include "ui/views/widget/widget.h" #include "ui/views/widget/widget_delegate.h" -#include "ui/wm/core/easy_resize_window_targeter.h" +#include "ui/wm/public/easy_resize_window_targeter.h" namespace { // Size of black border at bottom (or side) of shelf. diff --git a/ash/shelf/shelf_window_watcher_item_delegate.cc b/ash/shelf/shelf_window_watcher_item_delegate.cc index e1ce8ec..0ba8f20 100644 --- a/ash/shelf/shelf_window_watcher_item_delegate.cc +++ b/ash/shelf/shelf_window_watcher_item_delegate.cc @@ -33,7 +33,8 @@ bool ShelfWindowWatcherItemDelegate::ItemSelected(const ui::Event& event) { wm::WindowState* window_state = wm::GetWindowState(window_); if (window_state->IsActive()) { if (event.type() & ui::ET_KEY_RELEASED) { - ::wm::AnimateWindow(window_, ::wm::WINDOW_ANIMATION_TYPE_BOUNCE); + views::corewm::AnimateWindow(window_, + views::corewm::WINDOW_ANIMATION_TYPE_BOUNCE); } else { window_state->Minimize(); } diff --git a/ash/shell.cc b/ash/shell.cc index a5932ae..94f4fed 100644 --- a/ash/shell.cc +++ b/ash/shell.cc @@ -143,13 +143,13 @@ using views::Widget; // A Corewm VisibilityController subclass that calls the Ash animation routine // so we can pick up our extended animations. See ash/wm/window_animations.h. -class AshVisibilityController : public ::wm::VisibilityController { +class AshVisibilityController : public views::corewm::VisibilityController { public: AshVisibilityController() {} virtual ~AshVisibilityController() {} private: - // Overridden from ::wm::VisibilityController: + // Overridden from views::corewm::VisibilityController: virtual bool CallAnimateOnChildWindowVisibilityChanged( aura::Window* window, bool visible) OVERRIDE { @@ -601,7 +601,7 @@ Shell::Shell(ShellDelegate* delegate) output_configurator_(new chromeos::OutputConfigurator()), #endif // defined(OS_CHROMEOS) && defined(USE_X11) native_cursor_manager_(new AshNativeCursorManager), - cursor_manager_(scoped_ptr< ::wm::NativeCursorManager>( + cursor_manager_(scoped_ptr<views::corewm::NativeCursorManager>( native_cursor_manager_)), simulate_modal_window_open_for_testing_(false), is_touch_hud_projection_enabled_(false) { @@ -811,15 +811,15 @@ void Shell::Init() { // pretarget handler list to ensure that it processes input events when modal // windows are active. window_modality_controller_.reset( - new ::wm::WindowModalityController(this)); + new views::corewm::WindowModalityController(this)); AddPreTargetHandler(this); - env_filter_.reset(new ::wm::CompoundEventFilter); + env_filter_.reset(new views::corewm::CompoundEventFilter); AddPreTargetHandler(env_filter_.get()); - ::wm::FocusController* focus_controller = - new ::wm::FocusController(new wm::AshFocusRules); + views::corewm::FocusController* focus_controller = + new views::corewm::FocusController(new wm::AshFocusRules); focus_client_.reset(focus_controller); activation_client_ = focus_controller; activation_client_->AddObserver(this); @@ -868,7 +868,7 @@ void Shell::Init() { AddPreTargetHandler(overlay_filter_.get()); AddShellObserver(overlay_filter_.get()); - input_method_filter_.reset(new ::wm::InputMethodEventFilter( + input_method_filter_.reset(new views::corewm::InputMethodEventFilter( root_window->GetHost()->GetAcceleratedWidget())); AddPreTargetHandler(input_method_filter_.get()); @@ -943,7 +943,7 @@ void Shell::Init() { resize_shadow_controller_.reset(new internal::ResizeShadowController()); shadow_controller_.reset( - new ::wm::ShadowController(activation_client_)); + new views::corewm::ShadowController(activation_client_)); // Create system_tray_notifier_ before the delegate. system_tray_notifier_.reset(new ash::SystemTrayNotifier()); @@ -1034,8 +1034,8 @@ void Shell::InitRootWindow(aura::Window* root_window) { aura::client::SetFocusClient(root_window, focus_client_.get()); input_method_filter_->SetInputMethodPropertyInRootWindow(root_window); aura::client::SetActivationClient(root_window, activation_client_); - ::wm::FocusController* focus_controller = - static_cast< ::wm::FocusController*>(activation_client_); + views::corewm::FocusController* focus_controller = + static_cast<views::corewm::FocusController*>(activation_client_); root_window->AddPreTargetHandler(focus_controller); aura::client::SetVisibilityClient(root_window, visibility_controller_.get()); aura::client::SetDragDropClient(root_window, drag_drop_controller_.get()); diff --git a/ash/shell.h b/ash/shell.h index ccf6307..2334fcf 100644 --- a/ash/shell.h +++ b/ash/shell.h @@ -63,17 +63,14 @@ namespace views { class NonClientFrameView; class Widget; namespace corewm { -class TooltipController; -} -} - -namespace wm { class CompoundEventFilter; class InputMethodEventFilter; class ShadowController; +class TooltipController; class VisibilityController; class WindowModalityController; } +} namespace ash { @@ -336,10 +333,10 @@ class ASH_EXPORT Shell internal::DisplayManager* display_manager() { return display_manager_.get(); } - ::wm::InputMethodEventFilter* input_method_filter() { + views::corewm::InputMethodEventFilter* input_method_filter() { return input_method_filter_.get(); } - ::wm::CompoundEventFilter* env_filter() { + views::corewm::CompoundEventFilter* env_filter() { return env_filter_.get(); } views::corewm::TooltipController* tooltip_controller() { @@ -381,7 +378,7 @@ class ASH_EXPORT Shell internal::EventTransformationHandler* event_transformation_handler() { return event_transformation_handler_.get(); } - ::wm::CursorManager* cursor_manager() { return &cursor_manager_; } + views::corewm::CursorManager* cursor_manager() { return &cursor_manager_; } ShellDelegate* delegate() { return delegate_.get(); } @@ -489,7 +486,7 @@ class ASH_EXPORT Shell } // Made available for tests. - ::wm::ShadowController* shadow_controller() { + views::corewm::ShadowController* shadow_controller() { return shadow_controller_.get(); } @@ -612,7 +609,7 @@ class ASH_EXPORT Shell aura::Window* scoped_target_root_window_; // The CompoundEventFilter owned by aura::Env object. - scoped_ptr< ::wm::CompoundEventFilter> env_filter_; + scoped_ptr<views::corewm::CompoundEventFilter> env_filter_; std::vector<WindowAndBoundsPair> to_restore_; @@ -639,9 +636,10 @@ class ASH_EXPORT Shell scoped_ptr<internal::DragDropController> drag_drop_controller_; scoped_ptr<internal::ResizeShadowController> resize_shadow_controller_; - scoped_ptr< ::wm::ShadowController> shadow_controller_; - scoped_ptr< ::wm::VisibilityController> visibility_controller_; - scoped_ptr< ::wm::WindowModalityController> window_modality_controller_; + scoped_ptr<views::corewm::ShadowController> shadow_controller_; + scoped_ptr<views::corewm::VisibilityController> visibility_controller_; + scoped_ptr<views::corewm::WindowModalityController> + window_modality_controller_; scoped_ptr<views::corewm::TooltipController> tooltip_controller_; scoped_ptr<DesktopBackgroundController> desktop_background_controller_; scoped_ptr<PowerButtonController> power_button_controller_; @@ -685,7 +683,7 @@ class ASH_EXPORT Shell scoped_ptr<internal::AcceleratorFilter> accelerator_filter_; // An event filter that pre-handles all key events to send them to an IME. - scoped_ptr< ::wm::InputMethodEventFilter> input_method_filter_; + scoped_ptr<views::corewm::InputMethodEventFilter> input_method_filter_; scoped_ptr<internal::DisplayManager> display_manager_; scoped_ptr<base::WeakPtrFactory<internal::DisplayManager> > @@ -725,7 +723,7 @@ class ASH_EXPORT Shell // |native_cursor_manager_| is owned by |cursor_manager_|, but we keep a // pointer to vend to test code. AshNativeCursorManager* native_cursor_manager_; - ::wm::CursorManager cursor_manager_; + views::corewm::CursorManager cursor_manager_; ObserverList<ShellObserver> observers_; diff --git a/ash/shell/content_client/shell_browser_main_parts.cc b/ash/shell/content_client/shell_browser_main_parts.cc index d809807..edb6e1a 100644 --- a/ash/shell/content_client/shell_browser_main_parts.cc +++ b/ash/shell/content_client/shell_browser_main_parts.cc @@ -98,7 +98,7 @@ void ShellBrowserMainParts::PostMainMessageLoopStart() { } void ShellBrowserMainParts::ToolkitInitialized() { - wm_state_.reset(new wm::WMState); + wm_state_.reset(new views::corewm::WMState); } void ShellBrowserMainParts::PreMainMessageLoopRun() { diff --git a/ash/shell/content_client/shell_browser_main_parts.h b/ash/shell/content_client/shell_browser_main_parts.h index 0e07cbf..229c868 100644 --- a/ash/shell/content_client/shell_browser_main_parts.h +++ b/ash/shell/content_client/shell_browser_main_parts.h @@ -22,9 +22,11 @@ namespace net { class NetLog; } -namespace wm { +namespace views { +namespace corewm { class WMState; } +} namespace ash { namespace shell { @@ -55,7 +57,7 @@ class ShellBrowserMainParts : public content::BrowserMainParts { scoped_ptr<content::ShellBrowserContext> browser_context_; scoped_ptr<ash::shell::WindowWatcher> window_watcher_; ShellDelegateImpl* delegate_; // owned by Shell - scoped_ptr<wm::WMState> wm_state_; + scoped_ptr<views::corewm::WMState> wm_state_; DISALLOW_COPY_AND_ASSIGN(ShellBrowserMainParts); }; diff --git a/ash/shell/window_type_launcher.cc b/ash/shell/window_type_launcher.cc index 9352823..5d1b314 100644 --- a/ash/shell/window_type_launcher.cc +++ b/ash/shell/window_type_launcher.cc @@ -195,8 +195,8 @@ void InitWindowTypeLauncher() { Shell::GetPrimaryRootWindow(), gfx::Rect(120, 150, 300, 410)); widget->GetNativeView()->SetName("WindowTypeLauncher"); - wm::SetShadowType(widget->GetNativeView(), - wm::SHADOW_TYPE_RECTANGULAR); + views::corewm::SetShadowType(widget->GetNativeView(), + views::corewm::SHADOW_TYPE_RECTANGULAR); widget->Show(); } diff --git a/ash/system/tray/tray_background_view.cc b/ash/system/tray/tray_background_view.cc index f6af7c8..c610ee4 100644 --- a/ash/system/tray/tray_background_view.cc +++ b/ash/system/tray/tray_background_view.cc @@ -493,13 +493,13 @@ void TrayBackgroundView::SetTrayBorder() { void TrayBackgroundView::InitializeBubbleAnimations( views::Widget* bubble_widget) { - wm::SetWindowVisibilityAnimationType( + views::corewm::SetWindowVisibilityAnimationType( bubble_widget->GetNativeWindow(), - wm::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE); - wm::SetWindowVisibilityAnimationTransition( + views::corewm::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE); + views::corewm::SetWindowVisibilityAnimationTransition( bubble_widget->GetNativeWindow(), - wm::ANIMATE_HIDE); - wm::SetWindowVisibilityAnimationDuration( + views::corewm::ANIMATE_HIDE); + views::corewm::SetWindowVisibilityAnimationDuration( bubble_widget->GetNativeWindow(), base::TimeDelta::FromMilliseconds(kAnimationDurationForPopupMS)); } diff --git a/ash/system/user/tray_user.cc b/ash/system/user/tray_user.cc index f47a797..ee52b03 100644 --- a/ash/system/user/tray_user.cc +++ b/ash/system/user/tray_user.cc @@ -973,7 +973,7 @@ void UserView::ToggleAddUserMenuOption() { add_menu_option_->SetOpacity(0xFF); add_menu_option_->GetNativeWindow()->set_owned_by_parent(false); SetShadowType(add_menu_option_->GetNativeView(), - wm::SHADOW_TYPE_NONE); + views::corewm::SHADOW_TYPE_NONE); // Position it below our user card. gfx::Rect bounds = user_card_view_->GetBoundsInScreen(); diff --git a/ash/test/ash_test_helper.cc b/ash/test/ash_test_helper.cc index 33dbb83..50e9841 100644 --- a/ash/test/ash_test_helper.cc +++ b/ash/test/ash_test_helper.cc @@ -52,7 +52,7 @@ AshTestHelper::~AshTestHelper() { } void AshTestHelper::SetUp(bool start_session) { - wm_state_.reset(new wm::WMState); + wm_state_.reset(new views::corewm::WMState); // Disable animations during tests. zero_duration_mode_.reset(new ui::ScopedAnimationDurationScaleMode( @@ -126,7 +126,7 @@ void AshTestHelper::TearDown() { ui::ShutdownInputMethodForTesting(); zero_duration_mode_.reset(); - CHECK(!wm::ScopedCaptureClient::IsActive()); + CHECK(!views::corewm::ScopedCaptureClient::IsActive()); wm_state_.reset(); } diff --git a/ash/test/ash_test_helper.h b/ash/test/ash_test_helper.h index a1974cb..706cfeb 100644 --- a/ash/test/ash_test_helper.h +++ b/ash/test/ash_test_helper.h @@ -20,9 +20,11 @@ namespace ui { class ScopedAnimationDurationScaleMode; } // namespace ui -namespace wm { +namespace views { +namespace corewm { class WMState; } +} namespace ash { namespace test { @@ -66,7 +68,7 @@ class AshTestHelper { // Owned by ash::AcceleratorController TestScreenshotDelegate* test_screenshot_delegate_; - scoped_ptr<wm::WMState> wm_state_; + scoped_ptr<views::corewm::WMState> wm_state_; // Check if DBus Thread Manager was initialized here. bool dbus_thread_manager_initialized_; diff --git a/ash/test/cursor_manager_test_api.cc b/ash/test/cursor_manager_test_api.cc index 0b7711b9..b4c289a 100644 --- a/ash/test/cursor_manager_test_api.cc +++ b/ash/test/cursor_manager_test_api.cc @@ -15,7 +15,7 @@ namespace ash { namespace test { CursorManagerTestApi::CursorManagerTestApi( - wm::CursorManager* cursor_manager) + views::corewm::CursorManager* cursor_manager) : cursor_manager_(cursor_manager) { } diff --git a/ash/test/cursor_manager_test_api.h b/ash/test/cursor_manager_test_api.h index d368216..9cffac5 100644 --- a/ash/test/cursor_manager_test_api.h +++ b/ash/test/cursor_manager_test_api.h @@ -13,9 +13,11 @@ namespace gfx { class Display; } -namespace wm { +namespace views { +namespace corewm { class CursorManager; } +} namespace ash { namespace test { @@ -23,7 +25,7 @@ namespace test { // Use the api in this class to test CursorManager. class CursorManagerTestApi { public: - explicit CursorManagerTestApi(::wm::CursorManager* cursor_manager); + explicit CursorManagerTestApi(views::corewm::CursorManager* cursor_manager); ~CursorManagerTestApi(); float GetCurrentScale() const; @@ -32,7 +34,7 @@ class CursorManagerTestApi { gfx::Display GetDisplay() const; private: - ::wm::CursorManager* cursor_manager_; + views::corewm::CursorManager* cursor_manager_; DISALLOW_COPY_AND_ASSIGN(CursorManagerTestApi); }; diff --git a/ash/test/shell_test_api.cc b/ash/test/shell_test_api.cc index 5d2ec11..07efa52 100644 --- a/ash/test/shell_test_api.cc +++ b/ash/test/shell_test_api.cc @@ -22,7 +22,7 @@ internal::RootWindowLayoutManager* ShellTestApi::root_window_layout() { return shell_->GetPrimaryRootWindowController()->root_window_layout(); } -wm::InputMethodEventFilter* +views::corewm::InputMethodEventFilter* ShellTestApi::input_method_event_filter() { return shell_->input_method_filter_.get(); } diff --git a/ash/test/shell_test_api.h b/ash/test/shell_test_api.h index 12e40b7..7306b3d 100644 --- a/ash/test/shell_test_api.h +++ b/ash/test/shell_test_api.h @@ -7,9 +7,11 @@ #include "base/basictypes.h" -namespace wm { +namespace views { +namespace corewm { class InputMethodEventFilter; -} // namespace wm +} // namespace corewm +} // namespace views namespace ash { class AshNativeCursorManager; @@ -35,7 +37,7 @@ public: explicit ShellTestApi(Shell* shell); internal::RootWindowLayoutManager* root_window_layout(); - ::wm::InputMethodEventFilter* input_method_event_filter(); + views::corewm::InputMethodEventFilter* input_method_event_filter(); internal::SystemGestureEventFilter* system_gesture_event_filter(); internal::WorkspaceController* workspace_controller(); internal::ScreenPositionController* screen_position_controller(); diff --git a/ash/wm/ash_focus_rules.cc b/ash/wm/ash_focus_rules.cc index efeaaca..453436d 100644 --- a/ash/wm/ash_focus_rules.cc +++ b/ash/wm/ash_focus_rules.cc @@ -55,7 +55,7 @@ AshFocusRules::~AshFocusRules() { } //////////////////////////////////////////////////////////////////////////////// -// AshFocusRules, ::wm::FocusRules: +// AshFocusRules, views::corewm::FocusRules: bool AshFocusRules::SupportsChildActivation(aura::Window* window) const { if (window->id() == internal::kShellWindowId_DefaultContainer) diff --git a/ash/wm/ash_focus_rules.h b/ash/wm/ash_focus_rules.h index b5774a2..5780573 100644 --- a/ash/wm/ash_focus_rules.h +++ b/ash/wm/ash_focus_rules.h @@ -13,13 +13,13 @@ namespace ash { namespace wm { -class ASH_EXPORT AshFocusRules : public ::wm::BaseFocusRules { +class ASH_EXPORT AshFocusRules : public views::corewm::BaseFocusRules { public: AshFocusRules(); virtual ~AshFocusRules(); private: - // Overridden from ::wm::BaseFocusRules: + // Overridden from views::corewm::BaseFocusRules: virtual bool SupportsChildActivation(aura::Window* window) const OVERRIDE; virtual bool IsWindowConsideredVisibleForActivation( aura::Window* window) const OVERRIDE; diff --git a/ash/wm/ash_native_cursor_manager.cc b/ash/wm/ash_native_cursor_manager.cc index ba56a7c..a8349c0 100644 --- a/ash/wm/ash_native_cursor_manager.cc +++ b/ash/wm/ash_native_cursor_manager.cc @@ -63,14 +63,14 @@ AshNativeCursorManager::~AshNativeCursorManager() { void AshNativeCursorManager::SetNativeCursorEnabled(bool enabled) { native_cursor_enabled_ = enabled; - ::wm::CursorManager* cursor_manager = + views::corewm::CursorManager* cursor_manager = Shell::GetInstance()->cursor_manager(); SetCursor(cursor_manager->GetCursor(), cursor_manager); } void AshNativeCursorManager::SetDisplay( const gfx::Display& display, - ::wm::NativeCursorManagerDelegate* delegate) { + views::corewm::NativeCursorManagerDelegate* delegate) { if (image_cursors_->SetDisplay(display)) SetCursor(delegate->GetCursor(), delegate); #if defined(OS_CHROMEOS) @@ -81,7 +81,7 @@ void AshNativeCursorManager::SetDisplay( void AshNativeCursorManager::SetCursor( gfx::NativeCursor cursor, - ::wm::NativeCursorManagerDelegate* delegate) { + views::corewm::NativeCursorManagerDelegate* delegate) { gfx::NativeCursor new_cursor = cursor; if (native_cursor_enabled_) { image_cursors_->SetPlatformCursor(&new_cursor); @@ -105,7 +105,7 @@ void AshNativeCursorManager::SetCursor( void AshNativeCursorManager::SetCursorSet( ui::CursorSetType cursor_set, - ::wm::NativeCursorManagerDelegate* delegate) { + views::corewm::NativeCursorManagerDelegate* delegate) { image_cursors_->SetCursorSet(cursor_set); delegate->CommitCursorSet(cursor_set); @@ -121,7 +121,7 @@ void AshNativeCursorManager::SetCursorSet( void AshNativeCursorManager::SetScale( float scale, - ::wm::NativeCursorManagerDelegate* delegate) { + views::corewm::NativeCursorManagerDelegate* delegate) { image_cursors_->SetScale(scale); delegate->CommitScale(scale); @@ -131,7 +131,7 @@ void AshNativeCursorManager::SetScale( void AshNativeCursorManager::SetVisibility( bool visible, - ::wm::NativeCursorManagerDelegate* delegate) { + views::corewm::NativeCursorManagerDelegate* delegate) { delegate->CommitVisibility(visible); if (visible) { @@ -147,7 +147,7 @@ void AshNativeCursorManager::SetVisibility( void AshNativeCursorManager::SetMouseEventsEnabled( bool enabled, - ::wm::NativeCursorManagerDelegate* delegate) { + views::corewm::NativeCursorManagerDelegate* delegate) { delegate->CommitMouseEventsEnabled(enabled); if (enabled) { diff --git a/ash/wm/ash_native_cursor_manager.h b/ash/wm/ash_native_cursor_manager.h index 7124bdc..b9a36ffb 100644 --- a/ash/wm/ash_native_cursor_manager.h +++ b/ash/wm/ash_native_cursor_manager.h @@ -28,7 +28,7 @@ class ImageCursors; // NativeCursorManagerDelegate interface, which receives messages about what // changes were acted on. class ASH_EXPORT AshNativeCursorManager - : public ::wm::NativeCursorManager { + : public views::corewm::NativeCursorManager { public: AshNativeCursorManager(); virtual ~AshNativeCursorManager(); @@ -42,25 +42,25 @@ class ASH_EXPORT AshNativeCursorManager private: friend class test::CursorManagerTestApi; - // 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; virtual void SetVisibility( bool visible, - ::wm::NativeCursorManagerDelegate* delegate) OVERRIDE; + views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE; virtual void SetScale( float scale, - ::wm::NativeCursorManagerDelegate* delegate) OVERRIDE; + views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE; virtual void SetCursorSet( ui::CursorSetType cursor_set, - ::wm::NativeCursorManagerDelegate* delegate) OVERRIDE; + views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE; virtual void SetMouseEventsEnabled( bool enabled, - ::wm::NativeCursorManagerDelegate* delegate) OVERRIDE; + views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE; // The cursor location where the cursor was disabled. gfx::Point disabled_cursor_location_; diff --git a/ash/wm/ash_native_cursor_manager_interactive_uitest.cc b/ash/wm/ash_native_cursor_manager_interactive_uitest.cc index 9adb852..97cefdb 100644 --- a/ash/wm/ash_native_cursor_manager_interactive_uitest.cc +++ b/ash/wm/ash_native_cursor_manager_interactive_uitest.cc @@ -21,7 +21,7 @@ namespace ash { -using ::wm::CursorManager; +using views::corewm::CursorManager; typedef test::AshTestBase AshNativeCursorManagerTest; namespace { diff --git a/ash/wm/ash_native_cursor_manager_unittest.cc b/ash/wm/ash_native_cursor_manager_unittest.cc index 5d9ab1e..1e26f53 100644 --- a/ash/wm/ash_native_cursor_manager_unittest.cc +++ b/ash/wm/ash_native_cursor_manager_unittest.cc @@ -19,7 +19,7 @@ #include "ui/base/cursor/cursor_loader_win.h" #endif -using ::wm::CursorManager; +using views::corewm::CursorManager; namespace ash { namespace test { diff --git a/ash/wm/caption_buttons/maximize_bubble_controller_bubble.cc b/ash/wm/caption_buttons/maximize_bubble_controller_bubble.cc index 12e35ec..2753659 100644 --- a/ash/wm/caption_buttons/maximize_bubble_controller_bubble.cc +++ b/ash/wm/caption_buttons/maximize_bubble_controller_bubble.cc @@ -18,7 +18,7 @@ #include "ui/views/controls/label.h" #include "ui/views/layout/box_layout.h" #include "ui/views/mouse_watcher.h" -#include "ui/wm/core/masked_window_targeter.h" +#include "ui/wm/public/masked_window_targeter.h" namespace ash { diff --git a/ash/wm/default_state.cc b/ash/wm/default_state.cc index 1c9909a..a6ea571 100644 --- a/ash/wm/default_state.cc +++ b/ash/wm/default_state.cc @@ -443,7 +443,7 @@ void DefaultState::UpdateBounds(WindowState* window_state, // Save the previous show state so that we can correctly restore it. window_state->window()->SetProperty(aura::client::kRestoreShowStateKey, ToWindowShowState(old_state_type)); - ::wm::SetWindowVisibilityAnimationType( + views::corewm::SetWindowVisibilityAnimationType( window_state->window(), WINDOW_VISIBILITY_ANIMATION_TYPE_MINIMIZE); // Hide the window. diff --git a/ash/wm/dock/docked_window_layout_manager.cc b/ash/wm/dock/docked_window_layout_manager.cc index 63ad210..d81c34a 100644 --- a/ash/wm/dock/docked_window_layout_manager.cc +++ b/ash/wm/dock/docked_window_layout_manager.cc @@ -221,7 +221,7 @@ namespace { // Returns true if a window is a popup or a transient child. bool IsPopupOrTransient(const aura::Window* window) { return (window->type() == ui::wm::WINDOW_TYPE_POPUP || - ::wm::GetTransientParent(window)); + views::corewm::GetTransientParent(window)); } // Certain windows (minimized, hidden or popups) do not matter to docking. @@ -834,15 +834,15 @@ void DockedWindowLayoutManager::OnWindowVisibilityChanging( aura::Window* window, bool visible) { if (IsPopupOrTransient(window)) return; - int animation_type = ::wm::WINDOW_VISIBILITY_ANIMATION_TYPE_DEFAULT; + int animation_type = views::corewm::WINDOW_VISIBILITY_ANIMATION_TYPE_DEFAULT; if (visible) { - animation_type = ::wm::WINDOW_VISIBILITY_ANIMATION_TYPE_DROP; - ::wm::SetWindowVisibilityAnimationDuration( + animation_type = views::corewm::WINDOW_VISIBILITY_ANIMATION_TYPE_DROP; + views::corewm::SetWindowVisibilityAnimationDuration( window, base::TimeDelta::FromMilliseconds(kFadeDurationMs)); } else if (wm::GetWindowState(window)->IsMinimized()) { animation_type = WINDOW_VISIBILITY_ANIMATION_TYPE_MINIMIZE; } - ::wm::SetWindowVisibilityAnimationType(window, animation_type); + views::corewm::SetWindowVisibilityAnimationType(window, animation_type); } void DockedWindowLayoutManager::OnWindowDestroying(aura::Window* window) { diff --git a/ash/wm/dock/docked_window_resizer_unittest.cc b/ash/wm/dock/docked_window_resizer_unittest.cc index 65f7658..82b87ef 100644 --- a/ash/wm/dock/docked_window_resizer_unittest.cc +++ b/ash/wm/dock/docked_window_resizer_unittest.cc @@ -1445,10 +1445,10 @@ TEST_P(DockedWindowResizerTest, DragWindowWithTransientChild) { scoped_ptr<aura::Window> window(CreateTestWindow(gfx::Rect(0, 0, 201, 201))); scoped_ptr<aura::Window> child(CreateTestWindowInShellWithDelegateAndType( NULL, ui::wm::WINDOW_TYPE_NORMAL, 0, gfx::Rect(20, 20, 150, 20))); - ::wm::AddTransientChild(window.get(), child.get()); + views::corewm::AddTransientChild(window.get(), child.get()); if (window->parent() != child->parent()) window->parent()->AddChild(child.get()); - EXPECT_EQ(window.get(), ::wm::GetTransientParent(child.get())); + EXPECT_EQ(window.get(), views::corewm::GetTransientParent(child.get())); DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, window.get(), 20); @@ -1495,8 +1495,8 @@ TEST_P(DockedWindowResizerTest, DragWindowWithModalTransientChild) { // While still dragging create a modal window and make it a transient child of // the |window|. scoped_ptr<aura::Window> child(CreateModalWindow(gfx::Rect(20, 20, 150, 20))); - ::wm::AddTransientChild(window.get(), child.get()); - EXPECT_EQ(window.get(), ::wm::GetTransientParent(child.get())); + views::corewm::AddTransientChild(window.get(), child.get()); + EXPECT_EQ(window.get(), views::corewm::GetTransientParent(child.get())); EXPECT_EQ(internal::kShellWindowId_SystemModalContainer, child->parent()->id()); @@ -1516,7 +1516,7 @@ TEST_P(DockedWindowResizerTest, DragWindowWithModalTransientChild) { EXPECT_EQ(gfx::Point(20, 20).ToString(), child->GetBoundsInScreen().origin().ToString()); // The |child| should still be a transient child of |window|. - EXPECT_EQ(window.get(), ::wm::GetTransientParent(child.get())); + EXPECT_EQ(window.get(), views::corewm::GetTransientParent(child.get())); } // Tests that side snapping a window undocks it, closes the dock and then snaps. diff --git a/ash/wm/drag_window_controller.cc b/ash/wm/drag_window_controller.cc index 516d59f..25d0e04 100644 --- a/ash/wm/drag_window_controller.cc +++ b/ash/wm/drag_window_controller.cc @@ -76,7 +76,7 @@ void DragWindowController::CreateDragWidget(const gfx::Rect& bounds) { drag_widget_->GetNativeWindow()->set_id(kShellWindowId_PhantomWindow); // Show shadow for the dragging window. SetShadowType(drag_widget_->GetNativeWindow(), - ::wm::SHADOW_TYPE_RECTANGULAR); + views::corewm::SHADOW_TYPE_RECTANGULAR); SetBoundsInternal(bounds); drag_widget_->StackAbove(window_); @@ -108,7 +108,7 @@ void DragWindowController::SetBoundsInternal(const gfx::Rect& bounds) { void DragWindowController::RecreateWindowLayers() { DCHECK(!layer_owner_.get()); - layer_owner_ = ::wm::RecreateLayers(window_); + layer_owner_ = views::corewm::RecreateLayers(window_); layer_owner_->root()->set_delegate(window_->layer()->delegate()); // Place the layer at (0, 0) of the DragWindowController's window. gfx::Rect layer_bounds = layer_owner_->root()->bounds(); diff --git a/ash/wm/drag_window_resizer.cc b/ash/wm/drag_window_resizer.cc index 2b91f85..1824e2b 100644 --- a/ash/wm/drag_window_resizer.cc +++ b/ash/wm/drag_window_resizer.cc @@ -206,7 +206,7 @@ void DragWindowResizer::UpdateDragWindow(const gfx::Rect& bounds, bool DragWindowResizer::ShouldAllowMouseWarp() { return (details().window_component == HTCAPTION) && - !::wm::GetTransientParent(GetTarget()) && + !views::corewm::GetTransientParent(GetTarget()) && (GetTarget()->type() == ui::wm::WINDOW_TYPE_NORMAL || GetTarget()->type() == ui::wm::WINDOW_TYPE_PANEL); } diff --git a/ash/wm/drag_window_resizer_unittest.cc b/ash/wm/drag_window_resizer_unittest.cc index 3ea9c3c..bbd3279 100644 --- a/ash/wm/drag_window_resizer_unittest.cc +++ b/ash/wm/drag_window_resizer_unittest.cc @@ -79,7 +79,7 @@ class DragWindowResizerTest : public test::AshTestBase { transient_parent_->SetType(ui::wm::WINDOW_TYPE_NORMAL); transient_parent_->Init(aura::WINDOW_LAYER_NOT_DRAWN); ParentWindowInPrimaryRootWindow(transient_parent_.get()); - ::wm::AddTransientChild(transient_parent_.get(), transient_child_); + views::corewm::AddTransientChild(transient_parent_.get(), transient_child_); transient_parent_->set_id(5); panel_window_.reset(new aura::Window(&delegate6_)); diff --git a/ash/wm/immersive_fullscreen_controller.cc b/ash/wm/immersive_fullscreen_controller.cc index 9912308..9b21269 100644 --- a/ash/wm/immersive_fullscreen_controller.cc +++ b/ash/wm/immersive_fullscreen_controller.cc @@ -87,7 +87,7 @@ bool IsWindowTransientChildOf(aura::Window* maybe_transient, return false; for (aura::Window* window = maybe_transient; window; - window = ::wm::GetTransientParent(window)) { + window = views::corewm::GetTransientParent(window)) { if (window == toplevel) return true; } @@ -527,7 +527,7 @@ void ImmersiveFullscreenController::EnableWindowObservers(bool enable) { widget_->AddObserver(this); focus_manager->AddFocusChangeListener(this); Shell::GetInstance()->AddPreTargetHandler(this); - ::wm::TransientWindowManager::Get(native_window_)-> + views::corewm::TransientWindowManager::Get(native_window_)-> AddObserver(this); RecreateBubbleManager(); @@ -535,7 +535,7 @@ void ImmersiveFullscreenController::EnableWindowObservers(bool enable) { widget_->RemoveObserver(this); focus_manager->RemoveFocusChangeListener(this); Shell::GetInstance()->RemovePreTargetHandler(this); - ::wm::TransientWindowManager::Get(native_window_)-> + views::corewm::TransientWindowManager::Get(native_window_)-> RemoveObserver(this); // We have stopped observing whether transient children are added or removed @@ -919,7 +919,7 @@ bool ImmersiveFullscreenController::ShouldHandleGestureEvent( void ImmersiveFullscreenController::RecreateBubbleManager() { bubble_manager_.reset(new BubbleManager(this)); const std::vector<aura::Window*> transient_children = - ::wm::GetTransientChildren(native_window_); + views::corewm::GetTransientChildren(native_window_); for (size_t i = 0; i < transient_children.size(); ++i) { aura::Window* transient_child = transient_children[i]; views::BubbleDelegateView* bubble_delegate = diff --git a/ash/wm/immersive_fullscreen_controller.h b/ash/wm/immersive_fullscreen_controller.h index b98b32f..9bbc71e 100644 --- a/ash/wm/immersive_fullscreen_controller.h +++ b/ash/wm/immersive_fullscreen_controller.h @@ -41,7 +41,7 @@ namespace ash { class ASH_EXPORT ImmersiveFullscreenController : public gfx::AnimationDelegate, public ui::EventHandler, - public ::wm::TransientWindowObserver, + public views::corewm::TransientWindowObserver, public views::FocusChangeListener, public views::WidgetObserver, public ImmersiveRevealedLock::Delegate { @@ -143,7 +143,7 @@ class ASH_EXPORT ImmersiveFullscreenController virtual void AnimationEnded(const gfx::Animation* animation) OVERRIDE; virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE; - // ::wm::TransientWindowObserver overrides: + // views::corewm::TransientWindowObserver overrides: virtual void OnTransientChildAdded(aura::Window* window, aura::Window* transient) OVERRIDE; virtual void OnTransientChildRemoved(aura::Window* window, diff --git a/ash/wm/maximize_mode/workspace_backdrop_delegate.cc b/ash/wm/maximize_mode/workspace_backdrop_delegate.cc index 54347a2..093e403 100644 --- a/ash/wm/maximize_mode/workspace_backdrop_delegate.cc +++ b/ash/wm/maximize_mode/workspace_backdrop_delegate.cc @@ -51,7 +51,7 @@ WorkspaceBackdropDelegate::~WorkspaceBackdropDelegate() { ui::ScopedLayerAnimationSettings settings( background_->GetNativeView()->layer()->GetAnimator()); background_->Close(); - settings.AddObserver(::wm::CreateHidingWindowAnimationObserver( + settings.AddObserver(views::corewm::CreateHidingWindowAnimationObserver( background_->GetNativeView())); background_->GetNativeView()->layer()->SetOpacity(0.0f); } diff --git a/ash/wm/overview/scoped_transform_overview_window.cc b/ash/wm/overview/scoped_transform_overview_window.cc index bf7cff9..19bbcb5 100644 --- a/ash/wm/overview/scoped_transform_overview_window.cc +++ b/ash/wm/overview/scoped_transform_overview_window.cc @@ -65,7 +65,7 @@ void SetTransformOnWindowAndAllTransientChildren( SetTransformOnWindow(window, transform, animate); aura::Window::Windows transient_children = - ::wm::GetTransientChildren(window); + views::corewm::GetTransientChildren(window); for (aura::Window::Windows::iterator iter = transient_children.begin(); iter != transient_children.end(); ++iter) { aura::Window* transient_child = *iter; @@ -80,7 +80,7 @@ void SetTransformOnWindowAndAllTransientChildren( aura::Window* GetModalTransientParent(aura::Window* window) { if (window->GetProperty(aura::client::kModalKey) == ui::MODAL_TYPE_WINDOW) - return ::wm::GetTransientParent(window); + return views::corewm::GetTransientParent(window); return NULL; } @@ -239,8 +239,8 @@ void ScopedTransformOverviewWindow::SetTransformOnWindowAndTransientChildren( bool animate) { gfx::Point origin(GetBoundsInScreen().origin()); aura::Window* window = window_; - while (::wm::GetTransientParent(window)) - window = ::wm::GetTransientParent(window); + while (views::corewm::GetTransientParent(window)) + window = views::corewm::GetTransientParent(window); for (ScopedVector<ScopedWindowCopy>::const_iterator iter = window_copies_.begin(); iter != window_copies_.end(); ++iter) { SetTransformOnWindow( diff --git a/ash/wm/overview/scoped_window_copy.cc b/ash/wm/overview/scoped_window_copy.cc index c3fa51d..7368b45 100644 --- a/ash/wm/overview/scoped_window_copy.cc +++ b/ash/wm/overview/scoped_window_copy.cc @@ -42,8 +42,8 @@ views::Widget* CreateCopyOfWindow(aura::Window* target_root, widget->SetVisibilityChangedAnimationsEnabled(false); std::string name = src_window->name() + " (Copy)"; widget->GetNativeWindow()->SetName(name); - ::wm::SetShadowType(widget->GetNativeWindow(), - ::wm::SHADOW_TYPE_RECTANGULAR); + views::corewm::SetShadowType(widget->GetNativeWindow(), + views::corewm::SHADOW_TYPE_RECTANGULAR); // Set the bounds in the target root window. gfx::Display target_display = @@ -160,7 +160,7 @@ void CleanupWidgetAfterAnimationObserver::MaybeDestruct() { ScopedWindowCopy::ScopedWindowCopy(aura::Window* target_root, aura::Window* src_window) { scoped_ptr<ui::LayerTreeOwner> layer_owner = - ::wm::RecreateLayers(src_window); + views::corewm::RecreateLayers(src_window); widget_ = CreateCopyOfWindow(target_root, src_window, layer_owner->root()); cleanup_observer_ = new CleanupWidgetAfterAnimationObserver(widget_, layer_owner.Pass()); diff --git a/ash/wm/overview/window_selector.cc b/ash/wm/overview/window_selector.cc index c36be04..18f04b3 100644 --- a/ash/wm/overview/window_selector.cc +++ b/ash/wm/overview/window_selector.cc @@ -361,7 +361,7 @@ void WindowSelector::OnWindowAdded(aura::Window* new_window) { for (size_t i = 0; i < kSwitchableWindowContainerIdsLength; ++i) { if (new_window->parent()->id() == kSwitchableWindowContainerIds[i] && - !::wm::GetTransientParent(new_window)) { + !views::corewm::GetTransientParent(new_window)) { // The new window is in one of the switchable containers, abort overview. CancelSelection(); return; diff --git a/ash/wm/overview/window_selector_item.h b/ash/wm/overview/window_selector_item.h index eedf3e1..0ea7178 100644 --- a/ash/wm/overview/window_selector_item.h +++ b/ash/wm/overview/window_selector_item.h @@ -86,7 +86,7 @@ class WindowSelectorItem { gfx::Rect bounds_; // True if running SetItemBounds. This prevents recursive calls resulting from - // the bounds update when calling ::wm::RecreateWindowLayers to copy + // the bounds update when calling views::corewm::RecreateWindowLayers to copy // a window layer for display on another monitor. bool in_bounds_update_; diff --git a/ash/wm/overview/window_selector_unittest.cc b/ash/wm/overview/window_selector_unittest.cc index cc6bbde..e88e25a 100644 --- a/ash/wm/overview/window_selector_unittest.cc +++ b/ash/wm/overview/window_selector_unittest.cc @@ -728,7 +728,7 @@ TEST_F(WindowSelectorTest, ModalChild) { scoped_ptr<aura::Window> window1(CreateWindow(bounds)); scoped_ptr<aura::Window> child1(CreateWindow(bounds)); child1->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_WINDOW); - ::wm::AddTransientChild(window1.get(), child1.get()); + views::corewm::AddTransientChild(window1.get(), child1.get()); EXPECT_EQ(window1->parent(), child1->parent()); ToggleOverview(); EXPECT_TRUE(window1->IsVisible()); @@ -744,7 +744,7 @@ TEST_F(WindowSelectorTest, ClickModalWindowParent) { scoped_ptr<aura::Window> window1(CreateWindow(gfx::Rect(0, 0, 180, 180))); scoped_ptr<aura::Window> child1(CreateWindow(gfx::Rect(200, 0, 180, 180))); child1->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_WINDOW); - ::wm::AddTransientChild(window1.get(), child1.get()); + views::corewm::AddTransientChild(window1.get(), child1.get()); EXPECT_FALSE(WindowsOverlapping(window1.get(), child1.get())); EXPECT_EQ(window1->parent(), child1->parent()); ToggleOverview(); @@ -865,7 +865,7 @@ TEST_F(WindowSelectorTest, CycleMultipleDisplaysCopiesWindows) { unmoved2->SetName("unmoved2"); moved1->SetName("moved1"); moved1->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_WINDOW); - ::wm::AddTransientChild(moved1_trans_parent.get(), moved1.get()); + views::corewm::AddTransientChild(moved1_trans_parent.get(), moved1.get()); moved1_trans_parent->SetName("moved1_trans_parent"); EXPECT_EQ(root_windows[0], moved1->GetRootWindow()); diff --git a/ash/wm/panels/panel_layout_manager.cc b/ash/wm/panels/panel_layout_manager.cc index 690c23a..9392303 100644 --- a/ash/wm/panels/panel_layout_manager.cc +++ b/ash/wm/panels/panel_layout_manager.cc @@ -545,7 +545,7 @@ void PanelLayoutManager::WillChangeVisibilityState( // PanelLayoutManager private implementation: void PanelLayoutManager::MinimizePanel(aura::Window* panel) { - ::wm::SetWindowVisibilityAnimationType( + views::corewm::SetWindowVisibilityAnimationType( panel, WINDOW_VISIBILITY_ANIMATION_TYPE_MINIMIZE); ui::Layer* layer = panel->layer(); ui::ScopedLayerAnimationSettings panel_slide_settings(layer->GetAnimator()); diff --git a/ash/wm/panels/panel_window_resizer_unittest.cc b/ash/wm/panels/panel_window_resizer_unittest.cc index 4debaed..74329f0 100644 --- a/ash/wm/panels/panel_window_resizer_unittest.cc +++ b/ash/wm/panels/panel_window_resizer_unittest.cc @@ -508,10 +508,10 @@ TEST_P(PanelWindowResizerTransientTest, PanelWithTransientChild) { scoped_ptr<aura::Window> window(CreatePanelWindow(gfx::Point(0, 0))); scoped_ptr<aura::Window> child(CreateTestWindowInShellWithDelegateAndType( NULL, transient_window_type_, 0, gfx::Rect(20, 20, 150, 40))); - ::wm::AddTransientChild(window.get(), child.get()); + views::corewm::AddTransientChild(window.get(), child.get()); if (window->parent() != child->parent()) window->parent()->AddChild(child.get()); - EXPECT_EQ(window.get(), ::wm::GetTransientParent(child.get())); + EXPECT_EQ(window.get(), views::corewm::GetTransientParent(child.get())); // Drag the child to the shelf. Its new position should not be overridden. const gfx::Rect attached_bounds(window->GetBoundsInScreen()); diff --git a/ash/wm/resize_shadow.cc b/ash/wm/resize_shadow.cc index 65f6623..7d4a61c 100644 --- a/ash/wm/resize_shadow.cc +++ b/ash/wm/resize_shadow.cc @@ -49,7 +49,7 @@ ResizeShadow::~ResizeShadow() {} void ResizeShadow::Init(aura::Window* window) { // Set up our image grid and images. ResourceBundle& res = ResourceBundle::GetSharedInstance(); - image_grid_.reset(new ::wm::ImageGrid); + image_grid_.reset(new views::corewm::ImageGrid); image_grid_->SetImages( &res.GetImageNamed(IDR_AURA_RESIZE_SHADOW_TOP_LEFT), &res.GetImageNamed(IDR_AURA_RESIZE_SHADOW_TOP), diff --git a/ash/wm/resize_shadow.h b/ash/wm/resize_shadow.h index 8b05d92..f61f393 100644 --- a/ash/wm/resize_shadow.h +++ b/ash/wm/resize_shadow.h @@ -17,9 +17,11 @@ class Rect; namespace ui { class Layer; } -namespace wm { +namespace views { +namespace corewm { class ImageGrid; } +} namespace ash { namespace internal { @@ -51,7 +53,7 @@ class ResizeShadow { private: // Images for the shadow effect. - scoped_ptr< ::wm::ImageGrid> image_grid_; + scoped_ptr<views::corewm::ImageGrid> image_grid_; // Hit test value from last call to ShowForHitTest(). Used to prevent // repeatedly triggering the same animations for the same hit. diff --git a/ash/wm/stacking_controller.cc b/ash/wm/stacking_controller.cc index 62263d4..b99f832 100644 --- a/ash/wm/stacking_controller.cc +++ b/ash/wm/stacking_controller.cc @@ -39,8 +39,8 @@ bool IsSystemModal(aura::Window* window) { } bool HasTransientParentWindow(const aura::Window* window) { - return ::wm::GetTransientParent(window) && - ::wm::GetTransientParent(window)->type() != + return views::corewm::GetTransientParent(window) && + views::corewm::GetTransientParent(window)->type() != ui::wm::WINDOW_TYPE_UNKNOWN; } @@ -68,7 +68,7 @@ aura::Window* StackingController::GetDefaultParent(aura::Window* context, aura::Window* window, const gfx::Rect& bounds) { aura::Window* target_root = NULL; - aura::Window* transient_parent = ::wm::GetTransientParent(window); + aura::Window* transient_parent = views::corewm::GetTransientParent(window); if (transient_parent) { // Transient window should use the same root as its transient parent. target_root = transient_parent->GetRootWindow(); @@ -83,7 +83,7 @@ aura::Window* StackingController::GetDefaultParent(aura::Window* context, return GetSystemModalContainer(target_root, window); else if (HasTransientParentWindow(window)) return internal::RootWindowController::GetContainerForWindow( - ::wm::GetTransientParent(window)); + views::corewm::GetTransientParent(window)); return GetAlwaysOnTopController(target_root)->GetContainer(window); case ui::wm::WINDOW_TYPE_CONTROL: return GetContainerById( @@ -123,7 +123,7 @@ aura::Window* StackingController::GetSystemModalContainer( SessionStateDelegate* session_state_delegate = Shell::GetInstance()->session_state_delegate(); if (!session_state_delegate->IsUserSessionBlocked() || - !::wm::GetTransientParent(window)) { + !views::corewm::GetTransientParent(window)) { return GetContainerById(root, internal::kShellWindowId_SystemModalContainer); } @@ -131,7 +131,7 @@ aura::Window* StackingController::GetSystemModalContainer( // Otherwise those that originate from LockScreen container and above are // placed in the screen lock modal container. int window_container_id = - ::wm::GetTransientParent(window)->parent()->id(); + views::corewm::GetTransientParent(window)->parent()->id(); aura::Window* container = NULL; if (window_container_id < internal::kShellWindowId_LockScreenContainer) { container = GetContainerById( diff --git a/ash/wm/stacking_controller_unittest.cc b/ash/wm/stacking_controller_unittest.cc index c975169..4b9edc2 100644 --- a/ash/wm/stacking_controller_unittest.cc +++ b/ash/wm/stacking_controller_unittest.cc @@ -49,7 +49,7 @@ TEST_F(StackingControllerTest, TransientParent) { // Window with a transient parent. scoped_ptr<Window> w1(CreateTestWindow()); - ::wm::AddTransientChild(w2.get(), w1.get()); + views::corewm::AddTransientChild(w2.get(), w1.get()); w1->SetBounds(gfx::Rect(10, 11, 250, 251)); ParentWindowInPrimaryRootWindow(w1.get()); w1->Show(); diff --git a/ash/wm/system_modal_container_layout_manager.cc b/ash/wm/system_modal_container_layout_manager.cc index faba106..42cbb05 100644 --- a/ash/wm/system_modal_container_layout_manager.cc +++ b/ash/wm/system_modal_container_layout_manager.cc @@ -177,7 +177,7 @@ void SystemModalContainerLayoutManager::DestroyModalBackground() { ui::ScopedLayerAnimationSettings settings( modal_background_->GetNativeView()->layer()->GetAnimator()); modal_background_->Close(); - settings.AddObserver(::wm::CreateHidingWindowAnimationObserver( + settings.AddObserver(views::corewm::CreateHidingWindowAnimationObserver( modal_background_->GetNativeView())); modal_background_->GetNativeView()->layer()->SetOpacity(0.0f); modal_background_ = NULL; diff --git a/ash/wm/system_modal_container_layout_manager_unittest.cc b/ash/wm/system_modal_container_layout_manager_unittest.cc index af7c4f3..530e447 100644 --- a/ash/wm/system_modal_container_layout_manager_unittest.cc +++ b/ash/wm/system_modal_container_layout_manager_unittest.cc @@ -162,7 +162,7 @@ TEST_F(SystemModalContainerLayoutManagerTest, NonModalTransient) { TransientWindowObserver destruction_observer; transient->AddObserver(&destruction_observer); - EXPECT_EQ(parent.get(), ::wm::GetTransientParent(transient)); + EXPECT_EQ(parent.get(), views::corewm::GetTransientParent(transient)); EXPECT_EQ(parent->parent(), transient->parent()); // The transient should be destroyed with its parent. @@ -179,7 +179,7 @@ TEST_F(SystemModalContainerLayoutManagerTest, ModalTransient) { TransientWindowObserver do1; t1->AddObserver(&do1); - EXPECT_EQ(parent.get(), ::wm::GetTransientParent(t1)); + EXPECT_EQ(parent.get(), views::corewm::GetTransientParent(t1)); EXPECT_EQ(GetModalContainer(), t1->parent()); // t1 should now be active. @@ -197,7 +197,7 @@ TEST_F(SystemModalContainerLayoutManagerTest, ModalTransient) { EXPECT_TRUE(wm::IsActiveWindow(t2)); - EXPECT_EQ(t1, ::wm::GetTransientParent(t2)); + EXPECT_EQ(t1, views::corewm::GetTransientParent(t2)); EXPECT_EQ(GetModalContainer(), t2->parent()); // t2 should still be active, even after clicking on t1. @@ -218,7 +218,7 @@ TEST_F(SystemModalContainerLayoutManagerTest, ModalNonTransient) { TransientWindowObserver do1; t1->AddObserver(&do1); - EXPECT_EQ(NULL, ::wm::GetTransientParent(t1.get())); + EXPECT_EQ(NULL, views::corewm::GetTransientParent(t1.get())); EXPECT_EQ(GetModalContainer(), t1->parent()); // t1 should now be active. @@ -237,7 +237,7 @@ TEST_F(SystemModalContainerLayoutManagerTest, ModalNonTransient) { EXPECT_TRUE(wm::IsActiveWindow(t2)); - EXPECT_EQ(t1, ::wm::GetTransientParent(t2)); + EXPECT_EQ(t1, views::corewm::GetTransientParent(t2)); EXPECT_EQ(GetModalContainer(), t2->parent()); // t2 should still be active, even after clicking on t1. diff --git a/ash/wm/toplevel_window_event_handler_unittest.cc b/ash/wm/toplevel_window_event_handler_unittest.cc index 437a519..1d24cc6 100644 --- a/ash/wm/toplevel_window_event_handler_unittest.cc +++ b/ash/wm/toplevel_window_event_handler_unittest.cc @@ -357,7 +357,7 @@ TEST_F(ToplevelWindowEventHandlerTest, DontDragIfModalChild) { scoped_ptr<aura::Window> w2(CreateWindow(HTCAPTION)); w2->SetBounds(gfx::Rect(100, 0, 100, 100)); w2->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_WINDOW); - ::wm::AddTransientChild(w1.get(), w2.get()); + views::corewm::AddTransientChild(w1.get(), w2.get()); gfx::Size size = w1->bounds().size(); // Attempt to drag w1, position and size should not change because w1 has a diff --git a/ash/wm/window_animations.cc b/ash/wm/window_animations.cc index 7bae5a3..a5b3653 100644 --- a/ash/wm/window_animations.cc +++ b/ash/wm/window_animations.cc @@ -69,7 +69,7 @@ int64 Round64(float f) { base::TimeDelta GetCrossFadeDuration(aura::Window* window, const gfx::Rect& old_bounds, const gfx::Rect& new_bounds) { - if (::wm::WindowAnimationsDisabled(window)) + if (views::corewm::WindowAnimationsDisabled(window)) return base::TimeDelta(); int old_area = old_bounds.width() * old_bounds.height(); @@ -165,8 +165,8 @@ void AnimateShowWindow_Minimize(aura::Window* window) { // Now that the window has been restored, we need to clear its animation style // to default so that normal animation applies. - ::wm::SetWindowVisibilityAnimationType( - window, ::wm::WINDOW_VISIBILITY_ANIMATION_TYPE_DEFAULT); + views::corewm::SetWindowVisibilityAnimationType( + window, views::corewm::WINDOW_VISIBILITY_ANIMATION_TYPE_DEFAULT); } void AnimateHideWindow_Minimize(aura::Window* window) { @@ -178,7 +178,7 @@ void AnimateHideWindow_Minimize(aura::Window* window) { kLayerAnimationsForMinimizeDurationMS); settings.SetTransitionDuration(duration); settings.AddObserver( - ::wm::CreateHidingWindowAnimationObserver(window)); + views::corewm::CreateHidingWindowAnimationObserver(window)); window->layer()->SetVisible(false); AddLayerAnimationsForMinimize(window, false); @@ -211,7 +211,7 @@ void AnimateShowHideWindowCommon_BrightnessGrayscale(aura::Window* window, settings.SetTransitionDuration(duration); if (!show) { settings.AddObserver( - ::wm::CreateHidingWindowAnimationObserver(window)); + views::corewm::CreateHidingWindowAnimationObserver(window)); } window->layer()->GetAnimator()-> @@ -232,12 +232,12 @@ void AnimateHideWindow_BrightnessGrayscale(aura::Window* window) { } bool AnimateShowWindow(aura::Window* window) { - if (!::wm::HasWindowVisibilityAnimationTransition( - window, ::wm::ANIMATE_SHOW)) { + if (!views::corewm::HasWindowVisibilityAnimationTransition( + window, views::corewm::ANIMATE_SHOW)) { return false; } - switch (::wm::GetWindowVisibilityAnimationType(window)) { + switch (views::corewm::GetWindowVisibilityAnimationType(window)) { case WINDOW_VISIBILITY_ANIMATION_TYPE_MINIMIZE: AnimateShowWindow_Minimize(window); return true; @@ -251,12 +251,12 @@ bool AnimateShowWindow(aura::Window* window) { } bool AnimateHideWindow(aura::Window* window) { - if (!::wm::HasWindowVisibilityAnimationTransition( - window, ::wm::ANIMATE_HIDE)) { + if (!views::corewm::HasWindowVisibilityAnimationTransition( + window, views::corewm::ANIMATE_HIDE)) { return false; } - switch (::wm::GetWindowVisibilityAnimationType(window)) { + switch (views::corewm::GetWindowVisibilityAnimationType(window)) { case WINDOW_VISIBILITY_ANIMATION_TYPE_MINIMIZE: AnimateHideWindow_Minimize(window); return true; @@ -401,11 +401,11 @@ base::TimeDelta CrossFadeAnimation( } bool AnimateOnChildWindowVisibilityChanged(aura::Window* window, bool visible) { - if (::wm::WindowAnimationsDisabled(window)) + if (views::corewm::WindowAnimationsDisabled(window)) return false; // Attempt to run CoreWm supplied animation types. - if (::wm::AnimateOnChildWindowVisibilityChanged(window, visible)) + if (views::corewm::AnimateOnChildWindowVisibilityChanged(window, visible)) return true; // Otherwise try to run an Ash-specific animation. diff --git a/ash/wm/window_animations.h b/ash/wm/window_animations.h index 8d3e198..fe76767 100644 --- a/ash/wm/window_animations.h +++ b/ash/wm/window_animations.h @@ -30,7 +30,7 @@ namespace ash { enum WindowVisibilityAnimationType { // Window scale/rotates down to its launcher icon. WINDOW_VISIBILITY_ANIMATION_TYPE_MINIMIZE = - ::wm::WINDOW_VISIBILITY_ANIMATION_MAX, + views::corewm::WINDOW_VISIBILITY_ANIMATION_MAX, // Fade in/out using brightness and grayscale web filters. WINDOW_VISIBILITY_ANIMATION_TYPE_BRIGHTNESS_GRAYSCALE }; diff --git a/ash/wm/window_animations_unittest.cc b/ash/wm/window_animations_unittest.cc index 91d7a76..a732956 100644 --- a/ash/wm/window_animations_unittest.cc +++ b/ash/wm/window_animations_unittest.cc @@ -71,7 +71,7 @@ TEST_F(WindowAnimationsTest, HideShowBrightnessGrayscaleAnimation) { EXPECT_TRUE(window->layer()->visible()); // Hiding. - ::wm::SetWindowVisibilityAnimationType( + views::corewm::SetWindowVisibilityAnimationType( window.get(), WINDOW_VISIBILITY_ANIMATION_TYPE_BRIGHTNESS_GRAYSCALE); AnimateOnChildWindowVisibilityChanged(window.get(), false); @@ -80,7 +80,7 @@ TEST_F(WindowAnimationsTest, HideShowBrightnessGrayscaleAnimation) { EXPECT_FALSE(window->layer()->visible()); // Showing. - ::wm::SetWindowVisibilityAnimationType( + views::corewm::SetWindowVisibilityAnimationType( window.get(), WINDOW_VISIBILITY_ANIMATION_TYPE_BRIGHTNESS_GRAYSCALE); AnimateOnChildWindowVisibilityChanged(window.get(), true); diff --git a/ash/wm/window_manager_unittest.cc b/ash/wm/window_manager_unittest.cc index d6672fe..ac72def 100644 --- a/ash/wm/window_manager_unittest.cc +++ b/ash/wm/window_manager_unittest.cc @@ -665,7 +665,7 @@ TEST_F(WindowManagerTest, AdditionalFilters) { scoped_ptr<CustomEventHandler> f2(new CustomEventHandler); // Adds them to root window event filter. - ::wm::CompoundEventFilter* env_filter = + views::corewm::CompoundEventFilter* env_filter = Shell::GetInstance()->env_filter(); env_filter->AddHandler(f1.get()); env_filter->AddHandler(f2.get()); @@ -733,7 +733,7 @@ TEST_F(WindowManagerTest, AdditionalFilters) { // our internal tracking of the cursor state on ChromeOS (crbug.com/333952). TEST_F(WindowManagerTest, UpdateCursorVisibility) { aura::test::EventGenerator& generator = GetEventGenerator(); - ::wm::CursorManager* cursor_manager = + views::corewm::CursorManager* cursor_manager = ash::Shell::GetInstance()->cursor_manager(); generator.MoveMouseTo(gfx::Point(0, 0)); @@ -754,7 +754,7 @@ TEST_F(WindowManagerTest, UpdateCursorVisibility) { // (crbug.com/304296). TEST_F(WindowManagerTest, UpdateCursorVisibilityOnKeyEvent) { aura::test::EventGenerator& generator = GetEventGenerator(); - ::wm::CursorManager* cursor_manager = + views::corewm::CursorManager* cursor_manager = ash::Shell::GetInstance()->cursor_manager(); // Pressing a key hides the cursor but does not disable mouse events. @@ -777,7 +777,7 @@ TEST_F(WindowManagerTest, UpdateCursorVisibilityOnKeyEvent) { TEST_F(WindowManagerTest, TestCursorClientObserver) { aura::test::EventGenerator& generator = GetEventGenerator(); - ::wm::CursorManager* cursor_manager = + views::corewm::CursorManager* cursor_manager = ash::Shell::GetInstance()->cursor_manager(); scoped_ptr<aura::Window> w1(CreateTestWindowInShell( diff --git a/ash/wm/window_modality_controller_unittest.cc b/ash/wm/window_modality_controller_unittest.cc index c829171..d87326b 100644 --- a/ash/wm/window_modality_controller_unittest.cc +++ b/ash/wm/window_modality_controller_unittest.cc @@ -51,14 +51,14 @@ TEST_F(WindowModalityControllerTest, BasicActivation) { scoped_ptr<aura::Window> w12( CreateTestWindowInShellWithDelegate(&d, -12, gfx::Rect())); - ::wm::AddTransientChild(w1.get(), w11.get()); + views::corewm::AddTransientChild(w1.get(), w11.get()); wm::ActivateWindow(w1.get()); EXPECT_TRUE(wm::IsActiveWindow(w1.get())); wm::ActivateWindow(w11.get()); EXPECT_TRUE(wm::IsActiveWindow(w11.get())); w12->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_WINDOW); - ::wm::AddTransientChild(w1.get(), w12.get()); + views::corewm::AddTransientChild(w1.get(), w12.get()); wm::ActivateWindow(w12.get()); EXPECT_TRUE(wm::IsActiveWindow(w12.get())); @@ -98,8 +98,8 @@ TEST_F(WindowModalityControllerTest, NestedModals) { scoped_ptr<aura::Window> w2( CreateTestWindowInShellWithDelegate(&d, -2, gfx::Rect())); - ::wm::AddTransientChild(w1.get(), w11.get()); - ::wm::AddTransientChild(w11.get(), w111.get()); + views::corewm::AddTransientChild(w1.get(), w11.get()); + views::corewm::AddTransientChild(w11.get(), w111.get()); wm::ActivateWindow(w1.get()); EXPECT_TRUE(wm::IsActiveWindow(w1.get())); @@ -152,8 +152,8 @@ TEST_F(WindowModalityControllerTest, NestedModalsOuterClosed) { scoped_ptr<aura::Window> w2( CreateTestWindowInShellWithDelegate(&d, -2, gfx::Rect())); - ::wm::AddTransientChild(w1.get(), w11.get()); - ::wm::AddTransientChild(w11.get(), w111); + views::corewm::AddTransientChild(w1.get(), w11.get()); + views::corewm::AddTransientChild(w11.get(), w111); wm::ActivateWindow(w1.get()); EXPECT_TRUE(wm::IsActiveWindow(w1.get())); @@ -186,7 +186,7 @@ TEST_F(WindowModalityControllerTest, Events) { scoped_ptr<aura::Window> w11(CreateTestWindowInShellWithDelegate(&d, -11, gfx::Rect(20, 20, 50, 50))); - ::wm::AddTransientChild(w1.get(), w11.get()); + views::corewm::AddTransientChild(w1.get(), w11.get()); { // Clicking a point within w1 should activate that window. @@ -221,21 +221,21 @@ TEST_F(WindowModalityControllerTest, GetModalTransient) { w2->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_WINDOW); aura::Window* wt; - wt = ::wm::GetModalTransient(w1.get()); + wt = views::corewm::GetModalTransient(w1.get()); ASSERT_EQ(static_cast<aura::Window*>(NULL), wt); // Parent w2 to w1. It should get parented to the parent of w1. - ::wm::AddTransientChild(w1.get(), w2.get()); + views::corewm::AddTransientChild(w1.get(), w2.get()); ASSERT_EQ(2U, w1->parent()->children().size()); EXPECT_EQ(-2, w1->parent()->children().at(1)->id()); // Request the modal transient window for w1, it should be w2. - wt = ::wm::GetModalTransient(w1.get()); + wt = views::corewm::GetModalTransient(w1.get()); ASSERT_NE(static_cast<aura::Window*>(NULL), wt); EXPECT_EQ(-2, wt->id()); // Request the modal transient window for w11, it should also be w2. - wt = ::wm::GetModalTransient(w11.get()); + wt = views::corewm::GetModalTransient(w11.get()); ASSERT_NE(static_cast<aura::Window*>(NULL), wt); EXPECT_EQ(-2, wt->id()); } @@ -327,7 +327,7 @@ TEST_F(WindowModalityControllerTest, TouchEvent) { aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(), gfx::Point(10, 10)); - ::wm::AddTransientChild(w1.get(), w11.get()); + views::corewm::AddTransientChild(w1.get(), w11.get()); d1.reset(); d11.reset(); @@ -516,7 +516,7 @@ TEST_F(WindowModalityControllerTest, WindowModalAncestor) { scoped_ptr<aura::Window> w4( CreateTestWindowInShellWithDelegate(&d, -2, gfx::Rect())); w4->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_WINDOW); - ::wm::AddTransientChild(w1.get(), w4.get()); + views::corewm::AddTransientChild(w1.get(), w4.get()); wm::ActivateWindow(w1.get()); EXPECT_TRUE(wm::IsActiveWindow(w4.get())); @@ -544,8 +544,8 @@ TEST_F(WindowModalityControllerTest, ChildModalAncestor) { scoped_ptr<aura::Window> w4( CreateTestWindowInShellWithDelegate(&d, -2, gfx::Rect())); w4->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_CHILD); - ::wm::SetModalParent(w4.get(), w2.get()); - ::wm::AddTransientChild(w1.get(), w4.get()); + views::corewm::SetModalParent(w4.get(), w2.get()); + views::corewm::AddTransientChild(w1.get(), w4.get()); wm::ActivateWindow(w1.get()); EXPECT_TRUE(wm::IsActiveWindow(w1.get())); diff --git a/ash/wm/window_positioner.cc b/ash/wm/window_positioner.cc index 56d3ac9..a06ea47 100644 --- a/ash/wm/window_positioner.cc +++ b/ash/wm/window_positioner.cc @@ -114,7 +114,7 @@ void SetBoundsAnimated(aura::Window* window, const gfx::Rect& bounds) { if (bounds == window->GetTargetBounds()) return; - if (::wm::WindowAnimationsDisabled(window)) { + if (views::corewm::WindowAnimationsDisabled(window)) { window->SetBounds(bounds); return; } diff --git a/ash/wm/window_state.cc b/ash/wm/window_state.cc index b20682b..8f69a36 100644 --- a/ash/wm/window_state.cc +++ b/ash/wm/window_state.cc @@ -184,12 +184,12 @@ bool WindowState::CanResize() const { } bool WindowState::CanActivate() const { - return ::wm::CanActivateWindow(window_); + return views::corewm::CanActivateWindow(window_); } bool WindowState::CanSnap() const { if (!CanResize() || window_->type() == ui::wm::WINDOW_TYPE_PANEL || - ::wm::GetTransientParent(window_)) + views::corewm::GetTransientParent(window_)) return false; // If a window has a maximum size defined, snapping may make it too big. // TODO(oshima): We probably should snap if possible. @@ -392,7 +392,7 @@ void WindowState::SetBoundsDirectCrossFade(const gfx::Rect& new_bounds) { // Specify |set_bounds| to true here to keep the old bounds in the child // windows of |window|. scoped_ptr<ui::LayerTreeOwner> old_layer_owner = - ::wm::RecreateLayers(window_); + views::corewm::RecreateLayers(window_); ui::Layer* old_layer = old_layer_owner->root(); DCHECK(old_layer); ui::Layer* new_layer = window_->layer(); diff --git a/ash/wm/window_util.cc b/ash/wm/window_util.cc index a61b411..d37825e 100644 --- a/ash/wm/window_util.cc +++ b/ash/wm/window_util.cc @@ -46,15 +46,15 @@ int GetDefaultSnappedWindowWidth(aura::Window* window) { // TODO(beng): replace many of these functions with the corewm versions. void ActivateWindow(aura::Window* window) { - ::wm::ActivateWindow(window); + views::corewm::ActivateWindow(window); } void DeactivateWindow(aura::Window* window) { - ::wm::DeactivateWindow(window); + views::corewm::DeactivateWindow(window); } bool IsActiveWindow(aura::Window* window) { - return ::wm::IsActiveWindow(window); + return views::corewm::IsActiveWindow(window); } aura::Window* GetActiveWindow() { @@ -63,11 +63,11 @@ aura::Window* GetActiveWindow() { } aura::Window* GetActivatableWindow(aura::Window* window) { - return ::wm::GetActivatableWindow(window); + return views::corewm::GetActivatableWindow(window); } bool CanActivateWindow(aura::Window* window) { - return ::wm::CanActivateWindow(window); + return views::corewm::CanActivateWindow(window); } bool IsWindowMinimized(aura::Window* window) { @@ -177,10 +177,10 @@ void ReparentTransientChildrenOfChild(aura::Window* child, aura::Window* old_parent, aura::Window* new_parent) { for (size_t i = 0; - i < ::wm::GetTransientChildren(child).size(); + i < views::corewm::GetTransientChildren(child).size(); ++i) { ReparentChildWithTransientChildren( - ::wm::GetTransientChildren(child)[i], + views::corewm::GetTransientChildren(child)[i], old_parent, new_parent); } diff --git a/ash/wm/workspace/multi_window_resize_controller.cc b/ash/wm/workspace/multi_window_resize_controller.cc index df43914..36cebc21 100644 --- a/ash/wm/workspace/multi_window_resize_controller.cc +++ b/ash/wm/workspace/multi_window_resize_controller.cc @@ -100,7 +100,7 @@ class MultiWindowResizeController::ResizeView : public views::View { virtual gfx::NativeCursor GetCursor( const ui::MouseEvent& event) OVERRIDE { int component = (direction_ == LEFT_RIGHT) ? HTRIGHT : HTBOTTOM; - return ::wm::CompoundEventFilter::CursorForWindowComponent( + return views::corewm::CompoundEventFilter::CursorForWindowComponent( component); } @@ -393,9 +393,9 @@ void MultiWindowResizeController::ShowNow() { ResizeView* view = new ResizeView(this, windows_.direction); resize_widget_->set_focus_on_creation(false); resize_widget_->Init(params); - ::wm::SetWindowVisibilityAnimationType( + views::corewm::SetWindowVisibilityAnimationType( resize_widget_->GetNativeWindow(), - ::wm::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE); + views::corewm::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE); resize_widget_->GetNativeWindow()->SetName("MultiWindowResizeController"); resize_widget_->SetContentsView(view); show_bounds_in_screen_ = ScreenUtil::ConvertRectToScreen( diff --git a/ash/wm/workspace/workspace_event_handler_unittest.cc b/ash/wm/workspace/workspace_event_handler_unittest.cc index de17d09..62a48c9 100644 --- a/ash/wm/workspace/workspace_event_handler_unittest.cc +++ b/ash/wm/workspace/workspace_event_handler_unittest.cc @@ -290,7 +290,7 @@ TEST_F(WorkspaceEventHandlerTest, wd1.set_window_component(HTCAPTION); child->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_WINDOW); - ::wm::AddTransientChild(window.get(), child.get()); + views::corewm::AddTransientChild(window.get(), child.get()); wm::WindowState* window_state = wm::GetWindowState(window.get()); EXPECT_FALSE(window_state->IsMaximized()); diff --git a/ash/wm/workspace/workspace_layout_manager_unittest.cc b/ash/wm/workspace/workspace_layout_manager_unittest.cc index 1765b09..3ff0411 100644 --- a/ash/wm/workspace/workspace_layout_manager_unittest.cc +++ b/ash/wm/workspace/workspace_layout_manager_unittest.cc @@ -338,7 +338,7 @@ TEST_F(WorkspaceLayoutManagerTest, DontClobberRestoreBounds) { scoped_ptr<aura::Window> window2( CreateTestWindowInShellWithBounds(gfx::Rect(12, 20, 30, 40))); - ::wm::AddTransientChild(window.get(), window2.get()); + views::corewm::AddTransientChild(window.get(), window2.get()); window2->Show(); window_observer.set_window(window2.get()); diff --git a/ash/wm/workspace/workspace_window_resizer.cc b/ash/wm/workspace/workspace_window_resizer.cc index 6223de3..1b481a5 100644 --- a/ash/wm/workspace/workspace_window_resizer.cc +++ b/ash/wm/workspace/workspace_window_resizer.cc @@ -99,7 +99,7 @@ scoped_ptr<WindowResizer> CreateWindowResizer( window_resizer = PanelWindowResizer::Create(window_resizer, window_state); if (switches::UseDockedWindows() && window_resizer && window->parent() && - !::wm::GetTransientParent(window) && + !views::corewm::GetTransientParent(window) && (window->parent()->id() == internal::kShellWindowId_DefaultContainer || window->parent()->id() == internal::kShellWindowId_DockedContainer || window->parent()->id() == internal::kShellWindowId_PanelContainer)) { diff --git a/ash/wm/workspace_controller.cc b/ash/wm/workspace_controller.cc index d7cb7aa..6dedf17 100644 --- a/ash/wm/workspace_controller.cc +++ b/ash/wm/workspace_controller.cc @@ -45,7 +45,7 @@ WorkspaceController::WorkspaceController(aura::Window* viewport) event_handler_(new WorkspaceEventHandler), layout_manager_(new WorkspaceLayoutManager(viewport)) { SetWindowVisibilityAnimationTransition( - viewport_, ::wm::ANIMATE_NONE); + viewport_, views::corewm::ANIMATE_NONE); viewport_->SetLayoutManager(layout_manager_); viewport_->AddPreTargetHandler(event_handler_.get()); diff --git a/ash/wm/workspace_controller_unittest.cc b/ash/wm/workspace_controller_unittest.cc index 0438c83..df05ed6 100644 --- a/ash/wm/workspace_controller_unittest.cc +++ b/ash/wm/workspace_controller_unittest.cc @@ -703,7 +703,7 @@ TEST_F(WorkspaceControllerTest, TransientParent) { // Window with a transient parent. We set the transient parent to the root, // which would never happen but is enough to exercise the bug. scoped_ptr<Window> w1(CreateTestWindowUnparented()); - ::wm::AddTransientChild( + views::corewm::AddTransientChild( Shell::GetInstance()->GetPrimaryRootWindow(), w1.get()); w1->SetBounds(gfx::Rect(10, 11, 250, 251)); ParentWindowInPrimaryRootWindow(w1.get()); @@ -1159,7 +1159,7 @@ TEST_F(WorkspaceControllerTest, VerifyLayerOrdering) { ui::wm::WINDOW_TYPE_POPUP, gfx::Rect(5, 6, 7, 8), NULL); - ::wm::AddTransientChild(browser.get(), status_bubble); + views::corewm::AddTransientChild(browser.get(), status_bubble); ParentWindowInPrimaryRootWindow(status_bubble); status_bubble->SetName("status_bubble"); |