diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-12 22:36:00 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-12 22:36:00 +0000 |
commit | 067d7fe616a07011b9e2d2609fc65af8db6a7dfb (patch) | |
tree | c8692eee33741154a163ceeb3b90de02c88abb80 /chrome/browser | |
parent | 436e8909ac51166cebfb03292a5bc05536d5b834 (diff) | |
download | chromium_src-067d7fe616a07011b9e2d2609fc65af8db6a7dfb.zip chromium_src-067d7fe616a07011b9e2d2609fc65af8db6a7dfb.tar.gz chromium_src-067d7fe616a07011b9e2d2609fc65af8db6a7dfb.tar.bz2 |
Move wm/core to wm namespace.
Also sets up new targets for wm_core, wm_core_unittests, etc.
R=sky@chromium.org
TBR=sky@chromium.org
BUG=
Review URL: https://codereview.chromium.org/196063002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256680 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
27 files changed, 78 insertions, 84 deletions
diff --git a/chrome/browser/chromeos/background/ash_user_wallpaper_delegate.cc b/chrome/browser/chromeos/background/ash_user_wallpaper_delegate.cc index 69c285f..81b53b6 100644 --- a/chrome/browser/chromeos/background/ash_user_wallpaper_delegate.cc +++ b/chrome/browser/chromeos/background/ash_user_wallpaper_delegate.cc @@ -47,7 +47,7 @@ class UserWallpaperDelegate : public ash::UserWallpaperDelegate { virtual int GetAnimationType() OVERRIDE { return ShouldShowInitialAnimation() ? ash::WINDOW_VISIBILITY_ANIMATION_TYPE_BRIGHTNESS_GRAYSCALE : - static_cast<int>(views::corewm::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE); + static_cast<int>(wm::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE); } virtual int GetAnimationDurationOverride() OVERRIDE { diff --git a/chrome/browser/chromeos/login/chrome_restart_request.cc b/chrome/browser/chromeos/login/chrome_restart_request.cc index 2968028..222ac81 100644 --- a/chrome/browser/chromeos/login/chrome_restart_request.cc +++ b/chrome/browser/chromeos/login/chrome_restart_request.cc @@ -197,7 +197,7 @@ std::string DeriveCommandLine(const GURL& start_url, ::switches::kEnableBrowserTextSubpixelPositioning, ::switches::kEnableWebkitTextSubpixelPositioning, policy::switches::kDeviceManagementUrl, - views::corewm::switches::kWindowAnimationsDisabled, + wm::switches::kWindowAnimationsDisabled, }; command_line->CopySwitchesFrom(base_command_line, kForwardSwitches, diff --git a/chrome/browser/chromeos/login/lock_window_aura.cc b/chrome/browser/chromeos/login/lock_window_aura.cc index 01bf843..447fa69 100644 --- a/chrome/browser/chromeos/login/lock_window_aura.cc +++ b/chrome/browser/chromeos/login/lock_window_aura.cc @@ -54,8 +54,8 @@ void LockWindowAura::Init() { ash::Shell::GetPrimaryRootWindow(), ash::internal::kShellWindowId_LockScreenContainer); views::Widget::Init(params); - views::corewm::SetWindowVisibilityAnimationTransition( - GetNativeView(), views::corewm::ANIMATE_NONE); + wm::SetWindowVisibilityAnimationTransition( + GetNativeView(), wm::ANIMATE_NONE); } } // namespace chromeos diff --git a/chrome/browser/chromeos/login/login_display_host_impl.cc b/chrome/browser/chromeos/login/login_display_host_impl.cc index 1b05a4a..a837c35 100644 --- a/chrome/browser/chromeos/login/login_display_host_impl.cc +++ b/chrome/browser/chromeos/login/login_display_host_impl.cc @@ -991,12 +991,12 @@ void LoginDisplayHostImpl::InitLoginWindowAndView() { if (login_view_->webui_visible()) OnLoginPromptVisible(); - views::corewm::SetWindowVisibilityAnimationDuration( + wm::SetWindowVisibilityAnimationDuration( login_window_->GetNativeView(), base::TimeDelta::FromMilliseconds(kLoginFadeoutTransitionDurationMs)); - views::corewm::SetWindowVisibilityAnimationTransition( + wm::SetWindowVisibilityAnimationTransition( login_window_->GetNativeView(), - views::corewm::ANIMATE_HIDE); + wm::ANIMATE_HIDE); login_window_->SetContentsView(login_view_); diff --git a/chrome/browser/chromeos/login/user_manager_impl.cc b/chrome/browser/chromeos/login/user_manager_impl.cc index 1e0c61a..cf22b70 100644 --- a/chrome/browser/chromeos/login/user_manager_impl.cc +++ b/chrome/browser/chromeos/login/user_manager_impl.cc @@ -1477,7 +1477,7 @@ void UserManagerImpl::KioskAppLoggedIn(const std::string& app_id) { // Disable window animation since kiosk app runs in a single full screen // window and window animation causes start-up janks. command_line->AppendSwitch( - views::corewm::switches::kWindowAnimationsDisabled); + wm::switches::kWindowAnimationsDisabled); } void UserManagerImpl::DemoAccountLoggedIn() { @@ -1489,7 +1489,7 @@ void UserManagerImpl::DemoAccountLoggedIn() { // Disable window animation since the demo app runs in a single full screen // window and window animation causes start-up janks. CommandLine::ForCurrentProcess()->AppendSwitch( - views::corewm::switches::kWindowAnimationsDisabled); + wm::switches::kWindowAnimationsDisabled); } void UserManagerImpl::RetailModeUserLoggedIn() { diff --git a/chrome/browser/notifications/desktop_notifications_unittest.cc b/chrome/browser/notifications/desktop_notifications_unittest.cc index bc8c568..fef46d5 100644 --- a/chrome/browser/notifications/desktop_notifications_unittest.cc +++ b/chrome/browser/notifications/desktop_notifications_unittest.cc @@ -108,7 +108,7 @@ DesktopNotificationsTest::~DesktopNotificationsTest() { void DesktopNotificationsTest::SetUp() { ui::InitializeInputMethodForTesting(); #if defined(USE_AURA) - wm_state_.reset(new views::corewm::WMState); + wm_state_.reset(new wm::WMState); #endif #if defined(USE_ASH) ui::ScopedAnimationDurationScaleMode normal_duration_mode( diff --git a/chrome/browser/notifications/desktop_notifications_unittest.h b/chrome/browser/notifications/desktop_notifications_unittest.h index 6ecd01e..47eaf77 100644 --- a/chrome/browser/notifications/desktop_notifications_unittest.h +++ b/chrome/browser/notifications/desktop_notifications_unittest.h @@ -22,11 +22,9 @@ #include "testing/gtest/include/gtest/gtest.h" #if defined(USE_AURA) -namespace views { -namespace corewm { +namespace wm { class WMState; } -} #endif class ActiveDesktopMonitor; @@ -132,7 +130,7 @@ class DesktopNotificationsTest : public testing::Test { private: #if defined(USE_AURA) - scoped_ptr<views::corewm::WMState> wm_state_; + scoped_ptr<wm::WMState> wm_state_; #endif DISALLOW_COPY_AND_ASSIGN(DesktopNotificationsTest); diff --git a/chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.cc b/chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.cc index 7faf301..769900b4 100644 --- a/chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.cc +++ b/chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.cc @@ -342,7 +342,7 @@ bool AppShortcutLauncherItemController::AdvanceToNextApp() { // If there is only a single item available, we animate it upon key // action. AnimateWindow(browser->window()->GetNativeWindow(), - views::corewm::WINDOW_ANIMATION_TYPE_BOUNCE); + wm::WINDOW_ANIMATION_TYPE_BOUNCE); } else { int index = (static_cast<int>(i - items.begin()) + 1) % items.size(); ActivateContent(items[index]); diff --git a/chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.cc b/chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.cc index 46931ec..14d80ec 100644 --- a/chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.cc +++ b/chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.cc @@ -281,7 +281,7 @@ void AppWindowLauncherItemController::ActivateOrAdvanceToNextAppWindow( // Coming here, only a single window is active. For keyboard activations // the window gets animated. AnimateWindow(window_to_show->GetNativeWindow(), - views::corewm::WINDOW_ANIMATION_TYPE_BOUNCE); + wm::WINDOW_ANIMATION_TYPE_BOUNCE); } else { ShowAndActivateOrMinimize(window_to_show); } diff --git a/chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.cc b/chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.cc index 4e79e42..7be61c9 100644 --- a/chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.cc +++ b/chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.cc @@ -289,7 +289,7 @@ void BrowserShortcutLauncherItemController::ActivateOrAdvanceToNextBrowser() { // bounce it (if it is already active). if (browser == items[0]) { AnimateWindow(browser->window()->GetNativeWindow(), - views::corewm::WINDOW_ANIMATION_TYPE_BOUNCE); + wm::WINDOW_ANIMATION_TYPE_BOUNCE); return; } browser = items[0]; diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc index 2c24419..0c02c69 100644 --- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc +++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc @@ -1066,7 +1066,7 @@ void ChromeLauncherController::ActivateWindowOrMinimizeIfActive( if (CommandLine::ForCurrentProcess()->HasSwitch( switches::kDisableMinimizeOnSecondLauncherItemClick)) { AnimateWindow(window->GetNativeWindow(), - views::corewm::WINDOW_ANIMATION_TYPE_BOUNCE); + wm::WINDOW_ANIMATION_TYPE_BOUNCE); } else { window->Minimize(); } diff --git a/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.cc b/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.cc index a77631a..ef6c5c9 100644 --- a/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.cc +++ b/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.cc @@ -155,21 +155,21 @@ class AnimationSetter { AnimationSetter(aura::Window* window, int animation_time_in_ms) : window_(window), previous_animation_type_( - views::corewm::GetWindowVisibilityAnimationType(window_)), + wm::GetWindowVisibilityAnimationType(window_)), previous_animation_time_( - views::corewm::GetWindowVisibilityAnimationDuration(*window_)) { - views::corewm::SetWindowVisibilityAnimationType( + wm::GetWindowVisibilityAnimationDuration(*window_)) { + wm::SetWindowVisibilityAnimationType( window_, - views::corewm::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE); - views::corewm::SetWindowVisibilityAnimationDuration( + wm::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE); + wm::SetWindowVisibilityAnimationDuration( window_, base::TimeDelta::FromMilliseconds(animation_time_in_ms)); } ~AnimationSetter() { - views::corewm::SetWindowVisibilityAnimationType(window_, + wm::SetWindowVisibilityAnimationType(window_, previous_animation_type_); - views::corewm::SetWindowVisibilityAnimationDuration( + wm::SetWindowVisibilityAnimationDuration( window_, previous_animation_time_); } @@ -296,7 +296,7 @@ void MultiUserWindowManagerChromeOS::SetWindowOwner( // Add observers to track state changes. window->AddObserver(this); - views::corewm::TransientWindowManager::Get(window)->AddObserver(this); + wm::TransientWindowManager::Get(window)->AddObserver(this); // Check if this window was created due to a user interaction. If it was, // transfer it to the current user. @@ -443,7 +443,7 @@ void MultiUserWindowManagerChromeOS::OnWindowDestroyed(aura::Window* window) { RemoveTransientOwnerRecursive(window); return; } - views::corewm::TransientWindowManager::Get(window)->RemoveObserver(this); + wm::TransientWindowManager::Get(window)->RemoveObserver(this); // Remove the window from the owners list. delete window_to_entry_[window]; window_to_entry_.erase(window); @@ -768,8 +768,8 @@ void MultiUserWindowManagerChromeOS::SetWindowVisibility( void MultiUserWindowManagerChromeOS::ShowWithTransientChildrenRecursive( aura::Window* window, int animation_time_in_ms) { aura::Window::Windows::const_iterator it = - views::corewm::GetTransientChildren(window).begin(); - for (; it != views::corewm::GetTransientChildren(window).end(); ++it) + wm::GetTransientChildren(window).begin(); + for (; it != wm::GetTransientChildren(window).end(); ++it) ShowWithTransientChildrenRecursive(*it, animation_time_in_ms); // We show all children which were not explicitly hidden. @@ -783,11 +783,11 @@ aura::Window* MultiUserWindowManagerChromeOS::GetOwningWindowInTransientChain( aura::Window* window) { if (!GetWindowOwner(window).empty()) return NULL; - aura::Window* parent = views::corewm::GetTransientParent(window); + aura::Window* parent = wm::GetTransientParent(window); while (parent) { if (!GetWindowOwner(parent).empty()) return parent; - parent = views::corewm::GetTransientParent(parent); + parent = wm::GetTransientParent(parent); } return NULL; } @@ -797,8 +797,8 @@ void MultiUserWindowManagerChromeOS::AddTransientOwnerRecursive( aura::Window* owned_parent) { // First add all child windows. aura::Window::Windows::const_iterator it = - views::corewm::GetTransientChildren(window).begin(); - for (; it != views::corewm::GetTransientChildren(window).end(); ++it) + wm::GetTransientChildren(window).begin(); + for (; it != wm::GetTransientChildren(window).end(); ++it) AddTransientOwnerRecursive(*it, owned_parent); // If this window is the owned window, we do not have to handle it again. @@ -812,7 +812,7 @@ void MultiUserWindowManagerChromeOS::AddTransientOwnerRecursive( // Add observers to track state changes. window->AddObserver(this); - views::corewm::TransientWindowManager::Get(window)->AddObserver(this); + wm::TransientWindowManager::Get(window)->AddObserver(this); // Hide the window if it should not be shown. Note that this hide operation // will hide recursively this and all children - but we have already collected @@ -825,8 +825,8 @@ void MultiUserWindowManagerChromeOS::RemoveTransientOwnerRecursive( aura::Window* window) { // First remove all child windows. aura::Window::Windows::const_iterator it = - views::corewm::GetTransientChildren(window).begin(); - for (; it != views::corewm::GetTransientChildren(window).end(); ++it) + wm::GetTransientChildren(window).begin(); + for (; it != wm::GetTransientChildren(window).end(); ++it) RemoveTransientOwnerRecursive(*it); // Find from transient window storage the visibility for the given window, @@ -836,7 +836,7 @@ void MultiUserWindowManagerChromeOS::RemoveTransientOwnerRecursive( DCHECK(visibility_item != transient_window_to_visibility_.end()); window->RemoveObserver(this); - views::corewm::TransientWindowManager::Get(window)->RemoveObserver(this); + wm::TransientWindowManager::Get(window)->RemoveObserver(this); bool unowned_view_state = visibility_item->second; transient_window_to_visibility_.erase(visibility_item); diff --git a/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.h b/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.h index e334283..edd839c 100644 --- a/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.h +++ b/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.h @@ -56,7 +56,7 @@ class MultiUserWindowManagerChromeOS public ash::SessionStateObserver, public aura::WindowObserver, public content::NotificationObserver, - public views::corewm::TransientWindowObserver { + public wm::TransientWindowObserver { public: // Create the manager and use |active_user_id| as the active user. explicit MultiUserWindowManagerChromeOS(const std::string& active_user_id); diff --git a/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos_unittest.cc b/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos_unittest.cc index 7f55945..e5144a4 100644 --- a/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos_unittest.cc +++ b/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos_unittest.cc @@ -520,15 +520,15 @@ TEST_F(MultiUserWindowManagerChromeOSTest, TransientWindows) { // 3 - .. multi_user_window_manager()->SetWindowOwner(window(0), "A"); multi_user_window_manager()->SetWindowOwner(window(4), "B"); - views::corewm::AddTransientChild(window(0), window(1)); + wm::AddTransientChild(window(0), window(1)); // We first attach 2->3 and then 1->2 to see that the ownership gets // properly propagated through the sub tree upon assigning. - views::corewm::AddTransientChild(window(2), window(3)); - views::corewm::AddTransientChild(window(1), window(2)); - views::corewm::AddTransientChild(window(4), window(5)); - views::corewm::AddTransientChild(window(4), window(6)); - views::corewm::AddTransientChild(window(7), window(8)); - views::corewm::AddTransientChild(window(7), window(9)); + wm::AddTransientChild(window(2), window(3)); + wm::AddTransientChild(window(1), window(2)); + wm::AddTransientChild(window(4), window(5)); + wm::AddTransientChild(window(4), window(6)); + wm::AddTransientChild(window(7), window(8)); + wm::AddTransientChild(window(7), window(9)); // By now the hierarchy should have updated itself to show all windows of A // and hide all windows of B. Unowned windows should remain in what ever state @@ -565,15 +565,15 @@ TEST_F(MultiUserWindowManagerChromeOSTest, TransientWindows) { // 1 5 8 // | // 9 - views::corewm::RemoveTransientChild(window(2), window(3)); - views::corewm::RemoveTransientChild(window(4), window(6)); + wm::RemoveTransientChild(window(2), window(3)); + wm::RemoveTransientChild(window(4), window(6)); EXPECT_EQ("S[A], S[], H[], H[], H[B], H[], S[], S[], S[], H[]", GetStatus()); // Before we leave we need to reverse all transient window ownerships. - views::corewm::RemoveTransientChild(window(0), window(1)); - views::corewm::RemoveTransientChild(window(1), window(2)); - views::corewm::RemoveTransientChild(window(4), window(5)); - views::corewm::RemoveTransientChild(window(7), window(8)); - views::corewm::RemoveTransientChild(window(7), window(9)); + wm::RemoveTransientChild(window(0), window(1)); + wm::RemoveTransientChild(window(1), window(2)); + wm::RemoveTransientChild(window(4), window(5)); + wm::RemoveTransientChild(window(7), window(8)); + wm::RemoveTransientChild(window(7), window(9)); } // Test that the initial visibility state gets remembered. diff --git a/chrome/browser/ui/ash/user_wallpaper_delegate_win.cc b/chrome/browser/ui/ash/user_wallpaper_delegate_win.cc index 6a83c60..2c040bd 100644 --- a/chrome/browser/ui/ash/user_wallpaper_delegate_win.cc +++ b/chrome/browser/ui/ash/user_wallpaper_delegate_win.cc @@ -27,7 +27,7 @@ class UserWallpaperDelegate : public ash::UserWallpaperDelegate { virtual int GetAnimationType() OVERRIDE { return ShouldShowInitialAnimation() ? ash::WINDOW_VISIBILITY_ANIMATION_TYPE_BRIGHTNESS_GRAYSCALE : - static_cast<int>(views::corewm::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE); + static_cast<int>(wm::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE); } virtual bool ShouldShowInitialAnimation() OVERRIDE { diff --git a/chrome/browser/ui/views/apps/chrome_native_app_window_views.cc b/chrome/browser/ui/views/apps/chrome_native_app_window_views.cc index e75277b..905ca82 100644 --- a/chrome/browser/ui/views/apps/chrome_native_app_window_views.cc +++ b/chrome/browser/ui/views/apps/chrome_native_app_window_views.cc @@ -24,7 +24,7 @@ #include "ui/views/controls/menu/menu_runner.h" #include "ui/views/controls/webview/webview.h" #include "ui/views/widget/widget.h" -#include "ui/wm/public/easy_resize_window_targeter.h" +#include "ui/wm/core/easy_resize_window_targeter.h" #if defined(OS_LINUX) #include "chrome/browser/shell_integration_linux.h" diff --git a/chrome/browser/ui/views/apps/shaped_app_window_targeter.h b/chrome/browser/ui/views/apps/shaped_app_window_targeter.h index 1cd6840..da0c2b8 100644 --- a/chrome/browser/ui/views/apps/shaped_app_window_targeter.h +++ b/chrome/browser/ui/views/apps/shaped_app_window_targeter.h @@ -5,7 +5,7 @@ #ifndef CHROME_BROWSER_UI_VIEWS_APPS_SHAPED_APP_WINDOW_TARGETER_H_ #define CHROME_BROWSER_UI_VIEWS_APPS_SHAPED_APP_WINDOW_TARGETER_H_ -#include "ui/wm/public/masked_window_targeter.h" +#include "ui/wm/core/masked_window_targeter.h" class ChromeNativeAppWindowViews; diff --git a/chrome/browser/ui/views/apps/shaped_app_window_targeter_unittest.cc b/chrome/browser/ui/views/apps/shaped_app_window_targeter_unittest.cc index 1bfc553..3d8879d 100644 --- a/chrome/browser/ui/views/apps/shaped_app_window_targeter_unittest.cc +++ b/chrome/browser/ui/views/apps/shaped_app_window_targeter_unittest.cc @@ -9,7 +9,7 @@ #include "ui/aura/window.h" #include "ui/aura/window_event_dispatcher.h" #include "ui/views/controls/webview/webview.h" -#include "ui/wm/public/easy_resize_window_targeter.h" +#include "ui/wm/core/easy_resize_window_targeter.h" class ShapedAppWindowTargeterTest : public aura::test::AuraTestBase { public: diff --git a/chrome/browser/ui/views/autofill/autofill_popup_base_view.cc b/chrome/browser/ui/views/autofill/autofill_popup_base_view.cc index c608701..6d98744 100644 --- a/chrome/browser/ui/views/autofill/autofill_popup_base_view.cc +++ b/chrome/browser/ui/views/autofill/autofill_popup_base_view.cc @@ -58,8 +58,8 @@ void AutofillPopupBaseView::DoShow() { widget->SetContentsView(this); #if defined(USE_AURA) // No animation for popup appearance (too distracting). - views::corewm::SetWindowVisibilityAnimationTransition( - widget->GetNativeView(), views::corewm::ANIMATE_HIDE); + wm::SetWindowVisibilityAnimationTransition( + widget->GetNativeView(), wm::ANIMATE_HIDE); #endif } diff --git a/chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc b/chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc index 3a48cf4..08dda79 100644 --- a/chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc +++ b/chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc @@ -26,6 +26,6 @@ void ChromeBrowserMainExtraPartsViews::ToolkitInitialized() { views::ViewsDelegate::views_delegate = new ChromeViewsDelegate; #if defined(USE_AURA) - wm_state_.reset(new views::corewm::WMState); + wm_state_.reset(new wm::WMState); #endif } diff --git a/chrome/browser/ui/views/chrome_browser_main_extra_parts_views.h b/chrome/browser/ui/views/chrome_browser_main_extra_parts_views.h index bb0a573..421ba44 100644 --- a/chrome/browser/ui/views/chrome_browser_main_extra_parts_views.h +++ b/chrome/browser/ui/views/chrome_browser_main_extra_parts_views.h @@ -11,11 +11,9 @@ #include "chrome/browser/chrome_browser_main_extra_parts.h" #if defined(USE_AURA) -namespace views { -namespace corewm { +namespace wm { class WMState; } -} #endif class ChromeBrowserMainExtraPartsViews : public ChromeBrowserMainExtraParts { @@ -28,7 +26,7 @@ class ChromeBrowserMainExtraPartsViews : public ChromeBrowserMainExtraParts { private: #if defined(USE_AURA) - scoped_ptr<views::corewm::WMState> wm_state_; + scoped_ptr<wm::WMState> wm_state_; #endif DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainExtraPartsViews); diff --git a/chrome/browser/ui/views/extensions/extension_popup.cc b/chrome/browser/ui/views/extensions/extension_popup.cc index 939b2cc..e8a31ab 100644 --- a/chrome/browser/ui/views/extensions/extension_popup.cc +++ b/chrome/browser/ui/views/extensions/extension_popup.cc @@ -198,7 +198,7 @@ void ExtensionPopup::OnWindowActivated(aura::Window* gained_active, if (!inspect_with_devtools_ && anchor_window == gained_active && host_desktop_type != chrome::HOST_DESKTOP_TYPE_ASH && this_window->GetRootWindow() == anchor_window->GetRootWindow() && - views::corewm::GetTransientParent(gained_active) != this_window) + wm::GetTransientParent(gained_active) != this_window) GetWidget()->Close(); } #endif @@ -224,10 +224,10 @@ ExtensionPopup* ExtensionPopup::ShowPopup(const GURL& url, #if defined(USE_AURA) gfx::NativeView native_view = popup->GetWidget()->GetNativeView(); - views::corewm::SetWindowVisibilityAnimationType( + wm::SetWindowVisibilityAnimationType( native_view, - views::corewm::WINDOW_VISIBILITY_ANIMATION_TYPE_VERTICAL); - views::corewm::SetWindowVisibilityAnimationVerticalPosition( + wm::WINDOW_VISIBILITY_ANIMATION_TYPE_VERTICAL); + wm::SetWindowVisibilityAnimationVerticalPosition( native_view, -3.0f); #endif diff --git a/chrome/browser/ui/views/frame/desktop_browser_frame_aura.cc b/chrome/browser/ui/views/frame/desktop_browser_frame_aura.cc index ced62df..b114390 100644 --- a/chrome/browser/ui/views/frame/desktop_browser_frame_aura.cc +++ b/chrome/browser/ui/views/frame/desktop_browser_frame_aura.cc @@ -67,10 +67,10 @@ void DesktopBrowserFrameAura::InitNativeWidget( browser_desktop_window_tree_host_->AsDesktopWindowTreeHost(); DesktopNativeWidgetAura::InitNativeWidget(modified_params); - visibility_controller_.reset(new views::corewm::VisibilityController); + visibility_controller_.reset(new wm::VisibilityController); aura::client::SetVisibilityClient(GetNativeView()->GetRootWindow(), visibility_controller_.get()); - views::corewm::SetChildWindowVisibilityChangesAnimated( + wm::SetChildWindowVisibilityChangesAnimated( GetNativeView()->GetRootWindow()); } diff --git a/chrome/browser/ui/views/frame/desktop_browser_frame_aura.h b/chrome/browser/ui/views/frame/desktop_browser_frame_aura.h index ec782b9..66f3da2 100644 --- a/chrome/browser/ui/views/frame/desktop_browser_frame_aura.h +++ b/chrome/browser/ui/views/frame/desktop_browser_frame_aura.h @@ -15,11 +15,9 @@ class BrowserDesktopWindowTreeHost; class BrowserFrame; class BrowserView; -namespace views { -namespace corewm { +namespace wm { class VisibilityController; } -} //////////////////////////////////////////////////////////////////////////////// // DesktopBrowserFrameAura @@ -57,7 +55,7 @@ class DesktopBrowserFrameAura : public views::DesktopNativeWidgetAura, // Owned by the RootWindow. BrowserDesktopWindowTreeHost* browser_desktop_window_tree_host_; - scoped_ptr<views::corewm::VisibilityController> visibility_controller_; + scoped_ptr<wm::VisibilityController> visibility_controller_; DISALLOW_COPY_AND_ASSIGN(DesktopBrowserFrameAura); }; diff --git a/chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.cc b/chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.cc index 718a004..f075833 100644 --- a/chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.cc +++ b/chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.cc @@ -223,8 +223,8 @@ void OmniboxPopupContentsView::UpdatePopupAppearance() { if (!popup_.get()) return; #if defined(USE_AURA) - views::corewm::SetWindowVisibilityAnimationTransition( - popup_->GetNativeView(), views::corewm::ANIMATE_NONE); + wm::SetWindowVisibilityAnimationTransition( + popup_->GetNativeView(), wm::ANIMATE_NONE); #endif popup_->SetContentsView(this); popup_->StackAbove(omnibox_view_->GetRelativeWindowForPopup()); diff --git a/chrome/browser/ui/views/simple_message_box_views.cc b/chrome/browser/ui/views/simple_message_box_views.cc index 82e597f..4ef000c 100644 --- a/chrome/browser/ui/views/simple_message_box_views.cc +++ b/chrome/browser/ui/views/simple_message_box_views.cc @@ -180,7 +180,7 @@ void SimpleMessageBoxViews::Done() { // client. Make sure the termination of the nested loop happens from the // correct dispatcher client. aura::Window* window = GetWidget()->GetNativeView(); - aura::Window* parent = views::corewm::GetTransientParent(window); + aura::Window* parent = wm::GetTransientParent(window); aura::client::DispatcherClient* client = NULL; if (parent) client = aura::client::GetDispatcherClient(parent->GetRootWindow()); diff --git a/chrome/browser/ui/views/web_contents_modal_dialog_manager_views.cc b/chrome/browser/ui/views/web_contents_modal_dialog_manager_views.cc index 1c8dfb7..f01c7bb 100644 --- a/chrome/browser/ui/views/web_contents_modal_dialog_manager_views.cc +++ b/chrome/browser/ui/views/web_contents_modal_dialog_manager_views.cc @@ -77,21 +77,21 @@ class NativeWebContentsModalDialogManagerViews widget->GetNativeWindow()->SetProperty(aura::client::kConstrainedWindowKey, true); - views::corewm::SetWindowVisibilityAnimationType( + wm::SetWindowVisibilityAnimationType( widget->GetNativeWindow(), - views::corewm::WINDOW_VISIBILITY_ANIMATION_TYPE_ROTATE); + wm::WINDOW_VISIBILITY_ANIMATION_TYPE_ROTATE); #endif #if defined(USE_ASH) gfx::NativeView parent = platform_util::GetParent(widget->GetNativeView()); - views::corewm::SetChildWindowVisibilityChangesAnimated(parent); + wm::SetChildWindowVisibilityChangesAnimated(parent); // No animations should get performed on the window since that will re-order // the window stack which will then cause many problems. if (parent && parent->parent()) { parent->parent()->SetProperty(aura::client::kAnimationsDisabledKey, true); } - views::corewm::SetModalParent( + wm::SetModalParent( widget->GetNativeWindow(), platform_util::GetParent(widget->GetNativeView())); #endif @@ -100,9 +100,9 @@ class NativeWebContentsModalDialogManagerViews virtual void ShowDialog(NativeWebContentsModalDialog dialog) OVERRIDE { views::Widget* widget = GetWidget(dialog); #if defined(USE_AURA) - scoped_ptr<views::corewm::SuspendChildWindowVisibilityAnimations> suspend; + scoped_ptr<wm::SuspendChildWindowVisibilityAnimations> suspend; if (shown_widgets_.find(widget) != shown_widgets_.end()) { - suspend.reset(new views::corewm::SuspendChildWindowVisibilityAnimations( + suspend.reset(new wm::SuspendChildWindowVisibilityAnimations( widget->GetNativeWindow()->parent())); } #endif @@ -123,8 +123,8 @@ class NativeWebContentsModalDialogManagerViews virtual void HideDialog(NativeWebContentsModalDialog dialog) OVERRIDE { views::Widget* widget = GetWidget(dialog); #if defined(USE_AURA) - scoped_ptr<views::corewm::SuspendChildWindowVisibilityAnimations> suspend; - suspend.reset(new views::corewm::SuspendChildWindowVisibilityAnimations( + scoped_ptr<wm::SuspendChildWindowVisibilityAnimations> suspend; + suspend.reset(new wm::SuspendChildWindowVisibilityAnimations( widget->GetNativeWindow()->parent())); #endif widget->Hide(); |