diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-03 20:59:28 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-03 20:59:28 +0000 |
commit | 093b8d64a16506cf8f2bd77d8b0cc7446065add3 (patch) | |
tree | cc28b83de1bb4c9bfba0fc48c004405c97b95441 /ash | |
parent | e95d6cdbc67f44abb6e4254b869d1f704305d559 (diff) | |
download | chromium_src-093b8d64a16506cf8f2bd77d8b0cc7446065add3.zip chromium_src-093b8d64a16506cf8f2bd77d8b0cc7446065add3.tar.gz chromium_src-093b8d64a16506cf8f2bd77d8b0cc7446065add3.tar.bz2 |
Eliminate ash::internal namespace
Plus obvious style nit fixes.
BUG=None
TBR=sky@chromium.org
Review URL: https://codereview.chromium.org/224113005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@261522 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
466 files changed, 1429 insertions, 2673 deletions
diff --git a/ash/accelerators/accelerator_controller.cc b/ash/accelerators/accelerator_controller.cc index 71009e3..17b260e 100644 --- a/ash/accelerators/accelerator_controller.cc +++ b/ash/accelerators/accelerator_controller.cc @@ -81,7 +81,6 @@ namespace ash { namespace { using base::UserMetricsAction; -using internal::DisplayInfo; bool DebugShortcutsEnabled() { #if defined(NDEBUG) @@ -292,12 +291,12 @@ bool HandleRotatePaneFocus(Shell::Direction direction) { // TODO(stevet): Not sure if this is the same as IDC_FOCUS_NEXT_PANE. case Shell::FORWARD: { base::RecordAction(UserMetricsAction("Accel_Focus_Next_Pane")); - shell->focus_cycler()->RotateFocus(internal::FocusCycler::FORWARD); + shell->focus_cycler()->RotateFocus(FocusCycler::FORWARD); break; } case Shell::BACKWARD: { base::RecordAction(UserMetricsAction("Accel_Focus_Previous_Pane")); - shell->focus_cycler()->RotateFocus(internal::FocusCycler::BACKWARD); + shell->focus_cycler()->RotateFocus(FocusCycler::BACKWARD); break; } } @@ -350,8 +349,7 @@ bool HandleRotateScreen() { } bool HandleScaleReset() { - internal::DisplayManager* display_manager = - Shell::GetInstance()->display_manager(); + DisplayManager* display_manager = Shell::GetInstance()->display_manager(); int64 display_id = display_manager->GetDisplayIdForUIScaling(); if (display_id == gfx::Display::kInvalidDisplayID) return false; @@ -363,8 +361,7 @@ bool HandleScaleReset() { } bool HandleScaleUI(bool up) { - internal::DisplayManager* display_manager = - Shell::GetInstance()->display_manager(); + DisplayManager* display_manager = Shell::GetInstance()->display_manager(); int64 display_id = display_manager->GetDisplayIdForUIScaling(); if (display_id == gfx::Display::kInvalidDisplayID) return false; @@ -376,8 +373,7 @@ bool HandleScaleUI(bool up) { } const DisplayInfo& display_info = display_manager->GetDisplayInfo(display_id); - float next_scale = - internal::DisplayManager::GetNextUIScale(display_info, up); + float next_scale = DisplayManager::GetNextUIScale(display_info, up); display_manager->SetDisplayUIScale(display_id, next_scale); return true; } @@ -399,10 +395,10 @@ bool HandleShowKeyboardOverlay() { void HandleShowMessageCenterBubble() { base::RecordAction(UserMetricsAction("Accel_Show_Message_Center_Bubble")); - internal::RootWindowController* controller = - internal::RootWindowController::ForTargetRootWindow(); - internal::StatusAreaWidget* status_area_widget = - controller->shelf()->status_area_widget(); + RootWindowController* controller = + RootWindowController::ForTargetRootWindow(); + StatusAreaWidget* status_area_widget = + controller->shelf()->status_area_widget(); if (status_area_widget) { WebNotificationTray* notification_tray = status_area_widget->web_notification_tray(); @@ -413,8 +409,8 @@ void HandleShowMessageCenterBubble() { bool HandleShowSystemTrayBubble() { base::RecordAction(UserMetricsAction("Accel_Show_System_Tray_Bubble")); - internal::RootWindowController* controller = - internal::RootWindowController::ForTargetRootWindow(); + RootWindowController* controller = + RootWindowController::ForTargetRootWindow(); if (!controller->GetSystemTray()->HasSystemBubble()) { controller->GetSystemTray()->ShowDefaultView(BUBBLE_CREATE_NEW); return true; @@ -608,8 +604,8 @@ bool HandleToggleTouchViewTesting() { } bool HandleTouchHudClear() { - internal::RootWindowController* controller = - internal::RootWindowController::ForTargetRootWindow(); + RootWindowController* controller = + RootWindowController::ForTargetRootWindow(); if (controller->touch_hud_debug()) { controller->touch_hud_debug()->Clear(); return true; @@ -618,8 +614,8 @@ bool HandleTouchHudClear() { } bool HandleTouchHudModeChange() { - internal::RootWindowController* controller = - internal::RootWindowController::ForTargetRootWindow(); + RootWindowController* controller = + RootWindowController::ForTargetRootWindow(); if (controller->touch_hud_debug()) { controller->touch_hud_debug()->ChangeToNextMode(); return true; diff --git a/ash/accelerators/accelerator_controller_unittest.cc b/ash/accelerators/accelerator_controller_unittest.cc index 5be401a..93277ea 100644 --- a/ash/accelerators/accelerator_controller_unittest.cc +++ b/ash/accelerators/accelerator_controller_unittest.cc @@ -546,12 +546,12 @@ TEST_F(AcceleratorControllerTest, CenterWindowAccelerator) { // Add the window to docked container and try to center it. window->SetBounds(gfx::Rect(0, 0, 20, 20)); aura::Window* docked_container = Shell::GetContainer( - window->GetRootWindow(), internal::kShellWindowId_DockedContainer); + window->GetRootWindow(), kShellWindowId_DockedContainer); docked_container->AddChild(window.get()); gfx::Rect docked_bounds = window->GetBoundsInScreen(); GetController()->PerformAction(WINDOW_POSITION_CENTER, dummy); // It should not get centered and should remain docked. - EXPECT_EQ(internal::kShellWindowId_DockedContainer, window->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, window->parent()->id()); EXPECT_EQ(docked_bounds.ToString(), window->GetBoundsInScreen().ToString()); } diff --git a/ash/accelerators/accelerator_filter.cc b/ash/accelerators/accelerator_filter.cc index da552b9..7dc7f08 100644 --- a/ash/accelerators/accelerator_filter.cc +++ b/ash/accelerators/accelerator_filter.cc @@ -85,8 +85,6 @@ bool ShouldProcessAcceleratorsNow(const ui::Accelerator& accelerator, } // namespace -namespace internal { - //////////////////////////////////////////////////////////////////////////////// // AcceleratorFilter, public: @@ -133,5 +131,4 @@ void AcceleratorFilter::OnKeyEvent(ui::KeyEvent* event) { event->StopPropagation(); } -} // namespace internal } // namespace ash diff --git a/ash/accelerators/accelerator_filter.h b/ash/accelerators/accelerator_filter.h index 1df7637..ab919f6 100644 --- a/ash/accelerators/accelerator_filter.h +++ b/ash/accelerators/accelerator_filter.h @@ -11,7 +11,6 @@ #include "ui/events/event_handler.h" namespace ash { -namespace internal { // AcceleratorFilter filters key events for AcceleratorControler handling global // keyboard accelerators. @@ -27,7 +26,6 @@ class ASH_EXPORT AcceleratorFilter : public ui::EventHandler { DISALLOW_COPY_AND_ASSIGN(AcceleratorFilter); }; -} // namespace internal } // namespace ash #endif // ASH_ACCELERATORS_ACCELERATOR_FILTER_H_ diff --git a/ash/accelerators/accelerator_filter_unittest.cc b/ash/accelerators/accelerator_filter_unittest.cc index c1a7054..2aa7ba0 100644 --- a/ash/accelerators/accelerator_filter_unittest.cc +++ b/ash/accelerators/accelerator_filter_unittest.cc @@ -86,7 +86,7 @@ TEST_F(AcceleratorFilterTest, TestCapsLockMask) { // Tests if special hardware keys like brightness and volume are consumed as // expected by the shell. TEST_F(AcceleratorFilterTest, CanConsumeSystemKeys) { - internal::AcceleratorFilter filter; + AcceleratorFilter filter; // Normal keys are not consumed. ui::KeyEvent press_a(ui::ET_KEY_PRESSED, ui::VKEY_A, ui::EF_NONE, false); diff --git a/ash/accelerators/exit_warning_handler.cc b/ash/accelerators/exit_warning_handler.cc index 8dbafd8..30bc13a 100644 --- a/ash/accelerators/exit_warning_handler.cc +++ b/ash/accelerators/exit_warning_handler.cc @@ -186,9 +186,8 @@ void ExitWarningHandler::Show() { params.remove_standard_frame = true; params.delegate = delegate; params.bounds = bounds; - params.parent = Shell::GetContainer( - root_window, - internal::kShellWindowId_SettingBubbleContainer); + params.parent = + Shell::GetContainer(root_window, kShellWindowId_SettingBubbleContainer); widget_.reset(new views::Widget); widget_->Init(params); widget_->SetContentsView(delegate); diff --git a/ash/default_accessibility_delegate.cc b/ash/default_accessibility_delegate.cc index 169b4f7..ee4f27b 100644 --- a/ash/default_accessibility_delegate.cc +++ b/ash/default_accessibility_delegate.cc @@ -7,7 +7,6 @@ #include <limits> namespace ash { -namespace internal { DefaultAccessibilityDelegate::DefaultAccessibilityDelegate() : spoken_feedback_enabled_(false), @@ -115,5 +114,4 @@ base::TimeDelta DefaultAccessibilityDelegate::PlayShutdownSound() const { return base::TimeDelta(); } -} // namespace internal } // namespace ash diff --git a/ash/default_accessibility_delegate.h b/ash/default_accessibility_delegate.h index 4804bbd..52f8aafd5 100644 --- a/ash/default_accessibility_delegate.h +++ b/ash/default_accessibility_delegate.h @@ -11,7 +11,6 @@ #include "base/compiler_specific.h" namespace ash { -namespace internal { class ASH_EXPORT DefaultAccessibilityDelegate : public AccessibilityDelegate { public: @@ -54,7 +53,6 @@ class ASH_EXPORT DefaultAccessibilityDelegate : public AccessibilityDelegate { DISALLOW_COPY_AND_ASSIGN(DefaultAccessibilityDelegate); }; -} // namespace internal } // namespace ash #endif // DEFAULT_ACCESSIBILITY_DELEGATE_H_ diff --git a/ash/desktop_background/desktop_background_controller.cc b/ash/desktop_background/desktop_background_controller.cc index 7673f29..7305586 100644 --- a/ash/desktop_background/desktop_background_controller.cc +++ b/ash/desktop_background/desktop_background_controller.cc @@ -33,7 +33,6 @@ #include "ui/gfx/rect.h" #include "ui/views/widget/widget.h" -using ash::internal::DesktopBackgroundWidgetController; using content::BrowserThread; namespace ash { @@ -370,25 +369,24 @@ void DesktopBackgroundController::OnDefaultWallpaperLoadCompleted( void DesktopBackgroundController::InstallDesktopController( aura::Window* root_window) { - internal::DesktopBackgroundWidgetController* component = NULL; + DesktopBackgroundWidgetController* component = NULL; int container_id = GetBackgroundContainerId(locked_); switch (desktop_background_mode_) { case BACKGROUND_IMAGE: { - views::Widget* widget = internal::CreateDesktopBackground(root_window, - container_id); - component = new internal::DesktopBackgroundWidgetController(widget); + views::Widget* widget = + CreateDesktopBackground(root_window, container_id); + component = new DesktopBackgroundWidgetController(widget); break; } case BACKGROUND_NONE: NOTREACHED(); return; } - internal::GetRootWindowController(root_window)-> - SetAnimatingWallpaperController( - new internal::AnimatingDesktopController(component)); + GetRootWindowController(root_window)->SetAnimatingWallpaperController( + new AnimatingDesktopController(component)); - component->StartAnimating(internal::GetRootWindowController(root_window)); + component->StartAnimating(GetRootWindowController(root_window)); } void DesktopBackgroundController::InstallDesktopControllerForAllWindows() { @@ -407,7 +405,7 @@ bool DesktopBackgroundController::ReparentBackgroundWidgets(int src_container, Shell::GetAllRootWindowControllers(); for (Shell::RootWindowControllerList::iterator iter = controllers.begin(); iter != controllers.end(); ++iter) { - internal::RootWindowController* root_window_controller = *iter; + RootWindowController* root_window_controller = *iter; // In the steady state (no animation playing) the background widget // controller exists in the RootWindowController. DesktopBackgroundWidgetController* desktop_controller = @@ -439,8 +437,8 @@ bool DesktopBackgroundController::ReparentBackgroundWidgets(int src_container, } int DesktopBackgroundController::GetBackgroundContainerId(bool locked) { - return locked ? internal::kShellWindowId_LockScreenBackgroundContainer : - internal::kShellWindowId_DesktopBackgroundContainer; + return locked ? kShellWindowId_LockScreenBackgroundContainer + : kShellWindowId_DesktopBackgroundContainer; } void DesktopBackgroundController::UpdateWallpaper() { @@ -456,8 +454,7 @@ gfx::Size DesktopBackgroundController::GetMaxDisplaySizeInNative() { int width = 0; int height = 0; std::vector<gfx::Display> displays = Shell::GetScreen()->GetAllDisplays(); - internal::DisplayManager* display_manager = - Shell::GetInstance()->display_manager(); + DisplayManager* display_manager = Shell::GetInstance()->display_manager(); for (std::vector<gfx::Display>::iterator iter = displays.begin(); iter != displays.end(); ++iter) { diff --git a/ash/desktop_background/desktop_background_controller_unittest.cc b/ash/desktop_background/desktop_background_controller_unittest.cc index 1c48105..bdfc578 100644 --- a/ash/desktop_background/desktop_background_controller_unittest.cc +++ b/ash/desktop_background/desktop_background_controller_unittest.cc @@ -41,10 +41,9 @@ namespace ash { namespace { // Containers IDs used for tests. -const int kDesktopBackgroundId = - ash::internal::kShellWindowId_DesktopBackgroundContainer; +const int kDesktopBackgroundId = ash::kShellWindowId_DesktopBackgroundContainer; const int kLockScreenBackgroundId = - ash::internal::kShellWindowId_LockScreenBackgroundContainer; + ash::kShellWindowId_LockScreenBackgroundContainer; // Returns number of child windows in a shell window container. int ChildCountForContainer(int container_id) { @@ -111,7 +110,7 @@ class DesktopBackgroundControllerTest : public test::AshTestBase { test::AshTestBase::SetUp(); // Ash shell initialization creates wallpaper. Reset it so we can manually // control wallpaper creation and animation in our tests. - internal::RootWindowController* root_window_controller = + RootWindowController* root_window_controller = Shell::GetPrimaryRootWindowController(); root_window_controller->SetWallpaperController(NULL); root_window_controller->SetAnimatingWallpaperController(NULL); @@ -151,9 +150,10 @@ class DesktopBackgroundControllerTest : public test::AshTestBase { // Runs kAnimatingDesktopController's animation to completion. // TODO(bshe): Don't require tests to run animations; it's slow. void RunDesktopControllerAnimation() { - internal::DesktopBackgroundWidgetController* controller = - Shell::GetPrimaryRootWindowController()-> - animating_wallpaper_controller()->GetController(false); + DesktopBackgroundWidgetController* controller = + Shell::GetPrimaryRootWindowController() + ->animating_wallpaper_controller() + ->GetController(false); ASSERT_NO_FATAL_FAILURE(RunAnimationForWidget(controller->widget())); } @@ -321,7 +321,7 @@ TEST_F(DesktopBackgroundControllerTest, ControllerOwnership) { // The new wallpaper is ready to start animating. kAnimatingDesktopController // holds the widget controller instance. kDesktopController will get it later. - internal::RootWindowController* root_window_controller = + RootWindowController* root_window_controller = Shell::GetPrimaryRootWindowController(); EXPECT_TRUE(root_window_controller->animating_wallpaper_controller()-> GetController(false)); @@ -363,7 +363,7 @@ TEST_F(DesktopBackgroundControllerTest, BackgroundMovementDuringUnlock) { // In this state we have two desktop background views stored in different // properties. Both are in the lock screen background container. - internal::RootWindowController* root_window_controller = + RootWindowController* root_window_controller = Shell::GetPrimaryRootWindowController(); EXPECT_TRUE(root_window_controller->animating_wallpaper_controller()-> GetController(false)); @@ -405,11 +405,11 @@ TEST_F(DesktopBackgroundControllerTest, ChangeWallpaperQuick) { // Change to a new wallpaper. controller->CreateEmptyWallpaper(); - internal::RootWindowController* root_window_controller = + RootWindowController* root_window_controller = Shell::GetPrimaryRootWindowController(); - internal::DesktopBackgroundWidgetController* animating_controller = - root_window_controller->animating_wallpaper_controller()-> - GetController(false); + DesktopBackgroundWidgetController* animating_controller = + root_window_controller->animating_wallpaper_controller()->GetController( + false); EXPECT_TRUE(animating_controller); EXPECT_TRUE(root_window_controller->wallpaper_controller()); diff --git a/ash/desktop_background/desktop_background_view.cc b/ash/desktop_background/desktop_background_view.cc index b0e3149..1250279 100644 --- a/ash/desktop_background/desktop_background_view.cc +++ b/ash/desktop_background/desktop_background_view.cc @@ -28,7 +28,6 @@ #include "ui/views/widget/widget.h" namespace ash { -namespace internal { namespace { // For our scaling ratios we need to round positive numbers. @@ -224,5 +223,4 @@ views::Widget* CreateDesktopBackground(aura::Window* root_window, return desktop_widget; } -} // namespace internal } // namespace ash diff --git a/ash/desktop_background/desktop_background_view.h b/ash/desktop_background/desktop_background_view.h index dbd3320..c25f9d9 100644 --- a/ash/desktop_background/desktop_background_view.h +++ b/ash/desktop_background/desktop_background_view.h @@ -10,7 +10,6 @@ #include "ui/views/view.h" namespace ash { -namespace internal { class DesktopBackgroundView : public views::View, public views::ContextMenuController { @@ -31,7 +30,6 @@ class DesktopBackgroundView : public views::View, DISALLOW_COPY_AND_ASSIGN(DesktopBackgroundView); }; -} // namespace internal } // namespace ash #endif // ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_VIEW_H_ diff --git a/ash/desktop_background/desktop_background_widget_controller.cc b/ash/desktop_background/desktop_background_widget_controller.cc index ca2fd03..4a19538 100644 --- a/ash/desktop_background/desktop_background_widget_controller.cc +++ b/ash/desktop_background/desktop_background_widget_controller.cc @@ -15,7 +15,6 @@ #include "ui/views/widget/widget_observer.h" namespace ash { -namespace internal { namespace { class ShowWallpaperAnimationObserver : public ui::ImplicitAnimationObserver, @@ -144,5 +143,4 @@ DesktopBackgroundWidgetController* AnimatingDesktopController::GetController( return controller_.get(); } -} // namespace internal } // namespace ash diff --git a/ash/desktop_background/desktop_background_widget_controller.h b/ash/desktop_background/desktop_background_widget_controller.h index 5976f28..6a40a2d 100644 --- a/ash/desktop_background/desktop_background_widget_controller.h +++ b/ash/desktop_background/desktop_background_widget_controller.h @@ -13,7 +13,6 @@ #include "ui/views/widget/widget_observer.h" namespace ash { -namespace internal { class RootWindowController; // This class implements a widget-based wallpaper. @@ -89,7 +88,6 @@ class ASH_EXPORT AnimatingDesktopController { DISALLOW_COPY_AND_ASSIGN(AnimatingDesktopController); }; -} // namespace internal } // namespace ash #endif // ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_WIDGET_CONTROLLER_H_ diff --git a/ash/desktop_background/wallpaper_resizer_unittest.cc b/ash/desktop_background/wallpaper_resizer_unittest.cc index 12adaf3..240dc8e 100644 --- a/ash/desktop_background/wallpaper_resizer_unittest.cc +++ b/ash/desktop_background/wallpaper_resizer_unittest.cc @@ -55,7 +55,6 @@ bool IsColor(const gfx::ImageSkia& image, const uint32_t expect) { } // namespace namespace ash { -namespace internal { class WallpaperResizerTest : public testing::Test, public WallpaperResizerObserver { @@ -156,5 +155,4 @@ TEST_F(WallpaperResizerTest, ImageId) { EXPECT_EQ(WallpaperResizer::GetImageId(image), resizer.original_image_id()); } -} // namespace internal } // namespace ash diff --git a/ash/dip_unittest.cc b/ash/dip_unittest.cc index 748c78f..d50fd4c 100644 --- a/ash/dip_unittest.cc +++ b/ash/dip_unittest.cc @@ -48,7 +48,7 @@ TEST_F(DIPTest, WorkArea) { gfx::Screen* screen = Shell::GetScreen(); const gfx::Display display_2x = screen->GetDisplayNearestWindow(root); - const internal::DisplayInfo display_info_2x = + const DisplayInfo display_info_2x = Shell::GetInstance()->display_manager()->GetDisplayInfo(display_2x.id()); // The |bounds_in_pixel()| should report bounds in pixel coordinate. @@ -87,7 +87,7 @@ TEST_F(DIPTest, WorkAreaForLegacyShelfLayout) { gfx::Screen* screen = Shell::GetScreen(); const gfx::Display display_2x = screen->GetDisplayNearestWindow(root); - const internal::DisplayInfo display_info_2x = + const DisplayInfo display_info_2x = Shell::GetInstance()->display_manager()->GetDisplayInfo(display_2x.id()); // The |bounds_in_native()| should report bounds in pixel coordinate. diff --git a/ash/display/cursor_window_controller.cc b/ash/display/cursor_window_controller.cc index abc5175..d79f5c5 100644 --- a/ash/display/cursor_window_controller.cc +++ b/ash/display/cursor_window_controller.cc @@ -22,7 +22,6 @@ #include "ui/gfx/image/image_skia_operations.h" namespace ash { -namespace internal { class CursorWindowDelegate : public aura::WindowDelegate { public: @@ -258,5 +257,4 @@ void CursorWindowController::UpdateCursorImage() { } } -} // namespace internal } // namespace ash diff --git a/ash/display/cursor_window_controller.h b/ash/display/cursor_window_controller.h index fcedced..6e6a709 100644 --- a/ash/display/cursor_window_controller.h +++ b/ash/display/cursor_window_controller.h @@ -14,8 +14,6 @@ namespace test{ class MirrorWindowTestApi; } -namespace internal { - class CursorWindowDelegate; // Draws a mouse cursor on a given container window. @@ -84,7 +82,6 @@ class CursorWindowController { DISALLOW_COPY_AND_ASSIGN(CursorWindowController); }; -} // namespace internal } // namespace ash #endif // ASH_DISPLAY_CURSOR_WINDOW_CONTROLLER_H_ diff --git a/ash/display/display_change_observer_chromeos.cc b/ash/display/display_change_observer_chromeos.cc index 97c9d26..e1b4c13 100644 --- a/ash/display/display_change_observer_chromeos.cc +++ b/ash/display/display_change_observer_chromeos.cc @@ -25,7 +25,6 @@ #include "ui/gfx/display.h" namespace ash { -namespace internal { using ui::OutputConfigurator; @@ -183,5 +182,4 @@ void DisplayChangeObserver::OnAppTerminating() { #endif } -} // namespace internal } // namespace ash diff --git a/ash/display/display_change_observer_chromeos.h b/ash/display/display_change_observer_chromeos.h index 03a7dc0..c1675c3 100644 --- a/ash/display/display_change_observer_chromeos.h +++ b/ash/display/display_change_observer_chromeos.h @@ -11,7 +11,6 @@ #include "ui/display/chromeos/output_configurator.h" namespace ash { -namespace internal { struct DisplayMode; @@ -45,7 +44,6 @@ class DisplayChangeObserver : public ui::OutputConfigurator::StateController, DISALLOW_COPY_AND_ASSIGN(DisplayChangeObserver); }; -} // namespace internal } // namespace ash #endif // ASH_DISPLAY_AURA_DISPLAY_CHANGE_OBSERVER_CHROMEOS_H diff --git a/ash/display/display_change_observer_chromeos_unittest.cc b/ash/display/display_change_observer_chromeos_unittest.cc index f8f6726..ca63b0a 100644 --- a/ash/display/display_change_observer_chromeos_unittest.cc +++ b/ash/display/display_change_observer_chromeos_unittest.cc @@ -16,7 +16,6 @@ using ui::OutputConfigurator; typedef testing::Test DisplayChangeObserverTest; namespace ash { -namespace internal { TEST_F(DisplayChangeObserverTest, GetDisplayModeList) { ScopedVector<const ui::DisplayMode> modes; @@ -83,5 +82,4 @@ TEST_F(DisplayChangeObserverTest, GetDisplayModeList) { EXPECT_EQ(0u, display_modes.size()); } -} // namespace internal } // namespace ash diff --git a/ash/display/display_controller.cc b/ash/display/display_controller.cc index 496eb1e..6a4931d 100644 --- a/ash/display/display_controller.cc +++ b/ash/display/display_controller.cc @@ -72,14 +72,13 @@ const int64 kAfterDisplayChangeThrottleTimeoutMs = 500; const int64 kCycleDisplayThrottleTimeoutMs = 4000; const int64 kSwapDisplayThrottleTimeoutMs = 500; -internal::DisplayManager* GetDisplayManager() { +DisplayManager* GetDisplayManager() { return Shell::GetInstance()->display_manager(); } void SetDisplayPropertiesOnHost(aura::WindowTreeHost* host, const gfx::Display& display) { - internal::DisplayInfo info = - GetDisplayManager()->GetDisplayInfo(display.id()); + DisplayInfo info = GetDisplayManager()->GetDisplayInfo(display.id()); #if defined(OS_CHROMEOS) && defined(USE_X11) // Native window property (Atom in X11) that specifies the display's // rotation, scale factor and if it's internal display. They are @@ -118,11 +117,10 @@ void SetDisplayPropertiesOnHost(aura::WindowTreeHost* host, 100 * display.device_scale_factor()); #endif scoped_ptr<aura::RootWindowTransformer> transformer( - internal::CreateRootWindowTransformerForDisplay(host->window(), - display)); + CreateRootWindowTransformerForDisplay(host->window(), display)); host->SetRootWindowTransformer(transformer.Pass()); - internal::DisplayMode mode; + DisplayMode mode; if (GetDisplayManager()->GetSelectedModeForDisplayId(display.id(), &mode) && mode.refresh_rate > 0.0f) { host->compositor()->vsync_manager()->SetAuthoritativeVSyncInterval( @@ -133,8 +131,6 @@ void SetDisplayPropertiesOnHost(aura::WindowTreeHost* host, } // namespace -namespace internal { - // A utility class to store/restore focused/active window // when the display configuration has changed. class FocusActivationStore { @@ -201,8 +197,6 @@ class FocusActivationStore { DISALLOW_COPY_AND_ASSIGN(FocusActivationStore); }; -} // namespace internal - //////////////////////////////////////////////////////////////////////////////// // DisplayChangeLimiter @@ -225,9 +219,9 @@ bool DisplayController::DisplayChangeLimiter::IsThrottled() const { DisplayController::DisplayController() : primary_root_window_for_replace_(NULL), - focus_activation_store_(new internal::FocusActivationStore()), - cursor_window_controller_(new internal::CursorWindowController()), - mirror_window_controller_(new internal::MirrorWindowController()) { + focus_activation_store_(new FocusActivationStore()), + cursor_window_controller_(new CursorWindowController()), + mirror_window_controller_(new MirrorWindowController()) { #if defined(OS_CHROMEOS) if (base::SysInfo::IsRunningOnChromeOS()) limiter_.reset(new DisplayChangeLimiter); @@ -244,7 +238,7 @@ void DisplayController::Start() { // Created here so that Shell has finished being created. Adds itself // as a ShellObserver. virtual_keyboard_window_controller_.reset( - new internal::VirtualKeyboardWindowController); + new VirtualKeyboardWindowController); Shell::GetScreen()->AddObserver(this); Shell::GetInstance()->display_manager()->set_delegate(this); @@ -265,8 +259,7 @@ void DisplayController::Shutdown() { // from the last so that the primary root window gets deleted last. for (std::map<int64, aura::Window*>::const_reverse_iterator it = root_windows_.rbegin(); it != root_windows_.rend(); ++it) { - internal::RootWindowController* controller = - internal::GetRootWindowController(it->second); + RootWindowController* controller = GetRootWindowController(it->second); DCHECK(controller); delete controller; } @@ -280,12 +273,12 @@ void DisplayController::InitPrimaryDisplay() { } void DisplayController::InitSecondaryDisplays() { - internal::DisplayManager* display_manager = GetDisplayManager(); + DisplayManager* display_manager = GetDisplayManager(); for (size_t i = 0; i < display_manager->GetNumDisplays(); ++i) { const gfx::Display& display = display_manager->GetDisplayAt(i); if (primary_display_id != display.id()) { aura::WindowTreeHost* host = AddWindowTreeHostForDisplay(display); - internal::RootWindowController::CreateForSecondaryDisplay(host); + RootWindowController::CreateForSecondaryDisplay(host); } } UpdateHostWindowNames(); @@ -317,8 +310,7 @@ void DisplayController::CloseChildWindows() { for (std::map<int64, aura::Window*>::const_iterator it = root_windows_.begin(); it != root_windows_.end(); ++it) { aura::Window* root_window = it->second; - internal::RootWindowController* controller = - internal::GetRootWindowController(root_window); + RootWindowController* controller = GetRootWindowController(root_window); if (controller) { controller->CloseChildWindows(); } else { @@ -335,7 +327,7 @@ aura::Window::Windows DisplayController::GetAllRootWindows() { for (std::map<int64, aura::Window*>::const_iterator it = root_windows_.begin(); it != root_windows_.end(); ++it) { DCHECK(it->second); - if (internal::GetRootWindowController(it->second)) + if (GetRootWindowController(it->second)) windows.push_back(it->second); } return windows; @@ -350,13 +342,12 @@ void DisplayController::SetOverscanInsets(int64 display_id, GetDisplayManager()->SetOverscanInsets(display_id, insets_in_dip); } -std::vector<internal::RootWindowController*> +std::vector<RootWindowController*> DisplayController::GetAllRootWindowControllers() { - std::vector<internal::RootWindowController*> controllers; + std::vector<RootWindowController*> controllers; for (std::map<int64, aura::Window*>::const_iterator it = root_windows_.begin(); it != root_windows_.end(); ++it) { - internal::RootWindowController* controller = - internal::GetRootWindowController(it->second); + RootWindowController* controller = GetRootWindowController(it->second); if (controller) controllers.push_back(controller); } @@ -364,7 +355,7 @@ DisplayController::GetAllRootWindowControllers() { } void DisplayController::ToggleMirrorMode() { - internal::DisplayManager* display_manager = GetDisplayManager(); + DisplayManager* display_manager = GetDisplayManager(); if (display_manager->num_connected_displays() <= 1) return; @@ -375,12 +366,12 @@ void DisplayController::ToggleMirrorMode() { } #if defined(OS_CHROMEOS) Shell* shell = Shell::GetInstance(); - internal::OutputConfiguratorAnimation* animation = + OutputConfiguratorAnimation* animation = shell->output_configurator_animation(); - animation->StartFadeOutAnimation(base::Bind( - base::IgnoreResult(&internal::DisplayManager::SetMirrorMode), - base::Unretained(display_manager), - !display_manager->IsMirrored())); + animation->StartFadeOutAnimation( + base::Bind(base::IgnoreResult(&DisplayManager::SetMirrorMode), + base::Unretained(display_manager), + !display_manager->IsMirrored())); #endif } @@ -393,7 +384,7 @@ void DisplayController::SwapPrimaryDisplay() { if (Shell::GetScreen()->GetNumDisplays() > 1) { #if defined(OS_CHROMEOS) - internal::OutputConfiguratorAnimation* animation = + OutputConfiguratorAnimation* animation = Shell::GetInstance()->output_configurator_animation(); if (animation) { animation->StartFadeOutAnimation(base::Bind( @@ -420,7 +411,7 @@ void DisplayController::SetPrimaryDisplayId(int64 id) { void DisplayController::SetPrimaryDisplay( const gfx::Display& new_primary_display) { - internal::DisplayManager* display_manager = GetDisplayManager(); + DisplayManager* display_manager = GetDisplayManager(); DCHECK(new_primary_display.is_valid()); DCHECK(display_manager->IsActiveDisplay(new_primary_display)); @@ -451,11 +442,10 @@ void DisplayController::SetPrimaryDisplay( DCHECK_NE(primary_root, non_primary_root); root_windows_[new_primary_display.id()] = primary_root; - internal::GetRootWindowSettings(primary_root)->display_id = - new_primary_display.id(); + GetRootWindowSettings(primary_root)->display_id = new_primary_display.id(); root_windows_[old_primary_display.id()] = non_primary_root; - internal::GetRootWindowSettings(non_primary_root)->display_id = + GetRootWindowSettings(non_primary_root)->display_id = old_primary_display.id(); primary_display_id = new_primary_display.id(); @@ -468,7 +458,7 @@ void DisplayController::SetPrimaryDisplay( non_primary_root, new_primary_display.GetWorkAreaInsets()); // Update the dispay manager with new display info. - std::vector<internal::DisplayInfo> display_info_list; + std::vector<DisplayInfo> display_info_list; display_info_list.push_back(display_manager->GetDisplayInfo( primary_display_id)); display_info_list.push_back(display_manager->GetDisplayInfo( @@ -486,12 +476,12 @@ void DisplayController::EnsurePointerInDisplays() { gfx::Point point_in_screen = Shell::GetScreen()->GetCursorScreenPoint(); gfx::Point target_location_in_native; int64 closest_distance_squared = -1; - internal::DisplayManager* display_manager = GetDisplayManager(); + DisplayManager* display_manager = GetDisplayManager(); aura::Window* dst_root_window = NULL; for (size_t i = 0; i < display_manager->GetNumDisplays(); ++i) { const gfx::Display& display = display_manager->GetDisplayAt(i); - const internal::DisplayInfo display_info = + const DisplayInfo display_info = display_manager->GetDisplayInfo(display.id()); aura::Window* root_window = GetRootWindowForDisplayId(display.id()); if (display_info.bounds_in_native().Contains( @@ -529,14 +519,14 @@ bool DisplayController::UpdateWorkAreaOfDisplayNearestWindow( const aura::Window* window, const gfx::Insets& insets) { const aura::Window* root_window = window->GetRootWindow(); - int64 id = internal::GetRootWindowSettings(root_window)->display_id; + int64 id = GetRootWindowSettings(root_window)->display_id; // if id is |kInvaildDisplayID|, it's being deleted. DCHECK(id != gfx::Display::kInvalidDisplayID); return GetDisplayManager()->UpdateWorkAreaOfDisplay(id, insets); } void DisplayController::OnDisplayBoundsChanged(const gfx::Display& display) { - const internal::DisplayInfo& display_info = + const DisplayInfo& display_info = GetDisplayManager()->GetDisplayInfo(display.id()); DCHECK(!display_info.bounds_in_native().IsEmpty()); aura::WindowTreeHost* host = root_windows_[display.id()]->GetHost(); @@ -549,10 +539,10 @@ void DisplayController::OnDisplayAdded(const gfx::Display& display) { DCHECK(root_windows_.empty()); primary_display_id = display.id(); root_windows_[display.id()] = primary_root_window_for_replace_; - internal::GetRootWindowSettings(primary_root_window_for_replace_)-> - display_id = display.id(); + GetRootWindowSettings(primary_root_window_for_replace_)->display_id = + display.id(); primary_root_window_for_replace_ = NULL; - const internal::DisplayInfo& display_info = + const DisplayInfo& display_info = GetDisplayManager()->GetDisplayInfo(display.id()); aura::WindowTreeHost* host = root_windows_[display.id()]->GetHost(); host->SetBounds(display_info.bounds_in_native()); @@ -562,7 +552,7 @@ void DisplayController::OnDisplayAdded(const gfx::Display& display) { primary_display_id = display.id(); DCHECK(!root_windows_.empty()); aura::WindowTreeHost* host = AddWindowTreeHostForDisplay(display); - internal::RootWindowController::CreateForSecondaryDisplay(host); + RootWindowController::CreateForSecondaryDisplay(host); } } @@ -590,18 +580,16 @@ void DisplayController::OnDisplayRemoved(const gfx::Display& display) { // Delete the other root instead. root_to_delete = root_windows_[primary_display_id]; - internal::GetRootWindowSettings(root_to_delete)->display_id = display.id(); + GetRootWindowSettings(root_to_delete)->display_id = display.id(); // Setup primary root. root_windows_[primary_display_id] = primary_root; - internal::GetRootWindowSettings(primary_root)->display_id = - primary_display_id; + GetRootWindowSettings(primary_root)->display_id = primary_display_id; OnDisplayBoundsChanged( GetDisplayManager()->GetDisplayForId(primary_display_id)); } - internal::RootWindowController* controller = - internal::GetRootWindowController(root_to_delete); + RootWindowController* controller = GetRootWindowController(root_to_delete); DCHECK(controller); controller->MoveWindowsTo(GetPrimaryRootWindow()); // Delete most of root window related objects, but don't delete @@ -614,7 +602,7 @@ void DisplayController::OnHostResized(const aura::WindowTreeHost* host) { gfx::Display display = Shell::GetScreen()->GetDisplayNearestWindow( const_cast<aura::Window*>(host->window())); - internal::DisplayManager* display_manager = GetDisplayManager(); + DisplayManager* display_manager = GetDisplayManager(); if (display_manager->UpdateDisplayBounds(display.id(), host->GetBounds())) { mirror_window_controller_->UpdateWindow(); cursor_window_controller_->UpdateContainer(); @@ -622,19 +610,19 @@ void DisplayController::OnHostResized(const aura::WindowTreeHost* host) { } void DisplayController::CreateOrUpdateNonDesktopDisplay( - const internal::DisplayInfo& info) { + const DisplayInfo& info) { switch (GetDisplayManager()->second_display_mode()) { - case internal::DisplayManager::MIRRORING: + case DisplayManager::MIRRORING: mirror_window_controller_->UpdateWindow(info); cursor_window_controller_->UpdateContainer(); virtual_keyboard_window_controller_->Close(); break; - case internal::DisplayManager::VIRTUAL_KEYBOARD: + case DisplayManager::VIRTUAL_KEYBOARD: mirror_window_controller_->Close(); cursor_window_controller_->UpdateContainer(); virtual_keyboard_window_controller_->UpdateWindow(info); break; - case internal::DisplayManager::EXTENDED: + case DisplayManager::EXTENDED: NOTREACHED(); } } @@ -666,8 +654,8 @@ void DisplayController::PostDisplayConfigurationChange() { focus_activation_store_->Restore(); - internal::DisplayManager* display_manager = GetDisplayManager(); - internal::DisplayLayoutStore* layout_store = display_manager->layout_store(); + DisplayManager* display_manager = GetDisplayManager(); + DisplayLayoutStore* layout_store = display_manager->layout_store(); if (display_manager->num_connected_displays() > 1) { DisplayIdPair pair = display_manager->GetCurrentDisplayIdPair(); layout_store->UpdateMirrorStatus(pair, display_manager->IsMirrored()); @@ -694,7 +682,7 @@ void DisplayController::PostDisplayConfigurationChange() { aura::WindowTreeHost* DisplayController::AddWindowTreeHostForDisplay( const gfx::Display& display) { static int host_count = 0; - const internal::DisplayInfo& display_info = + const DisplayInfo& display_info = GetDisplayManager()->GetDisplayInfo(display.id()); const gfx::Rect& bounds_in_native = display_info.bounds_in_native(); aura::WindowTreeHost* host = @@ -705,7 +693,7 @@ aura::WindowTreeHost* DisplayController::AddWindowTreeHostForDisplay( // No need to remove our observer observer because the DisplayController // outlives the host. host->AddObserver(this); - internal::InitRootWindowSettings(host->window())->display_id = display.id(); + InitRootWindowSettings(host->window())->display_id = display.id(); host->InitHost(); root_windows_[display.id()] = host->window(); diff --git a/ash/display/display_controller.h b/ash/display/display_controller.h index d965131..905b594 100644 --- a/ash/display/display_controller.h +++ b/ash/display/display_controller.h @@ -37,7 +37,6 @@ class Insets; } namespace ash { -namespace internal { class CursorWindowController; class DisplayInfo; class DisplayManager; @@ -45,13 +44,12 @@ class FocusActivationStore; class MirrorWindowController; class RootWindowController; class VirtualKeyboardWindowController; -} // DisplayController owns and maintains RootWindows for each attached // display, keeping them in sync with display configuration changes. class ASH_EXPORT DisplayController : public gfx::DisplayObserver, public aura::WindowTreeHostObserver, - public internal::DisplayManager::Delegate { + public DisplayManager::Delegate { public: class ASH_EXPORT Observer { public: @@ -81,16 +79,15 @@ class ASH_EXPORT DisplayController : public gfx::DisplayObserver, // TODO(oshima): Move this out from DisplayController; static int64 GetPrimaryDisplayId(); - internal::CursorWindowController* cursor_window_controller() { + CursorWindowController* cursor_window_controller() { return cursor_window_controller_.get(); } - internal::MirrorWindowController* mirror_window_controller() { + MirrorWindowController* mirror_window_controller() { return mirror_window_controller_.get(); } - internal::VirtualKeyboardWindowController* - virtual_keyboard_window_controller() { + VirtualKeyboardWindowController* virtual_keyboard_window_controller() { return virtual_keyboard_window_controller_.get(); } @@ -133,7 +130,7 @@ class ASH_EXPORT DisplayController : public gfx::DisplayObserver, // Returns all oot window controllers. In non extended desktop // mode, this return a RootWindowController for the primary root window only. - std::vector<internal::RootWindowController*> GetAllRootWindowControllers(); + std::vector<RootWindowController*> GetAllRootWindowControllers(); // Gets/Sets/Clears the overscan insets for the specified |display_id|. See // display_manager.h for the details. @@ -157,8 +154,8 @@ class ASH_EXPORT DisplayController : public gfx::DisplayObserver, virtual void OnHostResized(const aura::WindowTreeHost* host) OVERRIDE; // aura::DisplayManager::Delegate overrides: - virtual void CreateOrUpdateNonDesktopDisplay( - const internal::DisplayInfo& info) OVERRIDE; + virtual void CreateOrUpdateNonDesktopDisplay(const DisplayInfo& info) + OVERRIDE; virtual void CloseNonDesktopDisplay() OVERRIDE; virtual void PreDisplayConfigurationChange(bool clear_focus) OVERRIDE; virtual void PostDisplayConfigurationChange() OVERRIDE; @@ -166,8 +163,8 @@ class ASH_EXPORT DisplayController : public gfx::DisplayObserver, private: FRIEND_TEST_ALL_PREFIXES(DisplayControllerTest, BoundsUpdated); FRIEND_TEST_ALL_PREFIXES(DisplayControllerTest, SecondaryDisplayLayout); - friend class internal::DisplayManager; - friend class internal::MirrorWindowController; + friend class DisplayManager; + friend class MirrorWindowController; // Creates a WindowTreeHost for |display| and stores it in the |root_windows_| // map. @@ -207,11 +204,11 @@ class ASH_EXPORT DisplayController : public gfx::DisplayObserver, // display. aura::Window* primary_root_window_for_replace_; - scoped_ptr<internal::FocusActivationStore> focus_activation_store_; + scoped_ptr<FocusActivationStore> focus_activation_store_; - scoped_ptr<internal::CursorWindowController> cursor_window_controller_; - scoped_ptr<internal::MirrorWindowController> mirror_window_controller_; - scoped_ptr<internal::VirtualKeyboardWindowController> + scoped_ptr<CursorWindowController> cursor_window_controller_; + scoped_ptr<MirrorWindowController> mirror_window_controller_; + scoped_ptr<VirtualKeyboardWindowController> virtual_keyboard_window_controller_; // Stores the curent cursor location (in native coordinates) used to diff --git a/ash/display/display_controller_unittest.cc b/ash/display/display_controller_unittest.cc index 8c64560..faaa23c 100644 --- a/ash/display/display_controller_unittest.cc +++ b/ash/display/display_controller_unittest.cc @@ -509,10 +509,10 @@ TEST_F(DisplayControllerTest, SecondaryDisplayLayout) { namespace { -internal::DisplayInfo CreateDisplayInfo(int64 id, - const gfx::Rect& bounds, - float device_scale_factor) { - internal::DisplayInfo info(id, "", false); +DisplayInfo CreateDisplayInfo(int64 id, + const gfx::Rect& bounds, + float device_scale_factor) { + DisplayInfo info(id, "", false); info.SetBounds(bounds); info.set_device_scale_factor(device_scale_factor); return info; @@ -526,15 +526,14 @@ TEST_F(DisplayControllerTest, MirrorToDockedWithFullscreen) { w1->Focus(); // Docked mode. - internal::DisplayManager* display_manager = - Shell::GetInstance()->display_manager(); + DisplayManager* display_manager = Shell::GetInstance()->display_manager(); - const internal::DisplayInfo internal_display_info = + const DisplayInfo internal_display_info = CreateDisplayInfo(1, gfx::Rect(0, 0, 500, 500), 2.0f); - const internal::DisplayInfo external_display_info = + const DisplayInfo external_display_info = CreateDisplayInfo(2, gfx::Rect(0, 0, 500, 500), 1.0f); - std::vector<internal::DisplayInfo> display_info_list; + std::vector<DisplayInfo> display_info_list; // Mirror. display_info_list.push_back(internal_display_info); display_info_list.push_back(external_display_info); @@ -583,8 +582,7 @@ TEST_F(DisplayControllerTest, BoundsUpdated) { EXPECT_EQ(0, observer.GetFocusChangedCountAndReset()); EXPECT_EQ(0, observer.GetActivationChangedCountAndReset()); - internal::DisplayManager* display_manager = - Shell::GetInstance()->display_manager(); + DisplayManager* display_manager = Shell::GetInstance()->display_manager(); gfx::Insets insets(5, 5, 5, 5); display_manager->UpdateWorkAreaOfDisplay( ScreenUtil::GetSecondaryDisplay().id(), insets); @@ -666,8 +664,7 @@ TEST_F(DisplayControllerTest, SwapPrimary) { DisplayController* display_controller = Shell::GetInstance()->display_controller(); - internal::DisplayManager* display_manager = - Shell::GetInstance()->display_manager(); + DisplayManager* display_manager = Shell::GetInstance()->display_manager(); UpdateDisplay("200x200,300x300"); gfx::Display primary_display = Shell::GetScreen()->GetPrimaryDisplay(); @@ -757,8 +754,7 @@ TEST_F(DisplayControllerTest, FindNearestDisplay) { DisplayController* display_controller = Shell::GetInstance()->display_controller(); - internal::DisplayManager* display_manager = - Shell::GetInstance()->display_manager(); + DisplayManager* display_manager = Shell::GetInstance()->display_manager(); UpdateDisplay("200x200,300x300"); DisplayLayout display_layout(DisplayLayout::RIGHT, 50); @@ -803,8 +799,7 @@ TEST_F(DisplayControllerTest, SwapPrimaryForLegacyShelfLayout) { DisplayController* display_controller = Shell::GetInstance()->display_controller(); - internal::DisplayManager* display_manager = - Shell::GetInstance()->display_manager(); + DisplayManager* display_manager = Shell::GetInstance()->display_manager(); UpdateDisplay("200x200,300x300"); gfx::Display primary_display = Shell::GetScreen()->GetPrimaryDisplay(); @@ -894,8 +889,7 @@ TEST_F(DisplayControllerTest, SwapPrimaryById) { DisplayController* display_controller = Shell::GetInstance()->display_controller(); - internal::DisplayManager* display_manager = - Shell::GetInstance()->display_manager(); + DisplayManager* display_manager = Shell::GetInstance()->display_manager(); UpdateDisplay("200x200,300x300"); gfx::Display primary_display = Shell::GetScreen()->GetPrimaryDisplay(); @@ -966,7 +960,7 @@ TEST_F(DisplayControllerTest, SwapPrimaryById) { // Adding 2nd display with the same ID. The 2nd display should become primary // since secondary id is still stored as desirable_primary_id. - std::vector<internal::DisplayInfo> display_info_list; + std::vector<DisplayInfo> display_info_list; display_info_list.push_back( display_manager->GetDisplayInfo(primary_display.id())); display_info_list.push_back( @@ -988,14 +982,14 @@ TEST_F(DisplayControllerTest, SwapPrimaryById) { // Deleting 2nd display and adding 2nd display with a different ID. The 2nd // display shouldn't become primary. UpdateDisplay("200x200"); - internal::DisplayInfo third_display_info( + DisplayInfo third_display_info( secondary_display.id() + 1, std::string(), false); third_display_info.SetBounds(secondary_display.bounds()); ASSERT_NE(primary_display.id(), third_display_info.id()); - const internal::DisplayInfo& primary_display_info = + const DisplayInfo& primary_display_info = display_manager->GetDisplayInfo(primary_display.id()); - std::vector<internal::DisplayInfo> display_info_list2; + std::vector<DisplayInfo> display_info_list2; display_info_list2.push_back(primary_display_info); display_info_list2.push_back(third_display_info); display_manager->OnNativeDisplaysChanged(display_info_list2); @@ -1121,8 +1115,7 @@ TEST_F(DisplayControllerTest, Rotate) { if (!SupportsMultipleDisplays()) return; - internal::DisplayManager* display_manager = - Shell::GetInstance()->display_manager(); + DisplayManager* display_manager = Shell::GetInstance()->display_manager(); TestEventHandler event_handler; Shell::GetInstance()->AddPreTargetHandler(&event_handler); @@ -1212,8 +1205,7 @@ TEST_F(DisplayControllerTest, ScaleRootWindow) { generator.MoveMouseToInHost(599, 200); EXPECT_EQ("449,150", event_handler.GetLocationAndReset()); - internal::DisplayManager* display_manager = - Shell::GetInstance()->display_manager(); + DisplayManager* display_manager = Shell::GetInstance()->display_manager(); display_manager->SetDisplayUIScale(display1.id(), 1.25f); display1 = Shell::GetScreen()->GetPrimaryDisplay(); display2 = ScreenUtil::GetSecondaryDisplay(); @@ -1320,10 +1312,10 @@ TEST_F(DisplayControllerTest, ConvertHostToRootCoords) { namespace { -internal::DisplayInfo CreateDisplayInfo(int64 id, - int y, - gfx::Display::Rotation rotation) { - internal::DisplayInfo info(id, "", false); +DisplayInfo CreateDisplayInfo(int64 id, + int y, + gfx::Display::Rotation rotation) { + DisplayInfo info(id, "", false); info.SetBounds(gfx::Rect(0, y, 500, 500)); info.set_rotation(rotation); return info; @@ -1337,17 +1329,16 @@ TEST_F(DisplayControllerTest, DockToSingle) { if (!SupportsMultipleDisplays()) return; - internal::DisplayManager* display_manager = - Shell::GetInstance()->display_manager(); + DisplayManager* display_manager = Shell::GetInstance()->display_manager(); const int64 internal_id = 1; - const internal::DisplayInfo internal_display_info = + const DisplayInfo internal_display_info = CreateDisplayInfo(internal_id, 0, gfx::Display::ROTATE_0); - const internal::DisplayInfo external_display_info = + const DisplayInfo external_display_info = CreateDisplayInfo(2, 1, gfx::Display::ROTATE_90); - std::vector<internal::DisplayInfo> display_info_list; + std::vector<DisplayInfo> display_info_list; // Extended display_info_list.push_back(internal_display_info); display_info_list.push_back(external_display_info); diff --git a/ash/display/display_error_observer_chromeos.cc b/ash/display/display_error_observer_chromeos.cc index a9fcb1a..72b7639 100644 --- a/ash/display/display_error_observer_chromeos.cc +++ b/ash/display/display_error_observer_chromeos.cc @@ -17,7 +17,6 @@ using message_center::Notification; namespace ash { -namespace internal { namespace { const char kDisplayErrorNotificationId[] = "chrome://settings/display/error"; @@ -70,5 +69,4 @@ base::string16 DisplayErrorObserver:: return base::string16(); } -} // namespace internal } // namespace ash diff --git a/ash/display/display_error_observer_chromeos.h b/ash/display/display_error_observer_chromeos.h index cca2e0a..3ee0d1e 100644 --- a/ash/display/display_error_observer_chromeos.h +++ b/ash/display/display_error_observer_chromeos.h @@ -11,7 +11,6 @@ #include "ui/display/chromeos/output_configurator.h" namespace ash { -namespace internal { // The class to observe the output failures and shows the error dialog when // necessary. @@ -33,7 +32,6 @@ class ASH_EXPORT DisplayErrorObserver DISALLOW_COPY_AND_ASSIGN(DisplayErrorObserver); }; -} // namespace internal } // namespace ash #endif // ASH_DISPLAY_DISPLAY_ERROR_OBSERVER_CHROMEOS_H_ diff --git a/ash/display/display_error_observer_chromeos_unittest.cc b/ash/display/display_error_observer_chromeos_unittest.cc index dbc2c0e..b43dd21 100644 --- a/ash/display/display_error_observer_chromeos_unittest.cc +++ b/ash/display/display_error_observer_chromeos_unittest.cc @@ -14,7 +14,6 @@ #include "ui/views/widget/widget.h" namespace ash { -namespace internal { class DisplayErrorObserverTest : public test::AshTestBase { protected: @@ -81,5 +80,4 @@ TEST_F(DisplayErrorObserverTest, CallWithDifferentState) { GetMessageContents()); } -} // namespace internal } // namespace ash diff --git a/ash/display/display_info.cc b/ash/display/display_info.cc index e3a4b63..1aa0583 100644 --- a/ash/display/display_info.cc +++ b/ash/display/display_info.cc @@ -21,7 +21,6 @@ #endif namespace ash { -namespace internal { DisplayMode::DisplayMode() : refresh_rate(0.0f), interlaced(false), native(false) {} @@ -316,5 +315,4 @@ bool DisplayInfo::IsColorProfileAvailable( profile) != available_color_profiles_.end(); } -} // namespace internal } // namespace ash diff --git a/ash/display/display_info.h b/ash/display/display_info.h index 14af285..51f570a 100644 --- a/ash/display/display_info.h +++ b/ash/display/display_info.h @@ -15,7 +15,6 @@ #include "ui/gfx/rect.h" namespace ash { -namespace internal { // A struct that represents the display's mode info. struct ASH_EXPORT DisplayMode { @@ -225,7 +224,6 @@ class ASH_EXPORT DisplayInfo { std::vector<ui::ColorCalibrationProfile> available_color_profiles_; }; -} // namespace internal } // namespace ash #endif // ASH_DISPLAY_DISPLAY_INFO_H_ diff --git a/ash/display/display_info_unittest.cc b/ash/display/display_info_unittest.cc index 50c06cf..507dfa7 100644 --- a/ash/display/display_info_unittest.cc +++ b/ash/display/display_info_unittest.cc @@ -7,7 +7,6 @@ #include "testing/gtest/include/gtest/gtest.h" namespace ash { -namespace internal { typedef testing::Test DisplayInfoTest; @@ -58,5 +57,4 @@ TEST_F(DisplayInfoTest, CreateFromSpec) { EXPECT_FALSE(info.display_modes()[2].native); } -} // namespace internal } // namespace ash diff --git a/ash/display/display_layout_store.cc b/ash/display/display_layout_store.cc index 63b1d60..a3aed0b 100644 --- a/ash/display/display_layout_store.cc +++ b/ash/display/display_layout_store.cc @@ -11,7 +11,6 @@ #include "ui/gfx/display.h" namespace ash { -namespace internal { DisplayLayoutStore::DisplayLayoutStore() { CommandLine* command_line = CommandLine::ForCurrentProcess(); @@ -90,5 +89,4 @@ DisplayLayout DisplayLayoutStore::CreateDisplayLayout( return layout; } -} // namespace internal } // namespace ash diff --git a/ash/display/display_layout_store.h b/ash/display/display_layout_store.h index 67c3c2e..a967537 100644 --- a/ash/display/display_layout_store.h +++ b/ash/display/display_layout_store.h @@ -11,7 +11,6 @@ #include "ash/display/display_layout.h" namespace ash { -namespace internal { class ASH_EXPORT DisplayLayoutStore { public: @@ -63,7 +62,6 @@ class ASH_EXPORT DisplayLayoutStore { DISALLOW_COPY_AND_ASSIGN(DisplayLayoutStore); }; -} // namespace internal } // namespace ash #endif // ASH_DISPLAY_DISPLAY_LAYOUT_STORE_H_ diff --git a/ash/display/display_manager.cc b/ash/display/display_manager.cc index fb4fec7..bf7dbca 100644 --- a/ash/display/display_manager.cc +++ b/ash/display/display_manager.cc @@ -43,7 +43,6 @@ #endif namespace ash { -namespace internal { typedef std::vector<gfx::Display> DisplayList; typedef std::vector<DisplayInfo> DisplayInfoList; @@ -1117,5 +1116,4 @@ void DisplayManager::UpdateDisplayBoundsForLayout( secondary_display->UpdateWorkAreaFromInsets(insets); } -} // namespace internal } // namespace ash diff --git a/ash/display/display_manager.h b/ash/display/display_manager.h index c672524..11b9955 100644 --- a/ash/display/display_manager.h +++ b/ash/display/display_manager.h @@ -30,14 +30,13 @@ class Screen; namespace ash { class AcceleratorControllerTest; class DisplayController; +class DisplayLayoutStore; class ScreenAsh; namespace test { class DisplayManagerTestApi; class SystemGestureEventFilterTest; } -namespace internal { -class DisplayLayoutStore; // DisplayManager maintains the current display configurations, // and notifies observers when configuration changes. @@ -365,7 +364,6 @@ private: DISALLOW_COPY_AND_ASSIGN(DisplayManager); }; -} // namespace internal } // namespace ash #endif // ASH_DISPLAY_DISPLAY_MANAGER_H_ diff --git a/ash/display/display_manager_unittest.cc b/ash/display/display_manager_unittest.cc index 85df8bb..33c2536 100644 --- a/ash/display/display_manager_unittest.cc +++ b/ash/display/display_manager_unittest.cc @@ -24,7 +24,6 @@ #include "ui/gfx/screen_type_delegate.h" namespace ash { -namespace internal { using std::vector; using std::string; @@ -1230,5 +1229,4 @@ TEST_F(ScreenShutdownTest, ScreenAfterShutdown) { UpdateDisplay("500x300,800x400"); } -} // namespace internal } // namespace ash diff --git a/ash/display/event_transformation_handler.cc b/ash/display/event_transformation_handler.cc index b465ef2..2ea462a 100644 --- a/ash/display/event_transformation_handler.cc +++ b/ash/display/event_transformation_handler.cc @@ -21,7 +21,6 @@ #endif // defined(OS_CHROMEOS) namespace ash { -namespace internal { namespace { // Boost factor for non-integrated displays. @@ -90,5 +89,4 @@ void EventTransformationHandler::OnTouchEvent(ui::TouchEvent* event) { } #endif // defined(OS_CHROMEOS) -} // namespace internal } // namespace ash diff --git a/ash/display/event_transformation_handler.h b/ash/display/event_transformation_handler.h index da9560f..0d3c7e0 100644 --- a/ash/display/event_transformation_handler.h +++ b/ash/display/event_transformation_handler.h @@ -11,8 +11,6 @@ namespace ash { -namespace internal { - // An event filter that transforms input event properties in extended desktop // environment. class ASH_EXPORT EventTransformationHandler : public ui::EventHandler { @@ -43,7 +41,6 @@ class ASH_EXPORT EventTransformationHandler : public ui::EventHandler { DISALLOW_COPY_AND_ASSIGN(EventTransformationHandler); }; -} // namespace internal } // namespace ash #endif // ASH_DISPLAY_EVENT_TRANSFORMATION_HANDLER_H_ diff --git a/ash/display/mirror_window_controller.cc b/ash/display/mirror_window_controller.cc index a766e7d..69de042 100644 --- a/ash/display/mirror_window_controller.cc +++ b/ash/display/mirror_window_controller.cc @@ -34,7 +34,6 @@ #endif namespace ash { -namespace internal { namespace { #if defined(USE_X11) @@ -121,9 +120,8 @@ void MirrorWindowController::UpdateWindow(const DisplayInfo& display_info) { Shell::GetScreen()->GetPrimaryDisplay().id()); DCHECK(display_manager->IsMirrored()); scoped_ptr<aura::RootWindowTransformer> transformer( - internal::CreateRootWindowTransformerForMirroredDisplay( - source_display_info, - display_info)); + CreateRootWindowTransformerForMirroredDisplay(source_display_info, + display_info)); host_->SetRootWindowTransformer(transformer.Pass()); } @@ -171,10 +169,8 @@ MirrorWindowController::CreateRootWindowTransformer() const { Shell::GetScreen()->GetPrimaryDisplay().id()); DCHECK(display_manager->IsMirrored()); return scoped_ptr<aura::RootWindowTransformer>( - internal::CreateRootWindowTransformerForMirroredDisplay( - source_display_info, - mirror_display_info)); + CreateRootWindowTransformerForMirroredDisplay(source_display_info, + mirror_display_info)); } -} // namespace internal } // namespace ash diff --git a/ash/display/mirror_window_controller.h b/ash/display/mirror_window_controller.h index c70e9d8..89b2b61 100644 --- a/ash/display/mirror_window_controller.h +++ b/ash/display/mirror_window_controller.h @@ -26,13 +26,12 @@ class Reflector; } namespace ash { +class DisplayInfo; + namespace test{ class MirrorWindowTestApi; } -namespace internal { -class DisplayInfo; - // An object that copies the content of the primary root window to a // mirror window. This also draws a mouse cursor as the mouse cursor // is typically drawn by the window system. @@ -71,7 +70,6 @@ class ASH_EXPORT MirrorWindowController : public aura::WindowTreeHostObserver { DISALLOW_COPY_AND_ASSIGN(MirrorWindowController); }; -} // namespace internal } // namespace ash #endif // ASH_DISPLAY_MIRROR_WINDOW_CONTROLLER_H_ diff --git a/ash/display/mirror_window_controller_unittest.cc b/ash/display/mirror_window_controller_unittest.cc index a64a6aa..15f8c6a 100644 --- a/ash/display/mirror_window_controller_unittest.cc +++ b/ash/display/mirror_window_controller_unittest.cc @@ -20,7 +20,6 @@ #include "ui/base/hit_test.h" namespace ash { -namespace internal { namespace { DisplayInfo CreateDisplayInfo(int64 id, const gfx::Rect& bounds) { @@ -287,5 +286,4 @@ TEST_F(MirrorOnBootTest, MAYBE_MirrorOnBoot) { EXPECT_TRUE(test_api.GetHost()); } -} // namsspace internal } // namespace ash diff --git a/ash/display/mouse_cursor_event_filter.cc b/ash/display/mouse_cursor_event_filter.cc index a91fc64..cbc2207 100644 --- a/ash/display/mouse_cursor_event_filter.cc +++ b/ash/display/mouse_cursor_event_filter.cc @@ -22,7 +22,6 @@ #include "ui/gfx/screen.h" namespace ash { -namespace internal { namespace { // Maximum size on the display edge that initiate snapping phantom window, @@ -262,5 +261,4 @@ void MouseCursorEventFilter::UpdateVerticalIndicatorWindowBounds() { src_indicator_bounds_.set_height(lower_indicator_y - upper_indicator_y); } -} // namespace internal } // namespace ash diff --git a/ash/display/mouse_cursor_event_filter.h b/ash/display/mouse_cursor_event_filter.h index b05456e..e7201ed 100644 --- a/ash/display/mouse_cursor_event_filter.h +++ b/ash/display/mouse_cursor_event_filter.h @@ -19,8 +19,6 @@ class Window; namespace ash { class DisplayController; - -namespace internal { class SharedDisplayEdgeIndicator; // An event filter that controls mouse location in extended desktop @@ -99,7 +97,6 @@ class ASH_EXPORT MouseCursorEventFilter : public ui::EventHandler { DISALLOW_COPY_AND_ASSIGN(MouseCursorEventFilter); }; -} // namespace internal } // namespace ash #endif // ASH_DISPLAY_MOUSE_CURSOR_EVENT_FILTER_H diff --git a/ash/display/mouse_cursor_event_filter_unittest.cc b/ash/display/mouse_cursor_event_filter_unittest.cc index 0f02358..1b34456 100644 --- a/ash/display/mouse_cursor_event_filter_unittest.cc +++ b/ash/display/mouse_cursor_event_filter_unittest.cc @@ -15,7 +15,6 @@ #include "ui/gfx/screen.h" namespace ash { -namespace internal { class MouseCursorEventFilterTest : public test::AshTestBase { public: @@ -376,5 +375,4 @@ TEST_F(MouseCursorEventFilterTest, CursorDeviceScaleFactor) { EXPECT_EQ(1.0f, cursor_test_api.GetDisplay().device_scale_factor()); } -} // namespace internal } // namespace ash diff --git a/ash/display/output_configurator_animation.cc b/ash/display/output_configurator_animation.cc index 983e574..8d02a2f 100644 --- a/ash/display/output_configurator_animation.cc +++ b/ash/display/output_configurator_animation.cc @@ -18,7 +18,6 @@ #include "ui/compositor/scoped_layer_animation_settings.h" namespace ash { -namespace internal { namespace { const int kFadingAnimationDurationInMS = 200; @@ -122,9 +121,9 @@ void OutputConfiguratorAnimation::StartFadeOutAnimation( ui::Layer* hiding_layer = new ui::Layer(ui::LAYER_SOLID_COLOR); hiding_layer->SetColor(SK_ColorBLACK); hiding_layer->SetBounds(root_window->bounds()); - ui::Layer* parent = ash::Shell::GetContainer( - root_window, - ash::internal::kShellWindowId_OverlayContainer)->layer(); + ui::Layer* parent = + ash::Shell::GetContainer(root_window, + ash::kShellWindowId_OverlayContainer)->layer(); parent->Add(hiding_layer); hiding_layer->SetOpacity(0.0); @@ -181,9 +180,9 @@ void OutputConfiguratorAnimation::StartFadeInAnimation() { hiding_layer = new ui::Layer(ui::LAYER_SOLID_COLOR); hiding_layer->SetColor(SK_ColorBLACK); hiding_layer->SetBounds(root_window->bounds()); - ui::Layer* parent = ash::Shell::GetContainer( - root_window, - ash::internal::kShellWindowId_OverlayContainer)->layer(); + ui::Layer* parent = + ash::Shell::GetContainer( + root_window, ash::kShellWindowId_OverlayContainer)->layer(); parent->Add(hiding_layer); hiding_layer->SetOpacity(1.0f); hiding_layer->SetVisible(true); @@ -225,5 +224,4 @@ void OutputConfiguratorAnimation::ClearHidingLayers() { hiding_layers_.clear(); } -} // namespace internal } // namespace ash diff --git a/ash/display/output_configurator_animation.h b/ash/display/output_configurator_animation.h index 2d00074..71a2127 100644 --- a/ash/display/output_configurator_animation.h +++ b/ash/display/output_configurator_animation.h @@ -22,7 +22,6 @@ class Layer; } // namespace ui namespace ash { -namespace internal { // OutputConfiguratorAnimation provides the visual effects for // ui::OutputConfigurator, such like fade-out/in during changing @@ -60,7 +59,6 @@ class ASH_EXPORT OutputConfiguratorAnimation DISALLOW_COPY_AND_ASSIGN(OutputConfiguratorAnimation); }; -} // namespace internal } // namespace ash #endif // ASH_DISPLAY_OUTPUT_CONFIGURATION_CONTROLLER_H_ diff --git a/ash/display/projecting_observer_chromeos.cc b/ash/display/projecting_observer_chromeos.cc index 8183d0a..81dc3ea 100644 --- a/ash/display/projecting_observer_chromeos.cc +++ b/ash/display/projecting_observer_chromeos.cc @@ -10,8 +10,6 @@ namespace ash { -namespace internal { - ProjectingObserver::ProjectingObserver() : has_internal_output_(false), output_count_(0), @@ -57,6 +55,4 @@ void ProjectingObserver::SetIsProjecting() { projecting); } -} // namespace internal - } // namespace ash diff --git a/ash/display/projecting_observer_chromeos.h b/ash/display/projecting_observer_chromeos.h index 3320ae8..d038b6d 100644 --- a/ash/display/projecting_observer_chromeos.h +++ b/ash/display/projecting_observer_chromeos.h @@ -10,8 +10,6 @@ namespace ash { -namespace internal { - class ASH_EXPORT ProjectingObserver : public ui::OutputConfigurator::Observer { public: ProjectingObserver(); @@ -41,8 +39,6 @@ class ASH_EXPORT ProjectingObserver : public ui::OutputConfigurator::Observer { DISALLOW_COPY_AND_ASSIGN(ProjectingObserver); }; -} // namespace internal - } // namespace ash #endif // ASH_DISPLAY_PROJECTING_OBSERVER_CHROMEOS_H_ diff --git a/ash/display/projecting_observer_chromeos_unittest.cc b/ash/display/projecting_observer_chromeos_unittest.cc index 16d9694..a6c1d205 100644 --- a/ash/display/projecting_observer_chromeos_unittest.cc +++ b/ash/display/projecting_observer_chromeos_unittest.cc @@ -11,9 +11,6 @@ #include "ui/display/chromeos/test/test_display_snapshot.h" namespace ash { - -namespace internal { - namespace { ui::TestDisplaySnapshot* CreateInternalSnapshot() { @@ -192,6 +189,4 @@ TEST_F(ProjectingObserverTest, EXPECT_FALSE(fake_power_client_->is_projecting()); } -} // namespace internal - } // namespace ash diff --git a/ash/display/resolution_notification_controller.cc b/ash/display/resolution_notification_controller.cc index a44e2da..2c45402 100644 --- a/ash/display/resolution_notification_controller.cc +++ b/ash/display/resolution_notification_controller.cc @@ -23,7 +23,6 @@ using message_center::Notification; namespace ash { -namespace internal { namespace { bool g_use_timer = true; @@ -320,5 +319,4 @@ void ResolutionNotificationController::SuppressTimerForTest() { g_use_timer = false; } -} // namespace internal } // namespace ash diff --git a/ash/display/resolution_notification_controller.h b/ash/display/resolution_notification_controller.h index bacc9c8..23a582d 100644 --- a/ash/display/resolution_notification_controller.h +++ b/ash/display/resolution_notification_controller.h @@ -23,7 +23,7 @@ class Widget; } // namespace views namespace ash { -namespace internal { + // A class which manages the notification of display resolution change and // also manages the timeout in case the new resolution is unusable. class ASH_EXPORT ResolutionNotificationController @@ -93,7 +93,6 @@ class ASH_EXPORT ResolutionNotificationController DISALLOW_COPY_AND_ASSIGN(ResolutionNotificationController); }; -} // namespace internal } // namespace ash #endif // ASH_DISPLAY_RESOLUTION_NOTIFICATION_CONTROLLER_H_ diff --git a/ash/display/resolution_notification_controller_unittest.cc b/ash/display/resolution_notification_controller_unittest.cc index e3b2740..4d1eedf 100644 --- a/ash/display/resolution_notification_controller_unittest.cc +++ b/ash/display/resolution_notification_controller_unittest.cc @@ -18,8 +18,6 @@ #include "ui/message_center/notification_list.h" namespace ash { -namespace internal { - namespace { base::string16 ExpectedNotificationMessage(int64 display_id, @@ -159,7 +157,7 @@ TEST_F(ResolutionNotificationControllerTest, Basic) { UpdateDisplay("300x300#300x300%57|200x200%58,250x250#250x250%59|200x200%60"); int64 id2 = ash::ScreenUtil::GetSecondaryDisplay().id(); - ash::internal::DisplayManager* display_manager = + ash::DisplayManager* display_manager = ash::Shell::GetInstance()->display_manager(); ASSERT_EQ(0, accept_count()); EXPECT_FALSE(IsNotificationVisible()); @@ -192,7 +190,7 @@ TEST_F(ResolutionNotificationControllerTest, ClickMeansAccept) { UpdateDisplay("300x300#300x300%57|200x200%58,250x250#250x250%59|200x200%60"); int64 id2 = ash::ScreenUtil::GetSecondaryDisplay().id(); - ash::internal::DisplayManager* display_manager = + ash::DisplayManager* display_manager = ash::Shell::GetInstance()->display_manager(); ASSERT_EQ(0, accept_count()); EXPECT_FALSE(IsNotificationVisible()); @@ -221,7 +219,7 @@ TEST_F(ResolutionNotificationControllerTest, AcceptButton) { if (!SupportsMultipleDisplays()) return; - ash::internal::DisplayManager* display_manager = + ash::DisplayManager* display_manager = ash::Shell::GetInstance()->display_manager(); UpdateDisplay("300x300#300x300%59|200x200%60"); @@ -262,7 +260,7 @@ TEST_F(ResolutionNotificationControllerTest, Close) { UpdateDisplay("100x100,150x150#150x150%59|200x200%60"); int64 id2 = ash::ScreenUtil::GetSecondaryDisplay().id(); - ash::internal::DisplayManager* display_manager = + ash::DisplayManager* display_manager = ash::Shell::GetInstance()->display_manager(); ASSERT_EQ(0, accept_count()); EXPECT_FALSE(IsNotificationVisible()); @@ -301,7 +299,7 @@ TEST_F(ResolutionNotificationControllerTest, Timeout) { } EXPECT_FALSE(IsNotificationVisible()); EXPECT_EQ(0, accept_count()); - ash::internal::DisplayManager* display_manager = + ash::DisplayManager* display_manager = ash::Shell::GetInstance()->display_manager(); DisplayMode mode; EXPECT_TRUE( @@ -317,7 +315,7 @@ TEST_F(ResolutionNotificationControllerTest, DisplayDisconnected) { UpdateDisplay("300x300#300x300%56|200x200%57," "200x200#250x250%58|200x200%59|100x100%60"); int64 id2 = ash::ScreenUtil::GetSecondaryDisplay().id(); - ash::internal::DisplayManager* display_manager = + ash::DisplayManager* display_manager = ash::Shell::GetInstance()->display_manager(); SetDisplayResolutionAndNotify( ScreenUtil::GetSecondaryDisplay(), gfx::Size(100, 100)); @@ -342,7 +340,7 @@ TEST_F(ResolutionNotificationControllerTest, MultipleResolutionChange) { UpdateDisplay("300x300#300x300%56|200x200%57," "250x250#250x250%58|200x200%59"); int64 id2 = ash::ScreenUtil::GetSecondaryDisplay().id(); - ash::internal::DisplayManager* display_manager = + ash::DisplayManager* display_manager = ash::Shell::GetInstance()->display_manager(); SetDisplayResolutionAndNotify( @@ -381,7 +379,7 @@ TEST_F(ResolutionNotificationControllerTest, Fallback) { UpdateDisplay("300x300#300x300%56|200x200%57," "250x250#250x250%58|220x220%59|200x200%60"); int64 id2 = ash::ScreenUtil::GetSecondaryDisplay().id(); - ash::internal::DisplayManager* display_manager = + ash::DisplayManager* display_manager = ash::Shell::GetInstance()->display_manager(); ASSERT_EQ(0, accept_count()); EXPECT_FALSE(IsNotificationVisible()); @@ -412,5 +410,4 @@ TEST_F(ResolutionNotificationControllerTest, Fallback) { EXPECT_EQ(58.0f, mode.refresh_rate); } -} // namespace internal } // namespace ash diff --git a/ash/display/root_window_transformers.cc b/ash/display/root_window_transformers.cc index 8774852..a632eb3 100644 --- a/ash/display/root_window_transformers.cc +++ b/ash/display/root_window_transformers.cc @@ -26,7 +26,6 @@ DECLARE_WINDOW_PROPERTY_TYPE(gfx::Display::Rotation); namespace ash { -namespace internal { namespace { #if defined(OS_WIN) @@ -281,5 +280,4 @@ aura::RootWindowTransformer* CreateRootWindowTransformerForMirroredDisplay( mirror_display_info); } -} // namespace internal } // namespace ash diff --git a/ash/display/root_window_transformers.h b/ash/display/root_window_transformers.h index e1d4053..a6f2b5c 100644 --- a/ash/display/root_window_transformers.h +++ b/ash/display/root_window_transformers.h @@ -18,7 +18,6 @@ class Transform; } namespace ash { -namespace internal { class DisplayInfo; ASH_EXPORT aura::RootWindowTransformer* CreateRootWindowTransformerForDisplay( @@ -34,7 +33,6 @@ CreateRootWindowTransformerForMirroredDisplay( const DisplayInfo& source_display_info, const DisplayInfo& mirror_display_info); -} // namespace internal } // namespace ash #endif // ASH_DISPLAY_ROOT_WINDOW_TRANSFORMERS_H_ diff --git a/ash/display/root_window_transformers_unittest.cc b/ash/display/root_window_transformers_unittest.cc index 954deb8..b41b75f 100644 --- a/ash/display/root_window_transformers_unittest.cc +++ b/ash/display/root_window_transformers_unittest.cc @@ -27,8 +27,6 @@ #include "ui/views/widget/widget.h" namespace ash { -namespace internal { - namespace { const char kDesktopBackgroundView[] = "DesktopBackgroundView"; @@ -410,5 +408,4 @@ TEST_F(RootWindowTransformersTest, LetterBoxPillarBox) { EXPECT_EQ("125,0,125,0", transformer->GetHostInsets().ToString()); } -} // namespace test } // namespace ash diff --git a/ash/display/screen_ash.cc b/ash/display/screen_ash.cc index 02cf9c0..d32deb8 100644 --- a/ash/display/screen_ash.cc +++ b/ash/display/screen_ash.cc @@ -23,7 +23,7 @@ namespace ash { namespace { -internal::DisplayManager* GetDisplayManager() { +DisplayManager* GetDisplayManager() { return Shell::GetInstance()->display_manager(); } @@ -136,7 +136,7 @@ gfx::Display ScreenAsh::FindDisplayContainingPoint(const gfx::Point& point) { // static gfx::Rect ScreenAsh::GetMaximizedWindowBoundsInParent(aura::Window* window) { - if (internal::GetRootWindowController(window->GetRootWindow())->shelf()) + if (GetRootWindowController(window->GetRootWindow())->shelf()) return GetDisplayWorkAreaBoundsInParent(window); else return GetDisplayBoundsInParent(window); @@ -176,7 +176,7 @@ gfx::Rect ScreenAsh::ConvertRectFromScreen(aura::Window* window, // static const gfx::Display& ScreenAsh::GetSecondaryDisplay() { - internal::DisplayManager* display_manager = GetDisplayManager(); + DisplayManager* display_manager = GetDisplayManager(); CHECK_EQ(2U, display_manager->GetNumDisplays()); return display_manager->GetDisplayAt(0).id() == Shell::GetScreen()->GetPrimaryDisplay().id() ? @@ -232,15 +232,14 @@ gfx::Display ScreenAsh::GetDisplayNearestWindow(gfx::NativeView window) const { const aura::Window* root_window = window->GetRootWindow(); if (!root_window) return GetPrimaryDisplay(); - const internal::RootWindowSettings* rws = - internal::GetRootWindowSettings(root_window); + const RootWindowSettings* rws = GetRootWindowSettings(root_window); if (rws->shutdown) return gfx::Display(1); int64 id = rws->display_id; // if id is |kInvaildDisplayID|, it's being deleted. DCHECK(id != gfx::Display::kInvalidDisplayID); - internal::DisplayManager* display_manager = GetDisplayManager(); + DisplayManager* display_manager = GetDisplayManager(); // RootWindow needs Display to determine its device scale factor // for non desktop display. if (display_manager->non_desktop_display().id() == id) diff --git a/ash/display/screen_ash.h b/ash/display/screen_ash.h index eb8cf75a..08011b2 100644 --- a/ash/display/screen_ash.h +++ b/ash/display/screen_ash.h @@ -78,7 +78,7 @@ class ASH_EXPORT ScreenAsh : public gfx::Screen { virtual void RemoveObserver(gfx::DisplayObserver* observer) OVERRIDE; private: - friend class internal::DisplayManager; + friend class DisplayManager; // Notifies observers of display configuration changes. void NotifyBoundsChanged(const gfx::Display& display); diff --git a/ash/display/screen_position_controller.cc b/ash/display/screen_position_controller.cc index 6572ac1..6ab4b54 100644 --- a/ash/display/screen_position_controller.cc +++ b/ash/display/screen_position_controller.cc @@ -28,9 +28,8 @@ namespace { // Return true if the window or its ancestor has |kStayInSameRootWindowkey| // property. bool ShouldStayInSameRootWindow(const aura::Window* window) { - return window && - (window->GetProperty(internal::kStayInSameRootWindowKey) || - ShouldStayInSameRootWindow(window->parent())); + return window && (window->GetProperty(kStayInSameRootWindowKey) || + ShouldStayInSameRootWindow(window->parent())); } // Move all transient children to |dst_root|, including the ones in @@ -115,8 +114,6 @@ std::pair<aura::Window*, gfx::Point> GetRootWindowRelativeToWindow( } // namespace -namespace internal { - void ScreenPositionController::ConvertPointToScreen( const aura::Window* window, gfx::Point* point) { @@ -152,7 +149,7 @@ void ScreenPositionController::SetBounds(aura::Window* window, const gfx::Rect& bounds, const gfx::Display& display) { DCHECK_NE(-1, display.id()); - if (!window->parent()->GetProperty(internal::kUsesScreenCoordinatesKey)) { + if (!window->parent()->GetProperty(kUsesScreenCoordinatesKey)) { window->SetBounds(bounds); return; } @@ -228,5 +225,4 @@ void ScreenPositionController::SetBounds(aura::Window* window, window->SetBounds(gfx::Rect(origin, bounds.size())); } -} // internal -} // ash +} // namespace ash diff --git a/ash/display/screen_position_controller.h b/ash/display/screen_position_controller.h index ad692f9..95271c1 100644 --- a/ash/display/screen_position_controller.h +++ b/ash/display/screen_position_controller.h @@ -9,7 +9,6 @@ #include "ui/aura/client/screen_position_client.h" namespace ash { -namespace internal { class ScreenPositionController : public aura::client::ScreenPositionClient { public: @@ -31,7 +30,6 @@ class ScreenPositionController : public aura::client::ScreenPositionClient { DISALLOW_COPY_AND_ASSIGN(ScreenPositionController); }; -} // internal -} // ash +} // namespace ash #endif // ASH_DISPLAY_SCREEN_POSITION_CONTROLLER_H_ diff --git a/ash/display/screen_position_controller_unittest.cc b/ash/display/screen_position_controller_unittest.cc index 94fe715..42150bc 100644 --- a/ash/display/screen_position_controller_unittest.cc +++ b/ash/display/screen_position_controller_unittest.cc @@ -41,7 +41,7 @@ void SetSecondaryDisplayLayout(DisplayLayout::Position position) { SetLayoutForCurrentDisplays(layout); } -internal::ScreenPositionController* GetScreenPositionController() { +ScreenPositionController* GetScreenPositionController() { ShellTestApi test_api(Shell::GetInstance()); return test_api.screen_position_controller(); } diff --git a/ash/display/shared_display_edge_indicator.cc b/ash/display/shared_display_edge_indicator.cc index 02af831..bf2c047 100644 --- a/ash/display/shared_display_edge_indicator.cc +++ b/ash/display/shared_display_edge_indicator.cc @@ -18,7 +18,6 @@ #include "ui/views/widget/widget.h" namespace ash { -namespace internal { namespace { const int kIndicatorAnimationDurationMs = 1000; @@ -113,5 +112,4 @@ void SharedDisplayEdgeIndicator::AnimationProgressed( } -} // namespace internal } // namespace ash diff --git a/ash/display/shared_display_edge_indicator.h b/ash/display/shared_display_edge_indicator.h index d0d242d..d1900bc 100644 --- a/ash/display/shared_display_edge_indicator.h +++ b/ash/display/shared_display_edge_indicator.h @@ -22,7 +22,6 @@ class Widget; } namespace ash { -namespace internal { // SharedDisplayEdgeIndicator is responsible for showing a window that indicates // the edge that a window can be dragged into another display. @@ -53,7 +52,6 @@ class ASH_EXPORT SharedDisplayEdgeIndicator : public gfx::AnimationDelegate { DISALLOW_COPY_AND_ASSIGN(SharedDisplayEdgeIndicator); }; -} // namespace internal } // namespace ash #endif // ASH_DISPLAY_SHARED_DISPLAY_EDGE_INDICATOR_H_ diff --git a/ash/display/virtual_keyboard_window_controller.cc b/ash/display/virtual_keyboard_window_controller.cc index 531aa9b..b7cb262 100644 --- a/ash/display/virtual_keyboard_window_controller.cc +++ b/ash/display/virtual_keyboard_window_controller.cc @@ -22,7 +22,6 @@ #include "ui/keyboard/keyboard_util.h" namespace ash { -namespace internal { VirtualKeyboardWindowController::VirtualKeyboardWindowController() { Shell::GetInstance()->AddShellObserver(this); @@ -90,8 +89,8 @@ void VirtualKeyboardWindowController::FlipDisplay() { aura::WindowTreeHost* host = root_window_controller_->host(); scoped_ptr<aura::RootWindowTransformer> transformer( - internal::CreateRootWindowTransformerForDisplay(host->window(), - display_manager->non_desktop_display())); + CreateRootWindowTransformerForDisplay( + host->window(), display_manager->non_desktop_display())); host->SetRootWindowTransformer(transformer.Pass()); } @@ -106,5 +105,4 @@ void VirtualKeyboardWindowController::OnMaximizeModeEnded() { Shell::GetInstance()->DeactivateKeyboard(); } -} // namespace internal } // namespace ash diff --git a/ash/display/virtual_keyboard_window_controller.h b/ash/display/virtual_keyboard_window_controller.h index 1686539..23dd406 100644 --- a/ash/display/virtual_keyboard_window_controller.h +++ b/ash/display/virtual_keyboard_window_controller.h @@ -16,15 +16,13 @@ class KeyboardController; } namespace ash { +class DisplayInfo; +class RootWindowController; namespace test { class VirtualKeyboardWindowControllerTest; } // namespace test -namespace internal { -class DisplayInfo; -class RootWindowController; - // This class maintains the RootWindowController dedicated for // virtual keyboard. class ASH_EXPORT VirtualKeyboardWindowController : public ShellObserver { @@ -60,7 +58,6 @@ class ASH_EXPORT VirtualKeyboardWindowController : public ShellObserver { DISALLOW_COPY_AND_ASSIGN(VirtualKeyboardWindowController); }; -} // namespace internal } // namespace ash #endif // ASH_DISPLAY_VIRTUAL_KEYBOARD_WINDOW_CONTROLLER_H_ diff --git a/ash/display/virtual_keyboard_window_controller_unittest.cc b/ash/display/virtual_keyboard_window_controller_unittest.cc index 915be43..4e1bdd5 100644 --- a/ash/display/virtual_keyboard_window_controller_unittest.cc +++ b/ash/display/virtual_keyboard_window_controller_unittest.cc @@ -24,18 +24,17 @@ class VirtualKeyboardWindowControllerTest : public AshTestBase { virtual ~VirtualKeyboardWindowControllerTest() {} void set_virtual_keyboard_window_controller( - internal::VirtualKeyboardWindowController* controller) { + VirtualKeyboardWindowController* controller) { virtual_keyboard_window_controller_ = controller; } - internal::RootWindowController* root_window_controller() { + RootWindowController* root_window_controller() { return virtual_keyboard_window_controller_-> root_window_controller_for_test(); } private: - internal::VirtualKeyboardWindowController* - virtual_keyboard_window_controller_; + VirtualKeyboardWindowController* virtual_keyboard_window_controller_; DISALLOW_COPY_AND_ASSIGN(VirtualKeyboardWindowControllerTest); }; @@ -70,7 +69,7 @@ TEST_F(VirtualKeyboardUsabilityExperimentTest, VirtualKeyboardWindowTest) { EXPECT_TRUE(root_window_controller()); // Keyboard container is added to virtual keyboard window. EXPECT_TRUE(root_window_controller()->GetContainer( - internal::kShellWindowId_VirtualKeyboardContainer)); + kShellWindowId_VirtualKeyboardContainer)); } // Tests that the onscreen keyboard becomes enabled when maximize mode is diff --git a/ash/drag_drop/drag_drop_controller.cc b/ash/drag_drop/drag_drop_controller.cc index cc8d96b..4a2603f 100644 --- a/ash/drag_drop/drag_drop_controller.cc +++ b/ash/drag_drop/drag_drop_controller.cc @@ -31,9 +31,8 @@ #include "ui/wm/public/drag_drop_delegate.h" namespace ash { -namespace internal { - namespace { + // The duration of the drag cancel animation in millisecond. const int kCancelAnimationDuration = 250; const int kTouchCancelAnimationDuration = 20; @@ -560,5 +559,4 @@ void DragDropController::Cleanup() { drag_drop_tracker_.Pass(); } -} // namespace internal } // namespace ash diff --git a/ash/drag_drop/drag_drop_controller.h b/ash/drag_drop/drag_drop_controller.h index 5d05ec9..7f20401 100644 --- a/ash/drag_drop/drag_drop_controller.h +++ b/ash/drag_drop/drag_drop_controller.h @@ -21,17 +21,14 @@ class LinearAnimation; } namespace ash { +class DragDropTracker; +class DragDropTrackerDelegate; +class DragImageView; namespace test { class DragDropControllerTest; } -namespace internal { - -class DragDropTracker; -class DragDropTrackerDelegate; -class DragImageView; - class ASH_EXPORT DragDropController : public aura::client::DragDropClient, public ui::EventHandler, @@ -122,7 +119,7 @@ class ASH_EXPORT DragDropController // Closure for quitting nested message loop. base::Closure quit_closure_; - scoped_ptr<ash::internal::DragDropTracker> drag_drop_tracker_; + scoped_ptr<ash::DragDropTracker> drag_drop_tracker_; scoped_ptr<DragDropTrackerDelegate> drag_drop_window_delegate_; ui::DragDropTypes::DragEventSource current_drag_event_source_; @@ -136,7 +133,6 @@ class ASH_EXPORT DragDropController DISALLOW_COPY_AND_ASSIGN(DragDropController); }; -} // namespace internal } // namespace ash #endif // ASH_DRAG_DROP_DRAG_DROP_CONTROLLER_H_ diff --git a/ash/drag_drop/drag_drop_controller_unittest.cc b/ash/drag_drop/drag_drop_controller_unittest.cc index 4051cc6..9ef0b9b 100644 --- a/ash/drag_drop/drag_drop_controller_unittest.cc +++ b/ash/drag_drop/drag_drop_controller_unittest.cc @@ -148,11 +148,9 @@ class CompletableLinearAnimation : public gfx::LinearAnimation { int duration_; }; -class TestDragDropController : public internal::DragDropController { +class TestDragDropController : public DragDropController { public: - TestDragDropController() : internal::DragDropController() { - Reset(); - } + TestDragDropController() : DragDropController() { Reset(); } void Reset() { drag_start_received_ = false; @@ -333,7 +331,7 @@ class DragDropControllerTest : public AshTestBase { NULL; } - internal::DragDropTracker* drag_drop_tracker() { + DragDropTracker* drag_drop_tracker() { return drag_drop_controller_->drag_drop_tracker_.get(); } diff --git a/ash/drag_drop/drag_drop_interactive_uitest.cc b/ash/drag_drop/drag_drop_interactive_uitest.cc index f9b3cee..ef32801 100644 --- a/ash/drag_drop/drag_drop_interactive_uitest.cc +++ b/ash/drag_drop/drag_drop_interactive_uitest.cc @@ -20,7 +20,6 @@ #include "ui/views/widget/widget.h" namespace ash { -namespace internal { namespace { class DraggableView : public views::View { @@ -184,5 +183,4 @@ TEST_F(DragDropTest, MAYBE_DragDropAcrossMultiDisplay) { target->Close(); } -} // namespace internal } // namespace ash diff --git a/ash/drag_drop/drag_drop_tracker.cc b/ash/drag_drop/drag_drop_tracker.cc index 55cb7b9..193dc62 100644 --- a/ash/drag_drop/drag_drop_tracker.cc +++ b/ash/drag_drop/drag_drop_tracker.cc @@ -15,8 +15,6 @@ #include "ui/wm/public/activation_delegate.h" namespace ash { -namespace internal { - namespace { // An activation delegate which disables activating the drag and drop window. @@ -101,5 +99,4 @@ ui::LocatedEvent* DragDropTracker::ConvertEvent( changed_button_flags()); } -} // namespace internal } // namespace ash diff --git a/ash/drag_drop/drag_drop_tracker.h b/ash/drag_drop/drag_drop_tracker.h index b4dcf6e..670422b 100644 --- a/ash/drag_drop/drag_drop_tracker.h +++ b/ash/drag_drop/drag_drop_tracker.h @@ -16,7 +16,6 @@ class WindowDelegate; } namespace ash { -namespace internal { // Provides functions for handling drag events inside and outside the root // window where drag is started. This internally sets up a capture window for @@ -53,7 +52,6 @@ class ASH_EXPORT DragDropTracker { DISALLOW_COPY_AND_ASSIGN(DragDropTracker); }; -} // namespace internal } // namespace ash #endif // ASH_DRAG_DROP_DRAG_DROP_TRACKER_H_ diff --git a/ash/drag_drop/drag_drop_tracker_unittest.cc b/ash/drag_drop/drag_drop_tracker_unittest.cc index dbac80e..6b470e8 100644 --- a/ash/drag_drop/drag_drop_tracker_unittest.cc +++ b/ash/drag_drop/drag_drop_tracker_unittest.cc @@ -31,9 +31,8 @@ class DragDropTrackerTest : public test::AshTestBase { } static aura::Window* GetTarget(const gfx::Point& location) { - scoped_ptr<internal::DragDropTracker> tracker( - new internal::DragDropTracker(Shell::GetPrimaryRootWindow(), - NULL)); + scoped_ptr<DragDropTracker> tracker( + new DragDropTracker(Shell::GetPrimaryRootWindow(), NULL)); ui::MouseEvent e(ui::ET_MOUSE_DRAGGED, location, location, @@ -45,9 +44,8 @@ class DragDropTrackerTest : public test::AshTestBase { static ui::LocatedEvent* ConvertEvent(aura::Window* target, const ui::MouseEvent& event) { - scoped_ptr<internal::DragDropTracker> tracker( - new internal::DragDropTracker(Shell::GetPrimaryRootWindow(), - NULL)); + scoped_ptr<DragDropTracker> tracker( + new DragDropTracker(Shell::GetPrimaryRootWindow(), NULL)); ui::LocatedEvent* converted = tracker->ConvertEvent(target, event); return converted; } diff --git a/ash/drag_drop/drag_image_view.cc b/ash/drag_drop/drag_image_view.cc index 5beb81f..746d619 100644 --- a/ash/drag_drop/drag_image_view.cc +++ b/ash/drag_drop/drag_image_view.cc @@ -15,8 +15,6 @@ #include "ui/wm/core/shadow_types.h" namespace ash { -namespace internal { - namespace { using views::Widget; @@ -171,5 +169,4 @@ void DragImageView::OnPaint(gfx::Canvas* canvas) { } } -} // namespace internal } // namespace ash diff --git a/ash/drag_drop/drag_image_view.h b/ash/drag_drop/drag_image_view.h index 0457847..fd5382e 100644 --- a/ash/drag_drop/drag_image_view.h +++ b/ash/drag_drop/drag_image_view.h @@ -13,7 +13,6 @@ class Widget; } namespace ash { -namespace internal { // This class allows to show a (native) view always on top of everything. It // does this by creating a widget and setting the content as the given view. The @@ -72,7 +71,6 @@ class DragImageView : public views::ImageView { DISALLOW_COPY_AND_ASSIGN(DragImageView); }; -} // namespace internal } // namespace ash #endif // ASH_DRAG_DROP_DRAG_IMAGE_VIEW_H_ diff --git a/ash/extended_desktop_unittest.cc b/ash/extended_desktop_unittest.cc index 0bc1ed4..4ad8301 100644 --- a/ash/extended_desktop_unittest.cc +++ b/ash/extended_desktop_unittest.cc @@ -163,7 +163,7 @@ TEST_F(ExtendedDesktopTest, Basic) { ASSERT_EQ(2U, root_windows.size()); for (aura::Window::Windows::const_iterator iter = root_windows.begin(); iter != root_windows.end(); ++iter) { - EXPECT_TRUE(internal::GetRootWindowController(*iter) != NULL); + EXPECT_TRUE(GetRootWindowController(*iter) != NULL); } // Make sure root windows share the same controllers. EXPECT_EQ(aura::client::GetFocusClient(root_windows[0]), @@ -671,12 +671,12 @@ TEST_F(ExtendedDesktopTest, StayInSameRootWindow) { // The widget stays in the same root if kStayInSameRootWindowKey is set to // true. - w1->GetNativeView()->SetProperty(internal::kStayInSameRootWindowKey, true); + w1->GetNativeView()->SetProperty(kStayInSameRootWindowKey, true); w1->SetBounds(gfx::Rect(10, 10, 50, 50)); EXPECT_EQ(root_windows[1], w1->GetNativeView()->GetRootWindow()); // The widget should now move to the 1st root window without the property. - w1->GetNativeView()->ClearProperty(internal::kStayInSameRootWindowKey); + w1->GetNativeView()->ClearProperty(kStayInSameRootWindowKey); w1->SetBounds(gfx::Rect(10, 10, 50, 50)); EXPECT_EQ(root_windows[0], w1->GetNativeView()->GetRootWindow()); @@ -684,7 +684,7 @@ TEST_F(ExtendedDesktopTest, StayInSameRootWindow) { // not move to another root window regardles of the bounds specified. aura::Window* settings_bubble_container = Shell::GetPrimaryRootWindowController()->GetContainer( - internal::kShellWindowId_SettingBubbleContainer); + kShellWindowId_SettingBubbleContainer); aura::Window* window = aura::test::CreateTestWindowWithId( 100, settings_bubble_container); window->SetBoundsInScreen(gfx::Rect(150, 10, 50, 50), @@ -693,7 +693,7 @@ TEST_F(ExtendedDesktopTest, StayInSameRootWindow) { aura::Window* status_container = Shell::GetPrimaryRootWindowController()->GetContainer( - internal::kShellWindowId_StatusContainer); + kShellWindowId_StatusContainer); window = aura::test::CreateTestWindowWithId(100, status_container); window->SetBoundsInScreen(gfx::Rect(150, 10, 50, 50), ScreenUtil::GetSecondaryDisplay()); @@ -723,10 +723,9 @@ TEST_F(ExtendedDesktopTest, KeyEventsOnLockScreen) { views::Textfield* textfield = new views::Textfield; lock_widget->client_view()->AddChildView(textfield); - ash::Shell::GetContainer( - Shell::GetPrimaryRootWindow(), - ash::internal::kShellWindowId_LockScreenContainer)-> - AddChild(lock_widget->GetNativeView()); + ash::Shell::GetContainer(Shell::GetPrimaryRootWindow(), + ash::kShellWindowId_LockScreenContainer) + ->AddChild(lock_widget->GetNativeView()); lock_widget->Show(); textfield->RequestFocus(); diff --git a/ash/first_run/desktop_cleaner.cc b/ash/first_run/desktop_cleaner.cc index 8008cda..d388e18 100644 --- a/ash/first_run/desktop_cleaner.cc +++ b/ash/first_run/desktop_cleaner.cc @@ -14,8 +14,6 @@ #include "ui/message_center/notification_blocker.h" namespace ash { -namespace internal { - namespace { const int kContainerIdsToHide[] = { @@ -114,6 +112,5 @@ std::vector<int> DesktopCleaner::GetContainersToHideForTest() { kContainerIdsToHide + arraysize(kContainerIdsToHide)); } -} // namespace internal } // namespace ash diff --git a/ash/first_run/desktop_cleaner.h b/ash/first_run/desktop_cleaner.h index c3077b4..061f112 100644 --- a/ash/first_run/desktop_cleaner.h +++ b/ash/first_run/desktop_cleaner.h @@ -13,16 +13,13 @@ #include "base/memory/scoped_ptr.h" namespace ash { +class ContainerHider; +class NotificationBlocker; namespace test { class FirstRunHelperTest; } -namespace internal { - -class ContainerHider; -class NotificationBlocker; - // Class used to "clean" ash desktop, i.e. hide all windows and notifications. class ASH_EXPORT DesktopCleaner { public: @@ -40,7 +37,6 @@ class ASH_EXPORT DesktopCleaner { DISALLOW_COPY_AND_ASSIGN(DesktopCleaner); }; -} // namespace internal } // namespace ash #endif // ASH_FIRST_RUN_DESKTOP_CLEANER_ diff --git a/ash/first_run/first_run_helper_impl.cc b/ash/first_run/first_run_helper_impl.cc index f8a3ca6..919cca9 100644 --- a/ash/first_run/first_run_helper_impl.cc +++ b/ash/first_run/first_run_helper_impl.cc @@ -25,9 +25,8 @@ views::Widget* CreateFirstRunWindow() { params.bounds = Shell::GetScreen()->GetPrimaryDisplay().bounds(); params.show_state = ui::SHOW_STATE_FULLSCREEN; params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; - params.parent = - Shell::GetContainer(Shell::GetPrimaryRootWindow(), - ash::internal::kShellWindowId_OverlayContainer); + params.parent = Shell::GetContainer(Shell::GetPrimaryRootWindow(), + ash::kShellWindowId_OverlayContainer); views::Widget* window = new views::Widget; window->Init(params); return window; diff --git a/ash/first_run/first_run_helper_impl.h b/ash/first_run/first_run_helper_impl.h index e788f6a..3993767 100644 --- a/ash/first_run/first_run_helper_impl.h +++ b/ash/first_run/first_run_helper_impl.h @@ -15,7 +15,7 @@ namespace ash { class Shell; class FirstRunHelperImpl : public FirstRunHelper, - public internal::OverlayEventFilter::Delegate { + public OverlayEventFilter::Delegate { public: FirstRunHelperImpl(); virtual ~FirstRunHelperImpl(); @@ -33,14 +33,14 @@ class FirstRunHelperImpl : public FirstRunHelper, virtual gfx::Rect GetTrayBubbleBounds() OVERRIDE; virtual gfx::Rect GetHelpButtonBounds() OVERRIDE; - // Overriden from internal::OverlayEventFilter::Delegate. + // Overriden from OverlayEventFilter::Delegate. virtual void Cancel() OVERRIDE; virtual bool IsCancelingKeyEvent(ui::KeyEvent* event) OVERRIDE; virtual aura::Window* GetWindow() OVERRIDE; private: views::Widget* widget_; - internal::DesktopCleaner cleaner_; + DesktopCleaner cleaner_; DISALLOW_COPY_AND_ASSIGN(FirstRunHelperImpl); }; diff --git a/ash/first_run/first_run_helper_unittest.cc b/ash/first_run/first_run_helper_unittest.cc index 4bac723..6952dd6 100644 --- a/ash/first_run/first_run_helper_unittest.cc +++ b/ash/first_run/first_run_helper_unittest.cc @@ -80,7 +80,7 @@ class FirstRunHelperTest : public AshTestBase, void CheckContainersAreVisible() const { aura::Window* root_window = Shell::GetInstance()->GetPrimaryRootWindow(); std::vector<int> containers_to_check = - internal::DesktopCleaner::GetContainersToHideForTest(); + DesktopCleaner::GetContainersToHideForTest(); for (size_t i = 0; i < containers_to_check.size(); ++i) { aura::Window* container = Shell::GetContainer(root_window, containers_to_check[i]); @@ -91,7 +91,7 @@ class FirstRunHelperTest : public AshTestBase, void CheckContainersAreHidden() const { aura::Window* root_window = Shell::GetInstance()->GetPrimaryRootWindow(); std::vector<int> containers_to_check = - internal::DesktopCleaner::GetContainersToHideForTest(); + DesktopCleaner::GetContainersToHideForTest(); for (size_t i = 0; i < containers_to_check.size(); ++i) { aura::Window* container = Shell::GetContainer(root_window, containers_to_check[i]); diff --git a/ash/focus_cycler.cc b/ash/focus_cycler.cc index 0fa83aa..b0d6d4d 100644 --- a/ash/focus_cycler.cc +++ b/ash/focus_cycler.cc @@ -24,8 +24,6 @@ bool HasFocusableWindow() { } // namespace -namespace internal { - FocusCycler::FocusCycler() : widget_activating_(NULL) { } @@ -109,6 +107,4 @@ bool FocusCycler::FocusWidget(views::Widget* widget) { return widget->IsActive(); } -} // namespace internal - } // namespace ash diff --git a/ash/focus_cycler.h b/ash/focus_cycler.h index d0071d1..769c2ea 100644 --- a/ash/focus_cycler.h +++ b/ash/focus_cycler.h @@ -17,8 +17,6 @@ class Widget; namespace ash { -namespace internal { - // This class handles moving focus between a set of widgets and the main browser // window. class ASH_EXPORT FocusCycler { @@ -54,8 +52,6 @@ class ASH_EXPORT FocusCycler { DISALLOW_COPY_AND_ASSIGN(FocusCycler); }; -} // namespace internal - } // namespace ash #endif // FOCUS_CYCLER_H_ diff --git a/ash/focus_cycler_unittest.cc b/ash/focus_cycler_unittest.cc index 5b25d96..33c89c2 100644 --- a/ash/focus_cycler_unittest.cc +++ b/ash/focus_cycler_unittest.cc @@ -27,14 +27,11 @@ namespace ash { namespace test { using aura::Window; -using internal::FocusCycler; namespace { -internal::StatusAreaWidgetDelegate* GetStatusAreaWidgetDelegate( - views::Widget* widget) { - return static_cast<internal::StatusAreaWidgetDelegate*>( - widget->GetContentsView()); +StatusAreaWidgetDelegate* GetStatusAreaWidgetDelegate(views::Widget* widget) { + return static_cast<StatusAreaWidgetDelegate*>(widget->GetContentsView()); } class PanedWidgetDelegate : public views::WidgetDelegate { @@ -96,10 +93,11 @@ class FocusCyclerTest : public AshTestBase { bool CreateTray() { if (tray_) return false; - aura::Window* parent = Shell::GetPrimaryRootWindowController()-> - GetContainer(ash::internal::kShellWindowId_StatusContainer); + aura::Window* parent = + Shell::GetPrimaryRootWindowController()->GetContainer( + ash::kShellWindowId_StatusContainer); - internal::StatusAreaWidget* widget = new internal::StatusAreaWidget(parent); + StatusAreaWidget* widget = new StatusAreaWidget(parent); widget->CreateTrayViews(); widget->Show(); tray_.reset(widget->system_tray()); diff --git a/ash/frame/caption_buttons/alternate_frame_size_button.cc b/ash/frame/caption_buttons/alternate_frame_size_button.cc index 930fa37..54799cb 100644 --- a/ash/frame/caption_buttons/alternate_frame_size_button.cc +++ b/ash/frame/caption_buttons/alternate_frame_size_button.cc @@ -223,8 +223,7 @@ void AlternateFrameSizeButton::UpdateSnapType(const ui::LocatedEvent& event) { if (snap_type_ == SNAP_LEFT || snap_type_ == SNAP_RIGHT) { aura::Window* window = frame_->GetNativeWindow(); if (!phantom_window_controller_.get()) { - phantom_window_controller_.reset( - new internal::PhantomWindowController(window)); + phantom_window_controller_.reset(new PhantomWindowController(window)); } gfx::Rect phantom_bounds_in_parent = (snap_type_ == SNAP_LEFT) ? wm::GetDefaultLeftSnappedWindowBoundsInParent(window) : diff --git a/ash/frame/caption_buttons/alternate_frame_size_button.h b/ash/frame/caption_buttons/alternate_frame_size_button.h index 89c9549..e99d32f 100644 --- a/ash/frame/caption_buttons/alternate_frame_size_button.h +++ b/ash/frame/caption_buttons/alternate_frame_size_button.h @@ -17,10 +17,7 @@ class Widget; namespace ash { class AlternateFrameSizeButtonDelegate; - -namespace internal { class PhantomWindowController; -} // The maximize/restore button when using the alternate button style. // When the mouse is pressed over the size button or the size button is touched: @@ -111,7 +108,7 @@ class ASH_EXPORT AlternateFrameSizeButton : public FrameCaptionButton { // Displays a preview of how the window's bounds will change as a result of // snapping the window left or right. The preview is only visible if the snap // left or snap right button is pressed. - scoped_ptr<internal::PhantomWindowController> phantom_window_controller_; + scoped_ptr<PhantomWindowController> phantom_window_controller_; DISALLOW_COPY_AND_ASSIGN(AlternateFrameSizeButton); }; diff --git a/ash/frame/caption_buttons/frame_maximize_button.cc b/ash/frame/caption_buttons/frame_maximize_button.cc index 9341251..dc28c7a 100644 --- a/ash/frame/caption_buttons/frame_maximize_button.cc +++ b/ash/frame/caption_buttons/frame_maximize_button.cc @@ -414,7 +414,7 @@ void FrameMaximizeButton::UpdateSnap(const gfx::Point& location) { if (!phantom_window_) { phantom_window_.reset( - new internal::PhantomWindowController(frame_->GetNativeWindow())); + new PhantomWindowController(frame_->GetNativeWindow())); } if (maximizer_) { phantom_window_->set_phantom_below_window(maximizer_->GetBubbleWindow()); diff --git a/ash/frame/caption_buttons/frame_maximize_button.h b/ash/frame/caption_buttons/frame_maximize_button.h index 0cfe224..29d89e8 100644 --- a/ash/frame/caption_buttons/frame_maximize_button.h +++ b/ash/frame/caption_buttons/frame_maximize_button.h @@ -21,12 +21,8 @@ class Widget; namespace ash { class FrameMaximizeButtonObserver; - -namespace internal { -class PhantomWindowController; -} - class MaximizeBubbleController; +class PhantomWindowController; // Button used for the maximize control on the frame. Handles snapping logic. class ASH_EXPORT FrameMaximizeButton : public FrameCaptionButton, @@ -144,7 +140,7 @@ class ASH_EXPORT FrameMaximizeButton : public FrameCaptionButton, bool observing_frame_; // Renders the snap position. - scoped_ptr<internal::PhantomWindowController> phantom_window_; + scoped_ptr<PhantomWindowController> phantom_window_; // Is snapping enabled? Set on press so that in drag we know whether we // should show the snap locations. diff --git a/ash/frame/caption_buttons/maximize_bubble_controller_bubble.cc b/ash/frame/caption_buttons/maximize_bubble_controller_bubble.cc index 7205354..e8188cd 100644 --- a/ash/frame/caption_buttons/maximize_bubble_controller_bubble.cc +++ b/ash/frame/caption_buttons/maximize_bubble_controller_bubble.cc @@ -348,9 +348,8 @@ MaximizeBubbleControllerBubble::MaximizeBubbleControllerBubble( // The window needs to be owned by the root so that the phantom window does // not cover it upon animation. - aura::Window* parent = Shell::GetContainer( - Shell::GetTargetRootWindow(), - internal::kShellWindowId_ShelfContainer); + aura::Window* parent = Shell::GetContainer(Shell::GetTargetRootWindow(), + kShellWindowId_ShelfContainer); set_parent_window(parent); set_notify_enter_exit_on_child(true); diff --git a/ash/keyboard_overlay/keyboard_overlay_view.h b/ash/keyboard_overlay/keyboard_overlay_view.h index 0fc339a..2fb0a59 100644 --- a/ash/keyboard_overlay/keyboard_overlay_view.h +++ b/ash/keyboard_overlay/keyboard_overlay_view.h @@ -28,7 +28,7 @@ namespace ash { // A customized dialog view for the keyboard overlay. class ASH_WITH_CONTENT_EXPORT KeyboardOverlayView : public views::WebDialogView, - public ash::internal::OverlayEventFilter::Delegate { + public ash::OverlayEventFilter::Delegate { public: struct KeyEventData { ui::KeyboardCode key_code; @@ -40,7 +40,7 @@ class ASH_WITH_CONTENT_EXPORT KeyboardOverlayView WebContentsHandler* handler); virtual ~KeyboardOverlayView(); - // Overridden from ash::internal::OverlayEventFilter::Delegate: + // Overridden from ash::OverlayEventFilter::Delegate: virtual void Cancel() OVERRIDE; virtual bool IsCancelingKeyEvent(ui::KeyEvent* event) OVERRIDE; virtual aura::Window* GetWindow() OVERRIDE; diff --git a/ash/keyboard_uma_event_filter.cc b/ash/keyboard_uma_event_filter.cc index 6b7ae6b..f3864bf 100644 --- a/ash/keyboard_uma_event_filter.cc +++ b/ash/keyboard_uma_event_filter.cc @@ -17,7 +17,6 @@ const int kKeystrokeThresholdInSeconds = 5; } namespace ash { -namespace internal { KeyboardUMAEventFilter::KeyboardUMAEventFilter() {} @@ -47,5 +46,4 @@ void KeyboardUMAEventFilter::OnKeyEvent(ui::KeyEvent* event) { last_keystroke_time_ = event->time_stamp(); } -} // namespace internal } // namespace ash diff --git a/ash/keyboard_uma_event_filter.h b/ash/keyboard_uma_event_filter.h index b25f2f9..85ea4c6 100644 --- a/ash/keyboard_uma_event_filter.h +++ b/ash/keyboard_uma_event_filter.h @@ -10,7 +10,6 @@ #include "ui/events/event_handler.h" namespace ash { -namespace internal { // EventFilter for tracking keyboard-related metrics, which intercepts events // before they are processed by the usual path and logs metrics about the @@ -30,7 +29,6 @@ class KeyboardUMAEventFilter : public ui::EventHandler { DISALLOW_COPY_AND_ASSIGN(KeyboardUMAEventFilter); }; -} // namespace internal } // namespace ash #endif // ASH_KEYBOARD_UMA_EVENT_FILTER_H_ diff --git a/ash/magnifier/magnification_controller.cc b/ash/magnifier/magnification_controller.cc index dd3b0d8..8e13e6b 100644 --- a/ash/magnifier/magnification_controller.cc +++ b/ash/magnifier/magnification_controller.cc @@ -271,7 +271,7 @@ bool MagnificationControllerImpl::RedrawDIP(const gfx::PointF& position_in_dip, gfx::Display display = Shell::GetScreen()->GetDisplayNearestWindow(root_window_); scoped_ptr<aura::RootWindowTransformer> transformer( - internal::CreateRootWindowTransformerForDisplay(root_window_, display)); + CreateRootWindowTransformerForDisplay(root_window_, display)); root_window_->GetHost()->SetRootWindowTransformer(transformer.Pass()); if (animate) diff --git a/ash/magnifier/magnification_controller_unittest.cc b/ash/magnifier/magnification_controller_unittest.cc index 5ad2d12..72edf41 100644 --- a/ash/magnifier/magnification_controller_unittest.cc +++ b/ash/magnifier/magnification_controller_unittest.cc @@ -16,7 +16,6 @@ #include "ui/gfx/screen.h" namespace ash { -namespace internal { namespace { const int kRootHeight = 600; @@ -439,5 +438,4 @@ TEST_F(MagnificationControllerTest, PanWindowToLeft) { EXPECT_EQ("100,300", GetHostMouseLocation()); } -} // namespace internal } // namespace ash diff --git a/ash/metrics/user_metrics_recorder.cc b/ash/metrics/user_metrics_recorder.cc index ef0e980..a71271b 100644 --- a/ash/metrics/user_metrics_recorder.cc +++ b/ash/metrics/user_metrics_recorder.cc @@ -387,16 +387,16 @@ void UserMetricsRecorder::RecordUserMetricsAction(UserMetricsAction action) { } void UserMetricsRecorder::RecordPeriodicMetrics() { - internal::ShelfLayoutManager* manager = - internal::ShelfLayoutManager::ForShelf(Shell::GetPrimaryRootWindow()); + ShelfLayoutManager* manager = + ShelfLayoutManager::ForShelf(Shell::GetPrimaryRootWindow()); if (manager) { UMA_HISTOGRAM_ENUMERATION("Ash.ShelfAlignmentOverTime", - manager->SelectValueForShelfAlignment( - internal::SHELF_ALIGNMENT_UMA_ENUM_VALUE_BOTTOM, - internal::SHELF_ALIGNMENT_UMA_ENUM_VALUE_LEFT, - internal::SHELF_ALIGNMENT_UMA_ENUM_VALUE_RIGHT, - -1), - internal::SHELF_ALIGNMENT_UMA_ENUM_VALUE_COUNT); + manager->SelectValueForShelfAlignment( + SHELF_ALIGNMENT_UMA_ENUM_VALUE_BOTTOM, + SHELF_ALIGNMENT_UMA_ENUM_VALUE_LEFT, + SHELF_ALIGNMENT_UMA_ENUM_VALUE_RIGHT, + -1), + SHELF_ALIGNMENT_UMA_ENUM_VALUE_COUNT); } enum ActiveWindowStateType { diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc index caa1228..0b4ab9b 100644 --- a/ash/root_window_controller.cc +++ b/ash/root_window_controller.cc @@ -95,7 +95,7 @@ aura::Window* CreateContainer(int window_id, container->SetName(name); container->Init(aura::WINDOW_LAYER_NOT_DRAWN); parent->AddChild(container); - if (window_id != internal::kShellWindowId_UnparentedControlContainer) + if (window_id != kShellWindowId_UnparentedControlContainer) container->Show(); return container; } @@ -123,7 +123,7 @@ void ReparentWindow(aura::Window* window, aura::Window* new_parent) { bool has_restore_bounds = state->HasRestoreBounds(); bool update_bounds = (state->IsNormalOrSnapped() || state->IsMinimized()) && - new_parent->id() != internal::kShellWindowId_DockedContainer; + new_parent->id() != kShellWindowId_DockedContainer; gfx::Rect local_bounds; if (update_bounds) { local_bounds = state->window()->bounds(); @@ -149,15 +149,14 @@ void ReparentWindow(aura::Window* window, aura::Window* new_parent) { void ReparentAllWindows(aura::Window* src, aura::Window* dst) { // Set of windows to move. const int kContainerIdsToMove[] = { - internal::kShellWindowId_DefaultContainer, - internal::kShellWindowId_DockedContainer, - internal::kShellWindowId_PanelContainer, - internal::kShellWindowId_AlwaysOnTopContainer, - internal::kShellWindowId_SystemModalContainer, - internal::kShellWindowId_LockSystemModalContainer, - internal::kShellWindowId_InputMethodContainer, - internal::kShellWindowId_UnparentedControlContainer, - }; + kShellWindowId_DefaultContainer, + kShellWindowId_DockedContainer, + kShellWindowId_PanelContainer, + kShellWindowId_AlwaysOnTopContainer, + kShellWindowId_SystemModalContainer, + kShellWindowId_LockSystemModalContainer, + kShellWindowId_InputMethodContainer, + kShellWindowId_UnparentedControlContainer, }; for (size_t i = 0; i < arraysize(kContainerIdsToMove); i++) { int id = kContainerIdsToMove[i]; aura::Window* src_container = Shell::GetContainer(src, id); @@ -168,8 +167,7 @@ void ReparentAllWindows(aura::Window* src, aura::Window* dst) { aura::Window::Windows::const_iterator iter = src_container->children().begin(); while (iter != src_container->children().end() && - internal::SystemModalContainerLayoutManager::IsModalBackground( - *iter)) { + SystemModalContainerLayoutManager::IsModalBackground(*iter)) { ++iter; } // If the entire window list is modal background windows then stop. @@ -183,13 +181,13 @@ void ReparentAllWindows(aura::Window* src, aura::Window* dst) { // Mark the container window so that a widget added to this container will // use the virtual screeen coordinates instead of parent. void SetUsesScreenCoordinates(aura::Window* container) { - container->SetProperty(internal::kUsesScreenCoordinatesKey, true); + container->SetProperty(kUsesScreenCoordinatesKey, true); } // Mark the container window so that a widget added to this container will // say in the same root window regardless of the bounds specified. void DescendantShouldStayInSameRootWindow(aura::Window* container) { - container->SetProperty(internal::kStayInSameRootWindowKey, true); + container->SetProperty(kStayInSameRootWindowKey, true); } void SetUsesEasyResizeTargeter(aura::Window* container) { @@ -260,8 +258,6 @@ class EmptyWindowDelegate : public aura::WindowDelegate { } // namespace -namespace internal { - void RootWindowController::CreateForPrimaryDisplay(aura::WindowTreeHost* host) { RootWindowController* controller = new RootWindowController(host); controller->Init(RootWindowController::PRIMARY, @@ -294,7 +290,7 @@ RootWindowController* RootWindowController::ForWindow( // static RootWindowController* RootWindowController::ForTargetRootWindow() { - return internal::GetRootWindowController(Shell::GetTargetRootWindow()); + return GetRootWindowController(Shell::GetTargetRootWindow()); } // static @@ -350,9 +346,9 @@ void RootWindowController::Shutdown() { workspace_controller_.reset(); // Forget with the display ID so that display lookup // ends up with invalid display. - internal::GetRootWindowSettings(root_window())->display_id = + GetRootWindowSettings(root_window())->display_id = gfx::Display::kInvalidDisplayID; - internal::GetRootWindowSettings(root_window())->shutdown = true; + GetRootWindowSettings(root_window())->shutdown = true; system_background_.reset(); aura::client::SetScreenPositionClient(root_window(), NULL); @@ -728,17 +724,14 @@ void RootWindowController::InitLayoutManagers() { aura::Window* always_on_top_container = GetContainer(kShellWindowId_AlwaysOnTopContainer); always_on_top_container->SetLayoutManager( - new internal::WorkspaceLayoutManager( - always_on_top_container)); - always_on_top_controller_.reset(new internal::AlwaysOnTopController); + new WorkspaceLayoutManager(always_on_top_container)); + always_on_top_controller_.reset(new AlwaysOnTopController); always_on_top_controller_->SetAlwaysOnTopContainer(always_on_top_container); DCHECK(!shelf_.get()); - aura::Window* shelf_container = - GetContainer(internal::kShellWindowId_ShelfContainer); + aura::Window* shelf_container = GetContainer(kShellWindowId_ShelfContainer); // TODO(harrym): Remove when status area is view. - aura::Window* status_container = - GetContainer(internal::kShellWindowId_StatusContainer); + aura::Window* status_container = GetContainer(kShellWindowId_StatusContainer); shelf_.reset(new ShelfWidget( shelf_container, status_container, workspace_controller())); @@ -750,24 +743,20 @@ void RootWindowController::InitLayoutManagers() { mouse_event_target_->Init(aura::WINDOW_LAYER_NOT_DRAWN); aura::Window* lock_background_container = - GetContainer(internal::kShellWindowId_LockScreenBackgroundContainer); + GetContainer(kShellWindowId_LockScreenBackgroundContainer); lock_background_container->AddChild(mouse_event_target_.get()); mouse_event_target_->Show(); } // Create Docked windows layout manager - aura::Window* docked_container = GetContainer( - internal::kShellWindowId_DockedContainer); + aura::Window* docked_container = GetContainer(kShellWindowId_DockedContainer); docked_layout_manager_ = - new internal::DockedWindowLayoutManager(docked_container, - workspace_controller()); + new DockedWindowLayoutManager(docked_container, workspace_controller()); docked_container->SetLayoutManager(docked_layout_manager_); // Create Panel layout manager - aura::Window* panel_container = GetContainer( - internal::kShellWindowId_PanelContainer); - panel_layout_manager_ = - new internal::PanelLayoutManager(panel_container); + aura::Window* panel_container = GetContainer(kShellWindowId_PanelContainer); + panel_layout_manager_ = new PanelLayoutManager(panel_container); panel_container->SetLayoutManager(panel_layout_manager_); panel_container_handler_.reset(new PanelWindowEventHandler); panel_container->AddPreTargetHandler(panel_container_handler_.get()); @@ -918,8 +907,7 @@ void RootWindowController::CreateContainersInRootWindow( kShellWindowId_LockScreenContainer, "LockScreenContainer", lock_screen_containers); - lock_container->SetLayoutManager( - new internal::WorkspaceLayoutManager(lock_container)); + lock_container->SetLayoutManager(new WorkspaceLayoutManager(lock_container)); SetUsesScreenCoordinates(lock_container); // TODO(beng): stopsevents @@ -1014,5 +1002,4 @@ RootWindowController* GetRootWindowController( return root_window ? GetRootWindowSettings(root_window)->controller : NULL; } -} // namespace internal } // namespace ash diff --git a/ash/root_window_controller.h b/ash/root_window_controller.h index abb8b1f..e9f6b8e 100644 --- a/ash/root_window_controller.h +++ b/ash/root_window_controller.h @@ -47,12 +47,6 @@ class ScopedCaptureClient; } namespace ash { -class ShelfWidget; -class StackingController; -class SystemTray; - -namespace internal { - class AlwaysOnTopController; class AnimatingDesktopController; class DesktopBackgroundWidgetController; @@ -61,9 +55,12 @@ class PanelLayoutManager; class RootWindowLayoutManager; class ScreenDimmer; class ShelfLayoutManager; +class ShelfWidget; +class StackingController; class StatusAreaWidget; class SystemBackgroundController; class SystemModalContainerLayoutManager; +class SystemTray; class TouchHudDebug; class TouchHudProjection; class WorkspaceController; @@ -102,7 +99,7 @@ class ASH_EXPORT RootWindowController : public ShellObserver { static RootWindowController* ForWindow(const aura::Window* window); // Returns the RootWindowController of the target root window. - static internal::RootWindowController* ForTargetRootWindow(); + static RootWindowController* ForTargetRootWindow(); // Returns container which contains a given |window|. static aura::Window* GetContainerForWindow(aura::Window* window); @@ -320,7 +317,6 @@ class ASH_EXPORT RootWindowController : public ShellObserver { ASH_EXPORT RootWindowController* GetRootWindowController( const aura::Window* root_window); -} // namespace internal } // ash #endif // ASH_ROOT_WINDOW_CONTROLLER_H_ diff --git a/ash/root_window_controller_unittest.cc b/ash/root_window_controller_unittest.cc index 31b68f9..659423a 100644 --- a/ash/root_window_controller_unittest.cc +++ b/ash/root_window_controller_unittest.cc @@ -118,9 +118,8 @@ class RootWindowControllerTest : public test::AshTestBase { } aura::Window* GetModalContainer(aura::Window* root_window) { - return Shell::GetContainer( - root_window, - ash::internal::kShellWindowId_SystemModalContainer); + return Shell::GetContainer(root_window, + ash::kShellWindowId_SystemModalContainer); } }; @@ -130,9 +129,8 @@ TEST_F(RootWindowControllerTest, MoveWindows_Basic) { // Windows origin should be doubled when moved to the 1st display. UpdateDisplay("600x600,300x300"); aura::Window::Windows root_windows = Shell::GetAllRootWindows(); - internal::RootWindowController* controller = - Shell::GetPrimaryRootWindowController(); - internal::ShelfLayoutManager* shelf_layout_manager = + RootWindowController* controller = Shell::GetPrimaryRootWindowController(); + ShelfLayoutManager* shelf_layout_manager = controller->GetShelfLayoutManager(); shelf_layout_manager->SetAutoHideBehavior( ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS); @@ -173,13 +171,13 @@ TEST_F(RootWindowControllerTest, MoveWindows_Basic) { unparented_control->Init(params); EXPECT_EQ(root_windows[1], unparented_control->GetNativeView()->GetRootWindow()); - EXPECT_EQ(internal::kShellWindowId_UnparentedControlContainer, + EXPECT_EQ(kShellWindowId_UnparentedControlContainer, unparented_control->GetNativeView()->parent()->id()); aura::Window* panel = CreateTestWindowInShellWithDelegateAndType( NULL, ui::wm::WINDOW_TYPE_PANEL, 0, gfx::Rect(700, 100, 100, 100)); EXPECT_EQ(root_windows[1], panel->GetRootWindow()); - EXPECT_EQ(internal::kShellWindowId_PanelContainer, panel->parent()->id()); + EXPECT_EQ(kShellWindowId_PanelContainer, panel->parent()->id()); // Make sure a window that will delete itself when losing focus // will not crash. @@ -248,12 +246,12 @@ TEST_F(RootWindowControllerTest, MoveWindows_Basic) { // Test if the unparented widget has moved. EXPECT_EQ(root_windows[0], unparented_control->GetNativeView()->GetRootWindow()); - EXPECT_EQ(internal::kShellWindowId_UnparentedControlContainer, + EXPECT_EQ(kShellWindowId_UnparentedControlContainer, unparented_control->GetNativeView()->parent()->id()); // Test if the panel has moved. EXPECT_EQ(root_windows[0], panel->GetRootWindow()); - EXPECT_EQ(internal::kShellWindowId_PanelContainer, panel->parent()->id()); + EXPECT_EQ(kShellWindowId_PanelContainer, panel->parent()->id()); } TEST_F(RootWindowControllerTest, MoveWindows_Modal) { @@ -291,39 +289,42 @@ TEST_F(RootWindowControllerTest, MoveWindows_Modal) { TEST_F(RootWindowControllerTest, ModalContainer) { UpdateDisplay("600x600"); Shell* shell = Shell::GetInstance(); - internal::RootWindowController* controller = - shell->GetPrimaryRootWindowController(); + RootWindowController* controller = shell->GetPrimaryRootWindowController(); EXPECT_EQ(user::LOGGED_IN_USER, shell->system_tray_delegate()->GetUserLoginStatus()); EXPECT_EQ(Shell::GetContainer(controller->root_window(), - internal::kShellWindowId_SystemModalContainer)->layout_manager(), - controller->GetSystemModalLayoutManager(NULL)); + kShellWindowId_SystemModalContainer) + ->layout_manager(), + controller->GetSystemModalLayoutManager(NULL)); views::Widget* session_modal_widget = CreateModalWidget(gfx::Rect(300, 10, 100, 100)); EXPECT_EQ(Shell::GetContainer(controller->root_window(), - internal::kShellWindowId_SystemModalContainer)->layout_manager(), - controller->GetSystemModalLayoutManager( - session_modal_widget->GetNativeView())); + kShellWindowId_SystemModalContainer) + ->layout_manager(), + controller->GetSystemModalLayoutManager( + session_modal_widget->GetNativeView())); shell->session_state_delegate()->LockScreen(); EXPECT_EQ(user::LOGGED_IN_LOCKED, shell->system_tray_delegate()->GetUserLoginStatus()); EXPECT_EQ(Shell::GetContainer(controller->root_window(), - internal::kShellWindowId_LockSystemModalContainer)->layout_manager(), - controller->GetSystemModalLayoutManager(NULL)); + kShellWindowId_LockSystemModalContainer) + ->layout_manager(), + controller->GetSystemModalLayoutManager(NULL)); - aura::Window* lock_container = - Shell::GetContainer(controller->root_window(), - internal::kShellWindowId_LockScreenContainer); + aura::Window* lock_container = Shell::GetContainer( + controller->root_window(), kShellWindowId_LockScreenContainer); views::Widget* lock_modal_widget = CreateModalWidgetWithParent(gfx::Rect(300, 10, 100, 100), lock_container); EXPECT_EQ(Shell::GetContainer(controller->root_window(), - internal::kShellWindowId_LockSystemModalContainer)->layout_manager(), - controller->GetSystemModalLayoutManager( - lock_modal_widget->GetNativeView())); + kShellWindowId_LockSystemModalContainer) + ->layout_manager(), + controller->GetSystemModalLayoutManager( + lock_modal_widget->GetNativeView())); EXPECT_EQ(Shell::GetContainer(controller->root_window(), - internal::kShellWindowId_SystemModalContainer)->layout_manager(), + kShellWindowId_SystemModalContainer) + ->layout_manager(), controller->GetSystemModalLayoutManager( session_modal_widget->GetNativeView())); @@ -341,21 +342,21 @@ TEST_F(RootWindowControllerTest, ModalContainerNotLoggedInLoggedIn) { EXPECT_EQ(0, shell->session_state_delegate()->NumberOfLoggedInUsers()); EXPECT_FALSE(shell->session_state_delegate()->IsActiveUserSessionStarted()); - internal::RootWindowController* controller = - shell->GetPrimaryRootWindowController(); + RootWindowController* controller = shell->GetPrimaryRootWindowController(); EXPECT_EQ(Shell::GetContainer(controller->root_window(), - internal::kShellWindowId_LockSystemModalContainer)->layout_manager(), - controller->GetSystemModalLayoutManager(NULL)); + kShellWindowId_LockSystemModalContainer) + ->layout_manager(), + controller->GetSystemModalLayoutManager(NULL)); - aura::Window* lock_container = - Shell::GetContainer(controller->root_window(), - internal::kShellWindowId_LockScreenContainer); + aura::Window* lock_container = Shell::GetContainer( + controller->root_window(), kShellWindowId_LockScreenContainer); views::Widget* login_modal_widget = CreateModalWidgetWithParent(gfx::Rect(300, 10, 100, 100), lock_container); EXPECT_EQ(Shell::GetContainer(controller->root_window(), - internal::kShellWindowId_LockSystemModalContainer)->layout_manager(), - controller->GetSystemModalLayoutManager( - login_modal_widget->GetNativeView())); + kShellWindowId_LockSystemModalContainer) + ->layout_manager(), + controller->GetSystemModalLayoutManager( + login_modal_widget->GetNativeView())); login_modal_widget->Close(); // Configure user session environment. @@ -366,59 +367,64 @@ TEST_F(RootWindowControllerTest, ModalContainerNotLoggedInLoggedIn) { EXPECT_EQ(1, shell->session_state_delegate()->NumberOfLoggedInUsers()); EXPECT_TRUE(shell->session_state_delegate()->IsActiveUserSessionStarted()); EXPECT_EQ(Shell::GetContainer(controller->root_window(), - internal::kShellWindowId_SystemModalContainer)->layout_manager(), - controller->GetSystemModalLayoutManager(NULL)); + kShellWindowId_SystemModalContainer) + ->layout_manager(), + controller->GetSystemModalLayoutManager(NULL)); views::Widget* session_modal_widget = CreateModalWidget(gfx::Rect(300, 10, 100, 100)); EXPECT_EQ(Shell::GetContainer(controller->root_window(), - internal::kShellWindowId_SystemModalContainer)->layout_manager(), - controller->GetSystemModalLayoutManager( - session_modal_widget->GetNativeView())); + kShellWindowId_SystemModalContainer) + ->layout_manager(), + controller->GetSystemModalLayoutManager( + session_modal_widget->GetNativeView())); } TEST_F(RootWindowControllerTest, ModalContainerBlockedSession) { UpdateDisplay("600x600"); Shell* shell = Shell::GetInstance(); - internal::RootWindowController* controller = - shell->GetPrimaryRootWindowController(); - aura::Window* lock_container = - Shell::GetContainer(controller->root_window(), - internal::kShellWindowId_LockScreenContainer); + RootWindowController* controller = shell->GetPrimaryRootWindowController(); + aura::Window* lock_container = Shell::GetContainer( + controller->root_window(), kShellWindowId_LockScreenContainer); for (int block_reason = FIRST_BLOCK_REASON; block_reason < NUMBER_OF_BLOCK_REASONS; ++block_reason) { views::Widget* session_modal_widget = CreateModalWidget(gfx::Rect(300, 10, 100, 100)); EXPECT_EQ(Shell::GetContainer(controller->root_window(), - internal::kShellWindowId_SystemModalContainer)->layout_manager(), - controller->GetSystemModalLayoutManager( - session_modal_widget->GetNativeView())); + kShellWindowId_SystemModalContainer) + ->layout_manager(), + controller->GetSystemModalLayoutManager( + session_modal_widget->GetNativeView())); EXPECT_EQ(Shell::GetContainer(controller->root_window(), - internal::kShellWindowId_SystemModalContainer)->layout_manager(), - controller->GetSystemModalLayoutManager(NULL)); + kShellWindowId_SystemModalContainer) + ->layout_manager(), + controller->GetSystemModalLayoutManager(NULL)); session_modal_widget->Close(); BlockUserSession(static_cast<UserSessionBlockReason>(block_reason)); EXPECT_EQ(Shell::GetContainer(controller->root_window(), - internal::kShellWindowId_LockSystemModalContainer)->layout_manager(), - controller->GetSystemModalLayoutManager(NULL)); + kShellWindowId_LockSystemModalContainer) + ->layout_manager(), + controller->GetSystemModalLayoutManager(NULL)); views::Widget* lock_modal_widget = CreateModalWidgetWithParent(gfx::Rect(300, 10, 100, 100), lock_container); EXPECT_EQ(Shell::GetContainer(controller->root_window(), - internal::kShellWindowId_LockSystemModalContainer)->layout_manager(), + kShellWindowId_LockSystemModalContainer) + ->layout_manager(), controller->GetSystemModalLayoutManager( lock_modal_widget->GetNativeView())); session_modal_widget = CreateModalWidget(gfx::Rect(300, 10, 100, 100)); EXPECT_EQ(Shell::GetContainer(controller->root_window(), - internal::kShellWindowId_SystemModalContainer)->layout_manager(), - controller->GetSystemModalLayoutManager( - session_modal_widget->GetNativeView())); + kShellWindowId_SystemModalContainer) + ->layout_manager(), + controller->GetSystemModalLayoutManager( + session_modal_widget->GetNativeView())); session_modal_widget->Close(); lock_modal_widget->Close(); @@ -428,7 +434,7 @@ TEST_F(RootWindowControllerTest, ModalContainerBlockedSession) { TEST_F(RootWindowControllerTest, GetWindowForFullscreenMode) { UpdateDisplay("600x600"); - internal::RootWindowController* controller = + RootWindowController* controller = Shell::GetInstance()->GetPrimaryRootWindowController(); Widget* w1 = CreateTestWidget(gfx::Rect(0, 0, 100, 100)); @@ -500,11 +506,10 @@ TEST_F(RootWindowControllerTest, MultipleDisplaysGetWindowForFullscreenMode) { // some overlapping UI. TEST_F(RootWindowControllerTest, FocusBlockedWindow) { UpdateDisplay("600x600"); - internal::RootWindowController* controller = + RootWindowController* controller = Shell::GetInstance()->GetPrimaryRootWindowController(); - aura::Window* lock_container = - Shell::GetContainer(controller->root_window(), - internal::kShellWindowId_LockScreenContainer); + aura::Window* lock_container = Shell::GetContainer( + controller->root_window(), kShellWindowId_LockScreenContainer); aura::Window* lock_window = Widget::CreateWindowWithParentAndBounds(NULL, lock_container, gfx::Rect(0, 0, 100, 100))->GetNativeView(); lock_window->Show(); @@ -639,12 +644,10 @@ TEST_F(VirtualKeyboardRootWindowControllerTest, root_windows[0] == primary_root_window ? root_windows[1] : root_windows[0]; - ASSERT_TRUE(Shell::GetContainer( - primary_root_window, - internal::kShellWindowId_VirtualKeyboardContainer)); - ASSERT_FALSE(Shell::GetContainer( - secondary_root_window, - internal::kShellWindowId_VirtualKeyboardContainer)); + ASSERT_TRUE(Shell::GetContainer(primary_root_window, + kShellWindowId_VirtualKeyboardContainer)); + ASSERT_FALSE(Shell::GetContainer(secondary_root_window, + kShellWindowId_VirtualKeyboardContainer)); } // Test for http://crbug.com/263599. Virtual keyboard should be able to receive @@ -652,8 +655,8 @@ TEST_F(VirtualKeyboardRootWindowControllerTest, TEST_F(VirtualKeyboardRootWindowControllerTest, ClickVirtualKeyboardInBlockedWindow) { aura::Window* root_window = Shell::GetPrimaryRootWindow(); - aura::Window* keyboard_container = Shell::GetContainer(root_window, - internal::kShellWindowId_VirtualKeyboardContainer); + aura::Window* keyboard_container = + Shell::GetContainer(root_window, kShellWindowId_VirtualKeyboardContainer); ASSERT_TRUE(keyboard_container); keyboard_container->Show(); @@ -689,8 +692,8 @@ TEST_F(VirtualKeyboardRootWindowControllerTest, TEST_F(VirtualKeyboardRootWindowControllerTest, DeleteOldContainerOnVirtualKeyboardInit) { aura::Window* root_window = Shell::GetPrimaryRootWindow(); - aura::Window* keyboard_container = Shell::GetContainer(root_window, - internal::kShellWindowId_VirtualKeyboardContainer); + aura::Window* keyboard_container = + Shell::GetContainer(root_window, kShellWindowId_VirtualKeyboardContainer); ASSERT_TRUE(keyboard_container); // Track the keyboard container window. aura::WindowTracker tracker; @@ -705,8 +708,8 @@ TEST_F(VirtualKeyboardRootWindowControllerTest, // full screen. TEST_F(VirtualKeyboardRootWindowControllerTest, RestoreWorkspaceAfterLogin) { aura::Window* root_window = Shell::GetPrimaryRootWindow(); - aura::Window* keyboard_container = Shell::GetContainer(root_window, - internal::kShellWindowId_VirtualKeyboardContainer); + aura::Window* keyboard_container = + Shell::GetContainer(root_window, kShellWindowId_VirtualKeyboardContainer); keyboard_container->Show(); keyboard::KeyboardController* controller = Shell::GetInstance()->keyboard_controller(); @@ -733,8 +736,8 @@ TEST_F(VirtualKeyboardRootWindowControllerTest, RestoreWorkspaceAfterLogin) { // keyboard. TEST_F(VirtualKeyboardRootWindowControllerTest, ClickWithActiveModalDialog) { aura::Window* root_window = Shell::GetPrimaryRootWindow(); - aura::Window* keyboard_container = Shell::GetContainer(root_window, - internal::kShellWindowId_VirtualKeyboardContainer); + aura::Window* keyboard_container = + Shell::GetContainer(root_window, kShellWindowId_VirtualKeyboardContainer); ASSERT_TRUE(keyboard_container); keyboard_container->Show(); diff --git a/ash/root_window_settings.cc b/ash/root_window_settings.cc index 9f51bd9..555c4c8 100644 --- a/ash/root_window_settings.cc +++ b/ash/root_window_settings.cc @@ -8,10 +8,9 @@ #include "ui/aura/window_property.h" #include "ui/gfx/display.h" -DECLARE_WINDOW_PROPERTY_TYPE(ash::internal::RootWindowSettings*); +DECLARE_WINDOW_PROPERTY_TYPE(ash::RootWindowSettings*); namespace ash { -namespace internal { DEFINE_OWNED_WINDOW_PROPERTY_KEY(RootWindowSettings, kRootWindowSettingsKey, NULL); @@ -36,5 +35,4 @@ const RootWindowSettings* GetRootWindowSettings(const aura::Window* root) { return root->GetProperty(kRootWindowSettingsKey); } -} // namespace internal } // namespace ash diff --git a/ash/root_window_settings.h b/ash/root_window_settings.h index 3f497fc..4982ac5 100644 --- a/ash/root_window_settings.h +++ b/ash/root_window_settings.h @@ -13,7 +13,6 @@ class Window; } namespace ash { -namespace internal { class RootWindowController; @@ -45,7 +44,6 @@ ASH_EXPORT RootWindowSettings* GetRootWindowSettings(aura::Window* root); ASH_EXPORT const RootWindowSettings* GetRootWindowSettings(const aura::Window* root); -} // namespace internal } // namespace ash #endif // ASH_ROOT_WINDOW_SETTINGS_H_ diff --git a/ash/scoped_target_root_window.cc b/ash/scoped_target_root_window.cc index c34f4c3..72adc55 100644 --- a/ash/scoped_target_root_window.cc +++ b/ash/scoped_target_root_window.cc @@ -6,7 +6,6 @@ #include "ash/shell.h" namespace ash { -namespace internal { ScopedTargetRootWindow::ScopedTargetRootWindow( aura::Window* root_window) { @@ -17,5 +16,4 @@ ScopedTargetRootWindow::~ScopedTargetRootWindow() { Shell::GetInstance()->scoped_target_root_window_ = NULL; } -} // namespace internal } // namespace ash diff --git a/ash/scoped_target_root_window.h b/ash/scoped_target_root_window.h index c0ab7ef..0a74957 100644 --- a/ash/scoped_target_root_window.h +++ b/ash/scoped_target_root_window.h @@ -12,7 +12,6 @@ class Window; } namespace ash { -namespace internal { // Constructing a ScopedTargetRootWindow allows temporarily // switching a target root window so that a new window gets created @@ -28,7 +27,6 @@ class ASH_EXPORT ScopedTargetRootWindow { DISALLOW_COPY_AND_ASSIGN(ScopedTargetRootWindow); }; -} // namespace internal } // namespace ash #endif // ASH_SCOPED_TARGET_ROOT_WINDOW_H_ diff --git a/ash/screen_util.cc b/ash/screen_util.cc index 9d7404c..a412d70 100644 --- a/ash/screen_util.cc +++ b/ash/screen_util.cc @@ -20,7 +20,7 @@ namespace ash { namespace { -internal::DisplayManager* GetDisplayManager() { +DisplayManager* GetDisplayManager() { return Shell::GetInstance()->display_manager(); } } @@ -32,7 +32,7 @@ gfx::Display ScreenUtil::FindDisplayContainingPoint(const gfx::Point& point) { // static gfx::Rect ScreenUtil::GetMaximizedWindowBoundsInParent(aura::Window* window) { - if (internal::GetRootWindowController(window->GetRootWindow())->shelf()) + if (GetRootWindowController(window->GetRootWindow())->shelf()) return GetDisplayWorkAreaBoundsInParent(window); else return GetDisplayBoundsInParent(window); @@ -72,7 +72,7 @@ gfx::Rect ScreenUtil::ConvertRectFromScreen(aura::Window* window, // static const gfx::Display& ScreenUtil::GetSecondaryDisplay() { - internal::DisplayManager* display_manager = GetDisplayManager(); + DisplayManager* display_manager = GetDisplayManager(); CHECK_EQ(2U, display_manager->GetNumDisplays()); return display_manager->GetDisplayAt(0).id() == Shell::GetScreen()->GetPrimaryDisplay().id() ? diff --git a/ash/screensaver/screensaver_view.cc b/ash/screensaver/screensaver_view.cc index a974947..a47ddce 100644 --- a/ash/screensaver/screensaver_view.cc +++ b/ash/screensaver/screensaver_view.cc @@ -21,7 +21,7 @@ using content::BrowserThread; namespace { -ash::internal::ScreensaverView* g_instance = NULL; +ash::ScreensaverView* g_instance = NULL; // Do not restart the screensaver again if it has // terminated kMaxTerminations times already. @@ -31,19 +31,11 @@ const int kMaxTerminations = 3; namespace ash { -void ShowScreensaver(const GURL& url) { - internal::ScreensaverView::ShowScreensaver(url); -} - -void CloseScreensaver() { - internal::ScreensaverView::CloseScreensaver(); -} +void ShowScreensaver(const GURL& url) { ScreensaverView::ShowScreensaver(url); } -bool IsScreensaverShown() { - return internal::ScreensaverView::IsScreensaverShown(); -} +void CloseScreensaver() { ScreensaverView::CloseScreensaver(); } -namespace internal { +bool IsScreensaverShown() { return ScreensaverView::IsScreensaverShown(); } // static void ScreensaverView::ShowScreensaver(const GURL& url) { @@ -166,5 +158,4 @@ ScreensaverView* ScreensaverView::GetInstance() { return g_instance; } -} // namespace internal } // namespace ash diff --git a/ash/screensaver/screensaver_view.h b/ash/screensaver/screensaver_view.h index cb565b8..1a01aa9 100644 --- a/ash/screensaver/screensaver_view.h +++ b/ash/screensaver/screensaver_view.h @@ -32,8 +32,6 @@ ASH_WITH_CONTENT_EXPORT bool IsScreensaverShown(); typedef base::Callback<views::WebView*(content::BrowserContext*)> WebViewFactory; -namespace internal { - // Shows a URL as a screensaver. The screensaver window is fullscreen, // always on top of every other window and will reload the URL if the // renderer crashes for any reason. @@ -88,7 +86,6 @@ class ScreensaverView : public views::WidgetDelegateView, DISALLOW_COPY_AND_ASSIGN(ScreensaverView); }; -} // namespace internal } // namespace ash #endif // ASH_SCREENSAVER_SCREENSAVER_VIEW_H_ diff --git a/ash/screensaver/screensaver_view_unittest.cc b/ash/screensaver/screensaver_view_unittest.cc index 0901ba4..19be19e 100644 --- a/ash/screensaver/screensaver_view_unittest.cc +++ b/ash/screensaver/screensaver_view_unittest.cc @@ -30,15 +30,14 @@ class ScreensaverViewTest : public ash::test::AshTestBase { } void ExpectOpenScreensaver() { - internal::ScreensaverView* screensaver = - internal::ScreensaverView::GetInstance(); + ScreensaverView* screensaver = ScreensaverView::GetInstance(); EXPECT_TRUE(screensaver != NULL); if (!screensaver) return; EXPECT_TRUE(screensaver->IsScreensaverShowingURL(url_)); } void ExpectClosedScreensaver() { - EXPECT_TRUE(internal::ScreensaverView::GetInstance() == NULL); + EXPECT_TRUE(ScreensaverView::GetInstance() == NULL); } protected: diff --git a/ash/shelf/alternate_app_list_button.cc b/ash/shelf/alternate_app_list_button.cc index 8790fba..f6c8731 100644 --- a/ash/shelf/alternate_app_list_button.cc +++ b/ash/shelf/alternate_app_list_button.cc @@ -27,8 +27,6 @@ #include "ui/views/painter.h" namespace ash { -namespace internal { - // static const int AlternateAppListButton::kImageBoundsSize = 7; @@ -170,5 +168,4 @@ void AlternateAppListButton::GetAccessibleState( state->name = host_->GetAccessibleName(this); } -} // namespace internal } // namespace ash diff --git a/ash/shelf/alternate_app_list_button.h b/ash/shelf/alternate_app_list_button.h index f80078b..bd95632 100644 --- a/ash/shelf/alternate_app_list_button.h +++ b/ash/shelf/alternate_app_list_button.h @@ -8,15 +8,11 @@ #include "ui/views/controls/button/image_button.h" namespace ash { - -class ShelfWidget; - -namespace internal { - class ShelfButtonHost; +class ShelfWidget; // Button used for the AppList icon on the shelf. -// This class is an alternate implementation to ash::internal::AppListButton +// This class is an alternate implementation to ash::AppListButton // for the purposes of testing an alternate shelf layout // (see ash_switches: UseAlternateShelfLayout). class AlternateAppListButton : public views::ImageButton { @@ -53,7 +49,6 @@ class AlternateAppListButton : public views::ImageButton { DISALLOW_COPY_AND_ASSIGN(AlternateAppListButton); }; -} // namespace internal } // namespace ash #endif // ASH_SHELF_ALTERNATE_APP_LIST_BUTTON_H_ diff --git a/ash/shelf/app_list_button.cc b/ash/shelf/app_list_button.cc index 56fc0e3..341fda5 100644 --- a/ash/shelf/app_list_button.cc +++ b/ash/shelf/app_list_button.cc @@ -21,7 +21,6 @@ #include "ui/views/painter.h" namespace ash { -namespace internal { const int kAnimationDurationInMs = 600; const float kAnimationOpacity[] = { 1.0f, 0.4f, 1.0f }; @@ -128,5 +127,4 @@ void AppListButton::GetAccessibleState(ui::AXViewState* state) { state->name = host_->GetAccessibleName(this); } -} // namespace internal } // namespace ash diff --git a/ash/shelf/app_list_button.h b/ash/shelf/app_list_button.h index 2326a11..c47fd6d 100644 --- a/ash/shelf/app_list_button.h +++ b/ash/shelf/app_list_button.h @@ -8,8 +8,6 @@ #include "ui/views/controls/button/image_button.h" namespace ash { -namespace internal { - class ShelfButtonHost; // Button used for the AppList icon on the shelf. @@ -38,7 +36,6 @@ class AppListButton : public views::ImageButton { DISALLOW_COPY_AND_ASSIGN(AppListButton); }; -} // namespace internal } // namespace ash #endif // ASH_SHELF_APP_LIST_BUTTON_H_ diff --git a/ash/shelf/app_list_shelf_item_delegate.cc b/ash/shelf/app_list_shelf_item_delegate.cc index 18ff11d..4261027 100644 --- a/ash/shelf/app_list_shelf_item_delegate.cc +++ b/ash/shelf/app_list_shelf_item_delegate.cc @@ -11,7 +11,6 @@ #include "ui/base/l10n/l10n_util.h" namespace ash { -namespace internal { AppListShelfItemDelegate::AppListShelfItemDelegate() { ShelfItem app_list; @@ -61,5 +60,4 @@ bool AppListShelfItemDelegate::ShouldShowTooltip() { void AppListShelfItemDelegate::Close() { } -} // namespace internal } // namespace ash diff --git a/ash/shelf/app_list_shelf_item_delegate.h b/ash/shelf/app_list_shelf_item_delegate.h index d858229..2642730 100644 --- a/ash/shelf/app_list_shelf_item_delegate.h +++ b/ash/shelf/app_list_shelf_item_delegate.h @@ -10,7 +10,6 @@ #include "base/compiler_specific.h" namespace ash { -namespace internal { // ShelfItemDelegate for TYPE_APP_LIST. class AppListShelfItemDelegate : public ShelfItemDelegate { @@ -32,7 +31,6 @@ class AppListShelfItemDelegate : public ShelfItemDelegate { DISALLOW_COPY_AND_ASSIGN(AppListShelfItemDelegate); }; -} // namespace internal } // namespace ash #endif // ASH_SHELF_APP_LIST_SHELF_ITEM_DELEGATE_H_ diff --git a/ash/shelf/background_animator.cc b/ash/shelf/background_animator.cc index 8137d60..288791a 100644 --- a/ash/shelf/background_animator.cc +++ b/ash/shelf/background_animator.cc @@ -6,8 +6,6 @@ namespace ash { -namespace internal { - namespace { // Duration of the background animation. @@ -58,5 +56,4 @@ void BackgroundAnimator::AnimationProgressed(const gfx::Animation* animation) { delegate_->UpdateBackground(alpha_); } -} // namespace internal } // namespace ash diff --git a/ash/shelf/background_animator.h b/ash/shelf/background_animator.h index 805f7d5..37be3be 100644 --- a/ash/shelf/background_animator.h +++ b/ash/shelf/background_animator.h @@ -18,8 +18,6 @@ enum BackgroundAnimatorChangeType { BACKGROUND_CHANGE_IMMEDIATE }; -namespace internal { - // Delegate is notified any time the background changes. class ASH_EXPORT BackgroundAnimatorDelegate { public: @@ -69,7 +67,6 @@ class ASH_EXPORT BackgroundAnimator : public gfx::AnimationDelegate { DISALLOW_COPY_AND_ASSIGN(BackgroundAnimator); }; -} // namespace internal } // namespace ash #endif // ASH_SHELF_BACKGROUND_ANIMATOR_H_ diff --git a/ash/shelf/overflow_bubble.cc b/ash/shelf/overflow_bubble.cc index 8a58d87..f7cc659 100644 --- a/ash/shelf/overflow_bubble.cc +++ b/ash/shelf/overflow_bubble.cc @@ -18,7 +18,6 @@ #include "ui/views/widget/widget.h" namespace ash { -namespace internal { OverflowBubble::OverflowBubble() : bubble_(NULL), @@ -100,5 +99,4 @@ void OverflowBubble::OnWidgetDestroying(views::Widget* widget) { widget->GetNativeView())->shelf_widget()->shelf()->SchedulePaint(); } -} // namespace internal } // namespace ash diff --git a/ash/shelf/overflow_bubble.h b/ash/shelf/overflow_bubble.h index 26bdf7a..7c3109c 100644 --- a/ash/shelf/overflow_bubble.h +++ b/ash/shelf/overflow_bubble.h @@ -19,9 +19,6 @@ class View; } namespace ash { - -namespace internal { - class OverflowBubbleView; class ShelfLayoutManager; class ShelfView; @@ -63,7 +60,6 @@ class OverflowBubble : public ui::EventHandler, DISALLOW_COPY_AND_ASSIGN(OverflowBubble); }; -} // namespace internal } // namespace ash #endif // ASH_SHELF_OVERFLOW_BUBBLE_H_ diff --git a/ash/shelf/overflow_bubble_view.cc b/ash/shelf/overflow_bubble_view.cc index 6dc6802..720a693 100644 --- a/ash/shelf/overflow_bubble_view.cc +++ b/ash/shelf/overflow_bubble_view.cc @@ -19,8 +19,6 @@ #include "ui/views/widget/widget.h" namespace ash { -namespace internal { - namespace { // Max bubble size to screen size ratio. @@ -65,7 +63,7 @@ void OverflowBubbleView::InitOverflowBubble(views::View* anchor, set_parent_window(Shell::GetContainer( anchor->GetWidget()->GetNativeWindow()->GetRootWindow(), - internal::kShellWindowId_ShelfBubbleContainer)); + kShellWindowId_ShelfBubbleContainer)); views::BubbleDelegateView::CreateBubble(this); } @@ -223,5 +221,4 @@ gfx::Rect OverflowBubbleView::GetBubbleBounds() { return bubble_rect; } -} // namespace internal } // namespace ash diff --git a/ash/shelf/overflow_bubble_view.h b/ash/shelf/overflow_bubble_view.h index e8533c1..58f80be 100644 --- a/ash/shelf/overflow_bubble_view.h +++ b/ash/shelf/overflow_bubble_view.h @@ -11,16 +11,13 @@ #include "ui/views/bubble/bubble_delegate.h" namespace ash { +class ShelfLayoutManager; +class ShelfView; namespace test { class OverflowBubbleViewTestAPI; } -namespace internal { - -class ShelfLayoutManager; -class ShelfView; - // OverflowBubbleView hosts a ShelfView to display overflown items. // Exports to access this class from OverflowBubbleViewTestAPI. class ASH_EXPORT OverflowBubbleView : public views::BubbleDelegateView { @@ -63,7 +60,6 @@ class ASH_EXPORT OverflowBubbleView : public views::BubbleDelegateView { DISALLOW_COPY_AND_ASSIGN(OverflowBubbleView); }; -} // namespace internal } // namespace ash #endif // ASH_SHELF_OVERFLOW_BUBBLE_VIEW_H_ diff --git a/ash/shelf/overflow_button.cc b/ash/shelf/overflow_button.cc index 3c899ef..9ebc8d4 100644 --- a/ash/shelf/overflow_button.cc +++ b/ash/shelf/overflow_button.cc @@ -22,8 +22,6 @@ #include "ui/views/widget/widget.h" namespace ash { -namespace internal { - namespace { const int kButtonHoverAlpha = 150; @@ -171,5 +169,4 @@ void OverflowButton::OnPaint(gfx::Canvas* canvas) { bounds.y() + ((bounds.height() - image->height()) / 2)); } -} // namespace internal } // namespace ash diff --git a/ash/shelf/overflow_button.h b/ash/shelf/overflow_button.h index 9e73505..aca781d 100644 --- a/ash/shelf/overflow_button.h +++ b/ash/shelf/overflow_button.h @@ -12,7 +12,6 @@ #include "ui/views/controls/button/custom_button.h" namespace ash { -namespace internal { // Shelf overflow chevron button. class OverflowButton : public views::CustomButton { @@ -38,7 +37,6 @@ class OverflowButton : public views::CustomButton { DISALLOW_COPY_AND_ASSIGN(OverflowButton); }; -} // namespace internal } // namespace ash #endif // ASH_SHELF_OVERFLOW_BUTTON_H_ diff --git a/ash/shelf/shelf.cc b/ash/shelf/shelf.cc index c973157..2d988fc 100644 --- a/ash/shelf/shelf.cc +++ b/ash/shelf/shelf.cc @@ -49,7 +49,7 @@ Shelf::Shelf(ShelfModel* shelf_model, alignment_(shelf_widget->GetAlignment()), delegate_(shelf_delegate), shelf_widget_(shelf_widget) { - shelf_view_ = new internal::ShelfView( + shelf_view_ = new ShelfView( shelf_model, delegate_, shelf_widget_->shelf_layout_manager()); shelf_view_->Init(); shelf_widget_->GetContentsView()->AddChildView(shelf_view_); @@ -63,15 +63,14 @@ Shelf::~Shelf() { // static Shelf* Shelf::ForPrimaryDisplay() { - ShelfWidget* shelf_widget = internal::RootWindowController::ForShelf( - Shell::GetPrimaryRootWindow())->shelf(); + ShelfWidget* shelf_widget = + RootWindowController::ForShelf(Shell::GetPrimaryRootWindow())->shelf(); return shelf_widget ? shelf_widget->shelf() : NULL; } // static Shelf* Shelf::ForWindow(aura::Window* window) { - ShelfWidget* shelf_widget = - internal::RootWindowController::ForShelf(window)->shelf(); + ShelfWidget* shelf_widget = RootWindowController::ForShelf(window)->shelf(); return shelf_widget ? shelf_widget->shelf() : NULL; } diff --git a/ash/shelf/shelf.h b/ash/shelf/shelf.h index 03cc2b0..2b06d82 100644 --- a/ash/shelf/shelf.h +++ b/ash/shelf/shelf.h @@ -30,21 +30,18 @@ class View; } namespace ash { - -namespace internal { class FocusCycler; +class ShelfDelegate; +class ShelfIconObserver; class ShelfLayoutManager; +class ShelfModel; class ShelfView; -} +class ShelfWidget; namespace test { class ShelfTestAPI; } -class ShelfDelegate; -class ShelfIconObserver; -class ShelfModel; -class ShelfWidget; class ASH_EXPORT Shelf { public: @@ -115,7 +112,7 @@ class ASH_EXPORT Shelf { friend class test::ShelfTestAPI; // ShelfView used to display icons. - internal::ShelfView* shelf_view_; + ShelfView* shelf_view_; ShelfAlignment alignment_; diff --git a/ash/shelf/shelf_alignment_menu.cc b/ash/shelf/shelf_alignment_menu.cc index 84fe792..4fbba2e 100644 --- a/ash/shelf/shelf_alignment_menu.cc +++ b/ash/shelf/shelf_alignment_menu.cc @@ -34,12 +34,11 @@ ShelfAlignmentMenu::ShelfAlignmentMenu(aura::Window* root) ShelfAlignmentMenu::~ShelfAlignmentMenu() {} bool ShelfAlignmentMenu::IsCommandIdChecked(int command_id) const { - return internal::ShelfLayoutManager::ForShelf(root_window_)-> - SelectValueForShelfAlignment( - MENU_ALIGN_BOTTOM == command_id, - MENU_ALIGN_LEFT == command_id, - MENU_ALIGN_RIGHT == command_id, - false); + return ShelfLayoutManager::ForShelf(root_window_) + ->SelectValueForShelfAlignment(MENU_ALIGN_BOTTOM == command_id, + MENU_ALIGN_LEFT == command_id, + MENU_ALIGN_RIGHT == command_id, + false); } bool ShelfAlignmentMenu::IsCommandIdEnabled(int command_id) const { diff --git a/ash/shelf/shelf_bezel_event_filter.cc b/ash/shelf/shelf_bezel_event_filter.cc index 2c4f648..513a949 100644 --- a/ash/shelf/shelf_bezel_event_filter.cc +++ b/ash/shelf/shelf_bezel_event_filter.cc @@ -10,7 +10,6 @@ #include "ui/aura/window.h" namespace ash { -namespace internal { ShelfBezelEventFilter::ShelfBezelEventFilter( ShelfLayoutManager* shelf) @@ -74,5 +73,4 @@ bool ShelfBezelEventFilter::IsShelfOnBezel( return false; } -} // namespace internal } // namespace ash diff --git a/ash/shelf/shelf_bezel_event_filter.h b/ash/shelf/shelf_bezel_event_filter.h index 33d1f5e..4bded4a 100644 --- a/ash/shelf/shelf_bezel_event_filter.h +++ b/ash/shelf/shelf_bezel_event_filter.h @@ -10,7 +10,6 @@ #include "ui/gfx/rect.h" namespace ash { -namespace internal { class ShelfLayoutManager; // Detects and forwards touch gestures that occur on a bezel sensor to the @@ -33,7 +32,6 @@ class ShelfBezelEventFilter : public ui::EventHandler { DISALLOW_COPY_AND_ASSIGN(ShelfBezelEventFilter); }; -} // namespace internal } // namespace ash #endif // ASH_SHELF_SHELF_BEZEL_EVENT_FILTER_H_ diff --git a/ash/shelf/shelf_button.cc b/ash/shelf/shelf_button.cc index ebd8110..7a740a6 100644 --- a/ash/shelf/shelf_button.cc +++ b/ash/shelf/shelf_button.cc @@ -40,9 +40,9 @@ const int kHopDownMS = 200; const int kAttentionThrobDurationMS = 800; bool ShouldHop(int state) { - return state & ash::internal::ShelfButton::STATE_HOVERED || - state & ash::internal::ShelfButton::STATE_ACTIVE || - state & ash::internal::ShelfButton::STATE_FOCUSED; + return state & ash::ShelfButton::STATE_HOVERED || + state & ash::ShelfButton::STATE_ACTIVE || + state & ash::ShelfButton::STATE_FOCUSED; } // Simple AnimationDelegate that owns a single ThrobAnimation instance to @@ -116,7 +116,6 @@ class ShelfButtonAnimation : public gfx::AnimationDelegate { } // namespace namespace ash { -namespace internal { //////////////////////////////////////////////////////////////////////////////// // ShelfButton::BarView @@ -590,5 +589,4 @@ void ShelfButton::UpdateBar() { bar_->SetVisible(bar_id != 0 && state_ != STATE_NORMAL); } -} // namespace internal } // namespace ash diff --git a/ash/shelf/shelf_button.h b/ash/shelf/shelf_button.h index 3f9b45e..96fab24 100644 --- a/ash/shelf/shelf_button.h +++ b/ash/shelf/shelf_button.h @@ -11,8 +11,6 @@ #include "ui/views/controls/image_view.h" namespace ash { -namespace internal { - class ShelfButtonHost; class ShelfLayoutManager; @@ -154,7 +152,6 @@ class ASH_EXPORT ShelfButton : public views::CustomButton { DISALLOW_COPY_AND_ASSIGN(ShelfButton); }; -} // namespace internal } // namespace ash #endif // ASH_SHELF_SHELF_BUTTON_H_ diff --git a/ash/shelf/shelf_button_host.h b/ash/shelf/shelf_button_host.h index d3b3fa2..b664c7f 100644 --- a/ash/shelf/shelf_button_host.h +++ b/ash/shelf/shelf_button_host.h @@ -17,7 +17,6 @@ class View; } namespace ash { -namespace internal { // The shelf buttons communicate back to the host by way of this interface. // This interface is used to enable reordering the items on the shelf. @@ -61,7 +60,6 @@ class ASH_EXPORT ShelfButtonHost { virtual ~ShelfButtonHost() {} }; -} // namespace internal } // namespace ash #endif // ASH_SHELF_SHELF_BUTTON_HOST_H_ diff --git a/ash/shelf/shelf_layout_manager.cc b/ash/shelf/shelf_layout_manager.cc index 8db87f4..c92c6f2 100644 --- a/ash/shelf/shelf_layout_manager.cc +++ b/ash/shelf/shelf_layout_manager.cc @@ -50,8 +50,6 @@ #include "ui/wm/public/activation_client.h" namespace ash { -namespace internal { - namespace { // Delay before showing the shelf. This is after the mouse stops moving. @@ -1184,5 +1182,4 @@ void ShelfLayoutManager::OnLockStateEvent(LockStateObserver::EventType event) { } } -} // namespace internal } // namespace ash diff --git a/ash/shelf/shelf_layout_manager.h b/ash/shelf/shelf_layout_manager.h index 4e03c7a..8054746 100644 --- a/ash/shelf/shelf_layout_manager.h +++ b/ash/shelf/shelf_layout_manager.h @@ -38,18 +38,15 @@ class ImplicitAnimationObserver; } namespace ash { -class ScreenAsh; -class ShelfLayoutManagerObserver; -class ShelfWidget; -FORWARD_DECLARE_TEST(WebNotificationTrayTest, PopupAndFullscreen); - -namespace internal { - class PanelLayoutManagerTest; +class ScreenAsh; class ShelfBezelEventFilter; +class ShelfLayoutManagerObserver; class ShelfLayoutManagerTest; +class ShelfWidget; class StatusAreaWidget; class WorkspaceController; +FORWARD_DECLARE_TEST(WebNotificationTrayTest, PopupAndFullscreen); // ShelfLayoutManager is the layout manager responsible for the shelf and // status widgets. The shelf is given the total available width and told the @@ -417,7 +414,6 @@ class ASH_EXPORT ShelfLayoutManager : DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager); }; -} // namespace internal } // namespace ash #endif // ASH_SHELF_SHELF_LAYOUT_MANAGER_H_ diff --git a/ash/shelf/shelf_layout_manager_unittest.cc b/ash/shelf/shelf_layout_manager_unittest.cc index 9217b2a..81ecc9f 100644 --- a/ash/shelf/shelf_layout_manager_unittest.cc +++ b/ash/shelf/shelf_layout_manager_unittest.cc @@ -47,8 +47,6 @@ #endif namespace ash { -namespace internal { - namespace { void StepWidgetLayerAnimatorToEnd(views::Widget* widget) { @@ -1015,8 +1013,7 @@ TEST_F(ShelfLayoutManagerTest, VisibleWhenLockScreenShowing) { GetShelfWidget()->GetWindowBoundsInScreen().y()); aura::Window* lock_container = Shell::GetContainer( - Shell::GetPrimaryRootWindow(), - internal::kShellWindowId_LockScreenContainer); + Shell::GetPrimaryRootWindow(), kShellWindowId_LockScreenContainer); views::Widget* lock_widget = new views::Widget; views::Widget::InitParams lock_params( @@ -2056,5 +2053,4 @@ TEST_F(ShelfLayoutManagerTest, MAYBE_StatusAreaHitBoxCoversEdge) { EXPECT_FALSE(status_area_widget->IsMessageBubbleShown()); } -} // namespace internal } // namespace ash diff --git a/ash/shelf/shelf_tooltip_manager.cc b/ash/shelf/shelf_tooltip_manager.cc index 15afb08..ecfcaa3 100644 --- a/ash/shelf/shelf_tooltip_manager.cc +++ b/ash/shelf/shelf_tooltip_manager.cc @@ -25,7 +25,6 @@ #include "ui/views/widget/widget.h" namespace ash { -namespace internal { namespace { const int kTooltipTopBottomMargin = 3; const int kTooltipLeftRightMargin = 10; @@ -99,7 +98,7 @@ ShelfTooltipManager::ShelfTooltipBubble::ShelfTooltipBubble( aura::Window* root_window = anchor->GetWidget()->GetNativeView()->GetRootWindow(); set_parent_window(ash::Shell::GetInstance()->GetContainer( - root_window, ash::internal::kShellWindowId_SettingBubbleContainer)); + root_window, ash::kShellWindowId_SettingBubbleContainer)); } label_ = new views::Label; label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); @@ -375,5 +374,4 @@ void ShelfTooltipManager::CreateTimer(int delay_in_ms) { timer_.reset(new_timer); } -} // namespace internal } // namespace ash diff --git a/ash/shelf/shelf_tooltip_manager.h b/ash/shelf/shelf_tooltip_manager.h index 5bb5f09..d7ca088 100644 --- a/ash/shelf/shelf_tooltip_manager.h +++ b/ash/shelf/shelf_tooltip_manager.h @@ -26,15 +26,14 @@ class Label; } namespace ash { +class ShelfView; +class ShelfLayoutManager; + namespace test { class ShelfTooltipManagerTest; class ShelfViewTest; } -namespace internal { -class ShelfView; -class ShelfLayoutManager; - // ShelfTooltipManager manages the tooltip balloon poping up on shelf items. class ASH_EXPORT ShelfTooltipManager : public ui::EventHandler, public ShelfLayoutManagerObserver { @@ -115,7 +114,6 @@ protected: DISALLOW_COPY_AND_ASSIGN(ShelfTooltipManager); }; -} // namespace internal } // namespace ash #endif // ASH_SHELF_SHELF_TOOLTIP_MANAGER_H_ diff --git a/ash/shelf/shelf_tooltip_manager_unittest.cc b/ash/shelf/shelf_tooltip_manager_unittest.cc index 7ce38df..c9096c9 100644 --- a/ash/shelf/shelf_tooltip_manager_unittest.cc +++ b/ash/shelf/shelf_tooltip_manager_unittest.cc @@ -42,9 +42,8 @@ class ShelfTooltipManagerTest : public AshTestBase { virtual void SetUp() OVERRIDE { AshTestBase::SetUp(); - internal::RootWindowController* controller = - Shell::GetPrimaryRootWindowController(); - tooltip_manager_.reset(new internal::ShelfTooltipManager( + RootWindowController* controller = Shell::GetPrimaryRootWindowController(); + tooltip_manager_.reset(new ShelfTooltipManager( controller->GetShelfLayoutManager(), ShelfTestAPI(controller->shelf()->shelf()).shelf_view())); } @@ -83,7 +82,7 @@ class ShelfTooltipManagerTest : public AshTestBase { protected: scoped_ptr<views::Widget> widget_; scoped_ptr<views::View> dummy_anchor_; - scoped_ptr<internal::ShelfTooltipManager> tooltip_manager_; + scoped_ptr<ShelfTooltipManager> tooltip_manager_; private: void CreateWidget() { @@ -94,9 +93,8 @@ class ShelfTooltipManagerTest : public AshTestBase { views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; - params.parent = Shell::GetContainer( - Shell::GetPrimaryRootWindow(), - ash::internal::kShellWindowId_ShelfContainer); + params.parent = Shell::GetContainer(Shell::GetPrimaryRootWindow(), + ash::kShellWindowId_ShelfContainer); widget_->Init(params); widget_->SetContentsView(dummy_anchor_.get()); @@ -157,7 +155,7 @@ TEST_F(ShelfTooltipManagerTest, HideWhenShelfIsAutoHide) { ShowImmediately(); ASSERT_TRUE(TooltipIsVisible()); - internal::ShelfLayoutManager* shelf = + ShelfLayoutManager* shelf = Shell::GetPrimaryRootWindowController()->GetShelfLayoutManager(); shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS); shelf->UpdateAutoHideState(); diff --git a/ash/shelf/shelf_unittest.cc b/ash/shelf/shelf_unittest.cc index 0df9a48..01380bc 100644 --- a/ash/shelf/shelf_unittest.cc +++ b/ash/shelf/shelf_unittest.cc @@ -24,8 +24,8 @@ #include "base/win/windows_version.h" #endif -using ash::internal::ShelfView; -using ash::internal::ShelfButton; +using ash::ShelfView; +using ash::ShelfButton; namespace ash { diff --git a/ash/shelf/shelf_view.cc b/ash/shelf/shelf_view.cc index 239f155..590fbf9 100644 --- a/ash/shelf/shelf_view.cc +++ b/ash/shelf/shelf_view.cc @@ -61,7 +61,6 @@ using gfx::Animation; using views::View; namespace ash { -namespace internal { const int SHELF_ALIGNMENT_UMA_ENUM_VALUE_BOTTOM = 0; const int SHELF_ALIGNMENT_UMA_ENUM_VALUE_LEFT = 1; @@ -566,7 +565,7 @@ void ShelfView::CreateDragIconProxy( const gfx::Vector2d& cursor_offset_from_center, float scale_factor) { drag_replaced_view_ = replaced_view; - drag_image_.reset(new ash::internal::DragImageView( + drag_image_.reset(new ash::DragImageView( drag_replaced_view_->GetWidget()->GetNativeWindow()->GetRootWindow(), ui::DragDropTypes::DRAG_EVENT_SOURCE_MOUSE)); drag_image_->SetImage(icon); @@ -2057,5 +2056,4 @@ int ShelfView::CalculateShelfDistance(const gfx::Point& coordinate) const { return distance > 0 ? distance : 0; } -} // namespace internal } // namespace ash diff --git a/ash/shelf/shelf_view.h b/ash/shelf/shelf_view.h index 6cd44e0..0d6f0b7 100644 --- a/ash/shelf/shelf_view.h +++ b/ash/shelf/shelf_view.h @@ -27,19 +27,11 @@ class ViewModel; } namespace ash { - -namespace test { -class ShelfViewTestAPI; -} - class ShelfDelegate; class ShelfIconObserver; class ShelfItemDelegateManager; class ShelfModel; struct ShelfItem; - -namespace internal { - class DragImageView; class OverflowBubble; class OverflowButton; @@ -47,6 +39,10 @@ class ShelfButton; class ShelfLayoutManager; class ShelfTooltipManager; +namespace test { +class ShelfViewTestAPI; +} + extern const int SHELF_ALIGNMENT_UMA_ENUM_VALUE_BOTTOM; extern const int SHELF_ALIGNMENT_UMA_ENUM_VALUE_LEFT; extern const int SHELF_ALIGNMENT_UMA_ENUM_VALUE_RIGHT; @@ -420,7 +416,7 @@ class ASH_EXPORT ShelfView : public views::View, // The image proxy for drag operations when a drag and drop host exists and // the item can be dragged outside the app grid. - scoped_ptr<ash::internal::DragImageView> drag_image_; + scoped_ptr<ash::DragImageView> drag_image_; // The cursor offset to the middle of the dragged item. gfx::Vector2d drag_image_offset_; @@ -452,7 +448,6 @@ class ASH_EXPORT ShelfView : public views::View, DISALLOW_COPY_AND_ASSIGN(ShelfView); }; -} // namespace internal } // namespace ash #endif // ASH_SHELF_SHELF_VIEW_H_ diff --git a/ash/shelf/shelf_view_unittest.cc b/ash/shelf/shelf_view_unittest.cc index 3b9956e..a2faa65 100644 --- a/ash/shelf/shelf_view_unittest.cc +++ b/ash/shelf/shelf_view_unittest.cc @@ -270,8 +270,8 @@ class ShelfViewTest : public AshTestBase { shelf_view_ = ShelfTestAPI(shelf).shelf_view(); // The bounds should be big enough for 4 buttons + overflow chevron. - shelf_view_->SetBounds(0, 0, 500, - internal::ShelfLayoutManager::GetPreferredShelfSize()); + shelf_view_->SetBounds( + 0, 0, 500, ShelfLayoutManager::GetPreferredShelfSize()); test_api_.reset(new ShelfViewTestAPI(shelf_view_)); test_api_->SetAnimationDuration(1); // Speeds up animation for test. @@ -356,7 +356,7 @@ class ShelfViewTest : public AshTestBase { test_api_->RunMessageLoopUntilAnimationsDone(); } - internal::ShelfButton* GetButtonByID(ShelfID id) { + ShelfButton* GetButtonByID(ShelfID id) { int index = model_->ItemIndexByID(id); return test_api_->GetButton(index); } @@ -394,10 +394,9 @@ class ShelfViewTest : public AshTestBase { } } - views::View* SimulateButtonPressed( - internal::ShelfButtonHost::Pointer pointer, - int button_index) { - internal::ShelfButtonHost* button_host = shelf_view_; + views::View* SimulateButtonPressed(ShelfButtonHost::Pointer pointer, + int button_index) { + ShelfButtonHost* button_host = shelf_view_; views::View* button = test_api_->GetButton(button_index); ui::MouseEvent click_event(ui::ET_MOUSE_PRESSED, button->bounds().origin(), @@ -406,20 +405,18 @@ class ShelfViewTest : public AshTestBase { return button; } - views::View* SimulateClick(internal::ShelfButtonHost::Pointer pointer, + views::View* SimulateClick(ShelfButtonHost::Pointer pointer, int button_index) { - internal::ShelfButtonHost* button_host = shelf_view_; + ShelfButtonHost* button_host = shelf_view_; views::View* button = SimulateButtonPressed(pointer, button_index); - button_host->PointerReleasedOnButton(button, - internal::ShelfButtonHost::MOUSE, - false); + button_host->PointerReleasedOnButton(button, ShelfButtonHost::MOUSE, false); return button; } - views::View* SimulateDrag(internal::ShelfButtonHost::Pointer pointer, + views::View* SimulateDrag(ShelfButtonHost::Pointer pointer, int button_index, int destination_index) { - internal::ShelfButtonHost* button_host = shelf_view_; + ShelfButtonHost* button_host = shelf_view_; views::View* button = SimulateButtonPressed(pointer, button_index); // Drag. @@ -435,7 +432,7 @@ class ShelfViewTest : public AshTestBase { std::vector<std::pair<ShelfID, views::View*> >* id_map) { // Initialize |id_map| with the automatically-created shelf buttons. for (size_t i = 0; i < model_->items().size(); ++i) { - internal::ShelfButton* button = test_api_->GetButton(i); + ShelfButton* button = test_api_->GetButton(i); id_map->push_back(std::make_pair(model_->items()[i].id, button)); } ASSERT_NO_FATAL_FAILURE(CheckModelIDs(*id_map)); @@ -490,8 +487,7 @@ class ShelfViewTest : public AshTestBase { int drag_item_index = test_api_for_overflow.GetLastVisibleIndex(); ShelfID drag_item_id = GetItemId(drag_item_index); - internal::ShelfButton* drag_button = - test_api_for_overflow.GetButton(drag_item_index); + ShelfButton* drag_button = test_api_for_overflow.GetButton(drag_item_index); gfx::Point center_point_of_drag_item = drag_button->GetBoundsInScreen().CenterPoint(); @@ -572,7 +568,7 @@ class ShelfViewTest : public AshTestBase { } ShelfModel* model_; - internal::ShelfView* shelf_view_; + ShelfView* shelf_view_; int browser_index_; ShelfItemDelegateManager* item_manager_; @@ -649,7 +645,7 @@ class ShelfViewTextDirectionTest // in both LTR and RTL. TEST_P(ShelfViewTextDirectionTest, IdealBoundsOfItemIcon) { ShelfID id = AddPlatformApp(); - internal::ShelfButton* button = GetButtonByID(id); + ShelfButton* button = GetButtonByID(id); gfx::Rect item_bounds = button->GetBoundsInScreen(); gfx::Point icon_offset = button->GetIconBounds().origin(); item_bounds.Offset(icon_offset.OffsetFromOrigin()); @@ -946,7 +942,7 @@ TEST_F(ShelfViewTest, AddButtonQuickly) { // Verifies non-overflow buttons are visible. for (int i = 0; i <= test_api_->GetLastVisibleIndex(); ++i) { - internal::ShelfButton* button = test_api_->GetButton(i); + ShelfButton* button = test_api_->GetButton(i); if (button) { EXPECT_TRUE(button->visible()) << "button index=" << i; EXPECT_EQ(1.0f, button->layer()->opacity()) << "button index=" << i; @@ -957,205 +953,189 @@ TEST_F(ShelfViewTest, AddButtonQuickly) { // Check that model changes are handled correctly while a shelf icon is being // dragged. TEST_F(ShelfViewTest, ModelChangesWhileDragging) { - internal::ShelfButtonHost* button_host = shelf_view_; + ShelfButtonHost* button_host = shelf_view_; std::vector<std::pair<ShelfID, views::View*> > id_map; SetupForDragTest(&id_map); // Dragging browser shortcut at index 1. EXPECT_TRUE(model_->items()[1].type == TYPE_BROWSER_SHORTCUT); - views::View* dragged_button = SimulateDrag( - internal::ShelfButtonHost::MOUSE, 1, 3); + views::View* dragged_button = SimulateDrag(ShelfButtonHost::MOUSE, 1, 3); std::rotate(id_map.begin() + 1, id_map.begin() + 2, id_map.begin() + 4); ASSERT_NO_FATAL_FAILURE(CheckModelIDs(id_map)); - button_host->PointerReleasedOnButton(dragged_button, - internal::ShelfButtonHost::MOUSE, - false); + button_host->PointerReleasedOnButton( + dragged_button, ShelfButtonHost::MOUSE, false); EXPECT_TRUE(model_->items()[3].type == TYPE_BROWSER_SHORTCUT); // Dragging changes model order. - dragged_button = SimulateDrag(internal::ShelfButtonHost::MOUSE, 1, 3); + dragged_button = SimulateDrag(ShelfButtonHost::MOUSE, 1, 3); std::rotate(id_map.begin() + 1, id_map.begin() + 2, id_map.begin() + 4); ASSERT_NO_FATAL_FAILURE(CheckModelIDs(id_map)); // Cancelling the drag operation restores previous order. - button_host->PointerReleasedOnButton(dragged_button, - internal::ShelfButtonHost::MOUSE, - true); + button_host->PointerReleasedOnButton( + dragged_button, ShelfButtonHost::MOUSE, true); std::rotate(id_map.begin() + 1, id_map.begin() + 3, id_map.begin() + 4); ASSERT_NO_FATAL_FAILURE(CheckModelIDs(id_map)); // Deleting an item keeps the remaining intact. - dragged_button = SimulateDrag(internal::ShelfButtonHost::MOUSE, 1, 3); + dragged_button = SimulateDrag(ShelfButtonHost::MOUSE, 1, 3); model_->RemoveItemAt(1); id_map.erase(id_map.begin() + 1); ASSERT_NO_FATAL_FAILURE(CheckModelIDs(id_map)); - button_host->PointerReleasedOnButton(dragged_button, - internal::ShelfButtonHost::MOUSE, - false); + button_host->PointerReleasedOnButton( + dragged_button, ShelfButtonHost::MOUSE, false); // Adding a shelf item cancels the drag and respects the order. - dragged_button = SimulateDrag(internal::ShelfButtonHost::MOUSE, 1, 3); + dragged_button = SimulateDrag(ShelfButtonHost::MOUSE, 1, 3); ShelfID new_id = AddAppShortcut(); id_map.insert(id_map.begin() + 6, std::make_pair(new_id, GetButtonByID(new_id))); ASSERT_NO_FATAL_FAILURE(CheckModelIDs(id_map)); - button_host->PointerReleasedOnButton(dragged_button, - internal::ShelfButtonHost::MOUSE, - false); + button_host->PointerReleasedOnButton( + dragged_button, ShelfButtonHost::MOUSE, false); // Adding a shelf item at the end (i.e. a panel) canels drag and respects // the order. - dragged_button = SimulateDrag(internal::ShelfButtonHost::MOUSE, 1, 3); + dragged_button = SimulateDrag(ShelfButtonHost::MOUSE, 1, 3); new_id = AddPanel(); id_map.insert(id_map.begin() + 7, std::make_pair(new_id, GetButtonByID(new_id))); ASSERT_NO_FATAL_FAILURE(CheckModelIDs(id_map)); - button_host->PointerReleasedOnButton(dragged_button, - internal::ShelfButtonHost::MOUSE, - false); + button_host->PointerReleasedOnButton( + dragged_button, ShelfButtonHost::MOUSE, false); } TEST_F(ShelfViewLegacyShelfLayoutTest, ModelChangesWhileDragging) { - internal::ShelfButtonHost* button_host = shelf_view_; + ShelfButtonHost* button_host = shelf_view_; std::vector<std::pair<ShelfID, views::View*> > id_map; SetupForDragTest(&id_map); // Dragging browser shortcut at index 0. EXPECT_TRUE(model_->items()[0].type == TYPE_BROWSER_SHORTCUT); - views::View* dragged_button = SimulateDrag( - internal::ShelfButtonHost::MOUSE, 0, 2); + views::View* dragged_button = SimulateDrag(ShelfButtonHost::MOUSE, 0, 2); std::rotate(id_map.begin(), id_map.begin() + 1, id_map.begin() + 3); ASSERT_NO_FATAL_FAILURE(CheckModelIDs(id_map)); - button_host->PointerReleasedOnButton(dragged_button, - internal::ShelfButtonHost::MOUSE, - false); + button_host->PointerReleasedOnButton( + dragged_button, ShelfButtonHost::MOUSE, false); EXPECT_TRUE(model_->items()[2].type == TYPE_BROWSER_SHORTCUT); // Dragging changes model order. - dragged_button = SimulateDrag(internal::ShelfButtonHost::MOUSE, 0, 2); + dragged_button = SimulateDrag(ShelfButtonHost::MOUSE, 0, 2); std::rotate(id_map.begin(), id_map.begin() + 1, id_map.begin() + 3); ASSERT_NO_FATAL_FAILURE(CheckModelIDs(id_map)); // Cancelling the drag operation restores previous order. - button_host->PointerReleasedOnButton(dragged_button, - internal::ShelfButtonHost::MOUSE, - true); + button_host->PointerReleasedOnButton( + dragged_button, ShelfButtonHost::MOUSE, true); std::rotate(id_map.begin(), id_map.begin() + 2, id_map.begin() + 3); ASSERT_NO_FATAL_FAILURE(CheckModelIDs(id_map)); // Deleting an item keeps the remaining intact. - dragged_button = SimulateDrag(internal::ShelfButtonHost::MOUSE, 0, 2); + dragged_button = SimulateDrag(ShelfButtonHost::MOUSE, 0, 2); model_->RemoveItemAt(1); id_map.erase(id_map.begin() + 1); ASSERT_NO_FATAL_FAILURE(CheckModelIDs(id_map)); - button_host->PointerReleasedOnButton(dragged_button, - internal::ShelfButtonHost::MOUSE, - false); + button_host->PointerReleasedOnButton( + dragged_button, ShelfButtonHost::MOUSE, false); // Adding a shelf item cancels the drag and respects the order. - dragged_button = SimulateDrag(internal::ShelfButtonHost::MOUSE, 0, 2); + dragged_button = SimulateDrag(ShelfButtonHost::MOUSE, 0, 2); ShelfID new_id = AddAppShortcut(); id_map.insert(id_map.begin() + 5, std::make_pair(new_id, GetButtonByID(new_id))); ASSERT_NO_FATAL_FAILURE(CheckModelIDs(id_map)); - button_host->PointerReleasedOnButton(dragged_button, - internal::ShelfButtonHost::MOUSE, - false); + button_host->PointerReleasedOnButton( + dragged_button, ShelfButtonHost::MOUSE, false); // Adding a shelf item at the end (i.e. a panel) canels drag and respects // the order. - dragged_button = SimulateDrag(internal::ShelfButtonHost::MOUSE, 0, 2); + dragged_button = SimulateDrag(ShelfButtonHost::MOUSE, 0, 2); new_id = AddPanel(); id_map.insert(id_map.begin() + 7, std::make_pair(new_id, GetButtonByID(new_id))); ASSERT_NO_FATAL_FAILURE(CheckModelIDs(id_map)); - button_host->PointerReleasedOnButton(dragged_button, - internal::ShelfButtonHost::MOUSE, - false); + button_host->PointerReleasedOnButton( + dragged_button, ShelfButtonHost::MOUSE, false); } // Check that 2nd drag from the other pointer would be ignored. TEST_F(ShelfViewTest, SimultaneousDrag) { - internal::ShelfButtonHost* button_host = shelf_view_; + ShelfButtonHost* button_host = shelf_view_; std::vector<std::pair<ShelfID, views::View*> > id_map; SetupForDragTest(&id_map); // Start a mouse drag. - views::View* dragged_button_mouse = SimulateDrag( - internal::ShelfButtonHost::MOUSE, 1, 3); + views::View* dragged_button_mouse = + SimulateDrag(ShelfButtonHost::MOUSE, 1, 3); std::rotate(id_map.begin() + 1, id_map.begin() + 2, id_map.begin() + 4); ASSERT_NO_FATAL_FAILURE(CheckModelIDs(id_map)); // Attempt a touch drag before the mouse drag finishes. - views::View* dragged_button_touch = SimulateDrag( - internal::ShelfButtonHost::TOUCH, 4, 2); + views::View* dragged_button_touch = + SimulateDrag(ShelfButtonHost::TOUCH, 4, 2); // Nothing changes since 2nd drag is ignored. ASSERT_NO_FATAL_FAILURE(CheckModelIDs(id_map)); // Finish the mouse drag. - button_host->PointerReleasedOnButton(dragged_button_mouse, - internal::ShelfButtonHost::MOUSE, - false); + button_host->PointerReleasedOnButton( + dragged_button_mouse, ShelfButtonHost::MOUSE, false); ASSERT_NO_FATAL_FAILURE(CheckModelIDs(id_map)); // Now start a touch drag. - dragged_button_touch = SimulateDrag(internal::ShelfButtonHost::TOUCH, 4, 2); + dragged_button_touch = SimulateDrag(ShelfButtonHost::TOUCH, 4, 2); std::rotate(id_map.begin() + 3, id_map.begin() + 4, id_map.begin() + 5); ASSERT_NO_FATAL_FAILURE(CheckModelIDs(id_map)); // And attempt a mouse drag before the touch drag finishes. - dragged_button_mouse = SimulateDrag(internal::ShelfButtonHost::MOUSE, 1, 2); + dragged_button_mouse = SimulateDrag(ShelfButtonHost::MOUSE, 1, 2); // Nothing changes since 2nd drag is ignored. ASSERT_NO_FATAL_FAILURE(CheckModelIDs(id_map)); - button_host->PointerReleasedOnButton(dragged_button_touch, - internal::ShelfButtonHost::TOUCH, - false); + button_host->PointerReleasedOnButton( + dragged_button_touch, ShelfButtonHost::TOUCH, false); ASSERT_NO_FATAL_FAILURE(CheckModelIDs(id_map)); } // Check that clicking first on one item and then dragging another works as // expected. TEST_F(ShelfViewTest, ClickOneDragAnother) { - internal::ShelfButtonHost* button_host = shelf_view_; + ShelfButtonHost* button_host = shelf_view_; std::vector<std::pair<ShelfID, views::View*> > id_map; SetupForDragTest(&id_map); // A click on item 1 is simulated. - SimulateClick(internal::ShelfButtonHost::MOUSE, 1); + SimulateClick(ShelfButtonHost::MOUSE, 1); // Dragging browser index at 0 should change the model order correctly. EXPECT_TRUE(model_->items()[1].type == TYPE_BROWSER_SHORTCUT); - views::View* dragged_button = SimulateDrag( - internal::ShelfButtonHost::MOUSE, 1, 3); + views::View* dragged_button = SimulateDrag(ShelfButtonHost::MOUSE, 1, 3); std::rotate(id_map.begin() + 1, id_map.begin() + 2, id_map.begin() + 4); ASSERT_NO_FATAL_FAILURE(CheckModelIDs(id_map)); - button_host->PointerReleasedOnButton(dragged_button, - internal::ShelfButtonHost::MOUSE, - false); + button_host->PointerReleasedOnButton( + dragged_button, ShelfButtonHost::MOUSE, false); EXPECT_TRUE(model_->items()[3].type == TYPE_BROWSER_SHORTCUT); } @@ -1169,14 +1149,14 @@ TEST_F(ShelfViewTest, ShelfItemStatus) { ShelfID last_added = AddPlatformApp(); ShelfItem item = GetItemByID(last_added); int index = model_->ItemIndexByID(last_added); - internal::ShelfButton* button = GetButtonByID(last_added); - ASSERT_EQ(internal::ShelfButton::STATE_RUNNING, button->state()); + ShelfButton* button = GetButtonByID(last_added); + ASSERT_EQ(ShelfButton::STATE_RUNNING, button->state()); item.status = STATUS_ACTIVE; model_->Set(index, item); - ASSERT_EQ(internal::ShelfButton::STATE_ACTIVE, button->state()); + ASSERT_EQ(ShelfButton::STATE_ACTIVE, button->state()); item.status = STATUS_ATTENTION; model_->Set(index, item); - ASSERT_EQ(internal::ShelfButton::STATE_ATTENTION, button->state()); + ASSERT_EQ(ShelfButton::STATE_ATTENTION, button->state()); } TEST_F(ShelfViewLegacyShelfLayoutTest, @@ -1188,17 +1168,13 @@ TEST_F(ShelfViewLegacyShelfLayoutTest, // Add 2 items to the shelf. ShelfID item1_id = AddPlatformApp(); ShelfID item2_id = AddPlatformAppNoWait(); - internal::ShelfButton* item1_button = GetButtonByID(item1_id); - internal::ShelfButton* item2_button = GetButtonByID(item2_id); - - internal::ShelfButton::State state_mask = - static_cast<internal::ShelfButton::State>( - internal::ShelfButton::STATE_NORMAL | - internal::ShelfButton::STATE_HOVERED | - internal::ShelfButton::STATE_RUNNING | - internal::ShelfButton::STATE_ACTIVE | - internal::ShelfButton::STATE_ATTENTION | - internal::ShelfButton::STATE_FOCUSED); + ShelfButton* item1_button = GetButtonByID(item1_id); + ShelfButton* item2_button = GetButtonByID(item2_id); + + ShelfButton::State state_mask = static_cast<ShelfButton::State>( + ShelfButton::STATE_NORMAL | ShelfButton::STATE_HOVERED | + ShelfButton::STATE_RUNNING | ShelfButton::STATE_ACTIVE | + ShelfButton::STATE_ATTENTION | ShelfButton::STATE_FOCUSED); // Clear the button states. item1_button->ClearState(state_mask); @@ -1207,10 +1183,10 @@ TEST_F(ShelfViewLegacyShelfLayoutTest, // Since default alignment in tests is bottom, state is reflected in y-axis. ASSERT_EQ(item1_button->GetIconBounds().y(), item2_button->GetIconBounds().y()); - item1_button->AddState(internal::ShelfButton::STATE_HOVERED); + item1_button->AddState(ShelfButton::STATE_HOVERED); ASSERT_NE(item1_button->GetIconBounds().y(), item2_button->GetIconBounds().y()); - item1_button->ClearState(internal::ShelfButton::STATE_HOVERED); + item1_button->ClearState(ShelfButton::STATE_HOVERED); } // Confirm that item status changes are reflected in the buttons @@ -1224,14 +1200,14 @@ TEST_F(ShelfViewTest, ShelfItemStatusPlatformApp) { ShelfID last_added = AddPlatformApp(); ShelfItem item = GetItemByID(last_added); int index = model_->ItemIndexByID(last_added); - internal::ShelfButton* button = GetButtonByID(last_added); - ASSERT_EQ(internal::ShelfButton::STATE_RUNNING, button->state()); + ShelfButton* button = GetButtonByID(last_added); + ASSERT_EQ(ShelfButton::STATE_RUNNING, button->state()); item.status = STATUS_ACTIVE; model_->Set(index, item); - ASSERT_EQ(internal::ShelfButton::STATE_ACTIVE, button->state()); + ASSERT_EQ(ShelfButton::STATE_ACTIVE, button->state()); item.status = STATUS_ATTENTION; model_->Set(index, item); - ASSERT_EQ(internal::ShelfButton::STATE_ATTENTION, button->state()); + ASSERT_EQ(ShelfButton::STATE_ATTENTION, button->state()); } // Confirm that shelf item bounds are correctly updated on shelf changes. @@ -1255,12 +1231,11 @@ TEST_F(ShelfViewTest, ShelfTooltipTest) { ShelfID app_button_id = AddAppShortcut(); ShelfID platform_button_id = AddPlatformApp(); - internal::ShelfButton* app_button = GetButtonByID(app_button_id); - internal::ShelfButton* platform_button = GetButtonByID(platform_button_id); + ShelfButton* app_button = GetButtonByID(app_button_id); + ShelfButton* platform_button = GetButtonByID(platform_button_id); - internal::ShelfButtonHost* button_host = shelf_view_; - internal::ShelfTooltipManager* tooltip_manager = - shelf_view_->tooltip_manager(); + ShelfButtonHost* button_host = shelf_view_; + ShelfTooltipManager* tooltip_manager = shelf_view_->tooltip_manager(); button_host->MouseEnteredButton(app_button); // There's a delay to show the tooltip, so it's not visible yet. @@ -1296,13 +1271,12 @@ TEST_F(ShelfViewTest, ShelfTooltipTest) { // Verify a fix for crash caused by a tooltip update for a deletedshelf // button, see crbug.com/288838. TEST_F(ShelfViewTest, RemovingItemClosesTooltip) { - internal::ShelfButtonHost* button_host = shelf_view_; - internal::ShelfTooltipManager* tooltip_manager = - shelf_view_->tooltip_manager(); + ShelfButtonHost* button_host = shelf_view_; + ShelfTooltipManager* tooltip_manager = shelf_view_->tooltip_manager(); // Add an item to the shelf. ShelfID app_button_id = AddAppShortcut(); - internal::ShelfButton* app_button = GetButtonByID(app_button_id); + ShelfButton* app_button = GetButtonByID(app_button_id); // Spawn a tooltip on that item. button_host->MouseEnteredButton(app_button); @@ -1321,13 +1295,12 @@ TEST_F(ShelfViewTest, RemovingItemClosesTooltip) { // Changing the shelf alignment closes any open tooltip. TEST_F(ShelfViewTest, ShelfAlignmentClosesTooltip) { - internal::ShelfButtonHost* button_host = shelf_view_; - internal::ShelfTooltipManager* tooltip_manager = - shelf_view_->tooltip_manager(); + ShelfButtonHost* button_host = shelf_view_; + ShelfTooltipManager* tooltip_manager = shelf_view_->tooltip_manager(); // Add an item to the shelf. ShelfID app_button_id = AddAppShortcut(); - internal::ShelfButton* app_button = GetButtonByID(app_button_id); + ShelfButton* app_button = GetButtonByID(app_button_id); // Spawn a tooltip on the item. button_host->MouseEnteredButton(app_button); @@ -1346,7 +1319,7 @@ TEST_F(ShelfViewTest, ShouldHideTooltipTest) { // The tooltip shouldn't hide if the mouse is on normal buttons. for (int i = 0; i < test_api_->GetButtonCount(); i++) { - internal::ShelfButton* button = test_api_->GetButton(i); + ShelfButton* button = test_api_->GetButton(i); if (!button) continue; @@ -1371,7 +1344,7 @@ TEST_F(ShelfViewTest, ShouldHideTooltipTest) { // The tooltip should hide if it's outside of all buttons. gfx::Rect all_area; for (int i = 0; i < test_api_->GetButtonCount(); i++) { - internal::ShelfButton* button = test_api_->GetButton(i); + ShelfButton* button = test_api_->GetButton(i); if (!button) continue; @@ -1397,7 +1370,7 @@ TEST_F(ShelfViewTest, ShouldHideTooltipWithAppListWindowTest) { // The tooltip shouldn't hide if the mouse is on normal buttons. for (int i = 1; i < test_api_->GetButtonCount(); i++) { - internal::ShelfButton* button = test_api_->GetButton(i); + ShelfButton* button = test_api_->GetButton(i); if (!button) continue; @@ -1415,8 +1388,7 @@ TEST_F(ShelfViewTest, ShouldHideTooltipWithAppListWindowTest) { // Test that by moving the mouse cursor off the button onto the bubble it closes // the bubble. TEST_F(ShelfViewTest, ShouldHideTooltipWhenHoveringOnTooltip) { - internal::ShelfTooltipManager* tooltip_manager = - shelf_view_->tooltip_manager(); + ShelfTooltipManager* tooltip_manager = shelf_view_->tooltip_manager(); tooltip_manager->CreateZeroDelayTimerForTest(); aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow()); @@ -1512,8 +1484,7 @@ TEST_F(ShelfViewTest, OverflowBubbleSize) { aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(), gfx::Point()); - internal::ShelfButton* button = - test_for_overflow_view.GetButton(ripped_index); + ShelfButton* button = test_for_overflow_view.GetButton(ripped_index); // Rip off the last visible item. gfx::Point start_point = button->GetBoundsInScreen().CenterPoint(); gfx::Point rip_off_point(start_point.x(), 0); @@ -1573,8 +1544,7 @@ TEST_F(ShelfViewTest, CheckDragInsertBoundsOfScrolledOverflowBubble) { int item_width = test_api_->GetButtonSize() + test_api_->GetButtonSpacing(); - internal::OverflowBubbleView* bubble_view = - test_api_->overflow_bubble()->bubble_view(); + OverflowBubbleView* bubble_view = test_api_->overflow_bubble()->bubble_view(); test::OverflowBubbleViewTestAPI bubble_view_api(bubble_view); // Add more buttons until OverflowBubble is scrollable and it has 3 invisible @@ -1591,10 +1561,8 @@ TEST_F(ShelfViewTest, CheckDragInsertBoundsOfScrolledOverflowBubble) { int first_index = test_for_overflow_view.GetFirstVisibleIndex(); int last_index = test_for_overflow_view.GetLastVisibleIndex(); - internal::ShelfButton* first_button = - test_for_overflow_view.GetButton(first_index); - internal::ShelfButton* last_button = - test_for_overflow_view.GetButton(last_index); + ShelfButton* first_button = test_for_overflow_view.GetButton(first_index); + ShelfButton* last_button = test_for_overflow_view.GetButton(last_index); gfx::Point first_point = first_button->GetBoundsInScreen().CenterPoint(); gfx::Point last_point = last_button->GetBoundsInScreen().CenterPoint(); gfx::Rect drag_reinsert_bounds = @@ -1620,12 +1588,12 @@ TEST_F(ShelfViewTest, CheckDragInsertBoundsWithMultiMonitor) { UpdateDisplay("800x600,800x600"); Shelf* secondary_shelf = Shelf::ForWindow(Shell::GetAllRootWindows()[1]); - internal::ShelfView* shelf_view_for_secondary = + ShelfView* shelf_view_for_secondary = ShelfTestAPI(secondary_shelf).shelf_view(); // The bounds should be big enough for 4 buttons + overflow chevron. - shelf_view_for_secondary->SetBounds(0, 0, 500, - internal::ShelfLayoutManager::GetPreferredShelfSize()); + shelf_view_for_secondary->SetBounds( + 0, 0, 500, ShelfLayoutManager::GetPreferredShelfSize()); ShelfViewTestAPI test_api_for_secondary(shelf_view_for_secondary); // Speeds up animation for test. @@ -1642,7 +1610,7 @@ TEST_F(ShelfViewTest, CheckDragInsertBoundsWithMultiMonitor) { ShelfViewTestAPI test_api_for_overflow_view( test_api_->overflow_bubble()->shelf_view()); - internal::ShelfButton* button = test_api_for_overflow_view.GetButton( + ShelfButton* button = test_api_for_overflow_view.GetButton( test_api_for_overflow_view.GetLastVisibleIndex()); // Checks that a point in shelf is contained in drag insert bounds. @@ -1663,7 +1631,7 @@ TEST_F(ShelfViewTest, CheckDragInsertBoundsWithMultiMonitor) { ShelfViewTestAPI test_api_for_overflow_view_of_secondary( test_api_for_secondary.overflow_bubble()->shelf_view()); - internal::ShelfButton* button_in_secondary = + ShelfButton* button_in_secondary = test_api_for_overflow_view_of_secondary.GetButton( test_api_for_overflow_view_of_secondary.GetLastVisibleIndex()); @@ -1703,12 +1671,12 @@ TEST_F(ShelfViewTest, CheckRipOffFromLeftShelfAlignmentWithMultiMonitor) { EXPECT_GT(browser_index, 0); Shelf* secondary_shelf = Shelf::ForWindow(second_root); - internal::ShelfView* shelf_view_for_secondary = + ShelfView* shelf_view_for_secondary = ShelfTestAPI(secondary_shelf).shelf_view(); ShelfViewTestAPI test_api_for_secondary_shelf_view(shelf_view_for_secondary); - internal::ShelfButton* button = - test_api_for_secondary_shelf_view.GetButton(browser_index); + ShelfButton* button = + test_api_for_secondary_shelf_view.GetButton(browser_index); // Fetch the start point of dragging. gfx::Point start_point = button->GetBoundsInScreen().CenterPoint(); @@ -1744,7 +1712,7 @@ class ShelfViewVisibleBoundsTest : public ShelfViewTest, gfx::Rect shelf_bounds = shelf_view_->GetBoundsInScreen(); EXPECT_TRUE(shelf_bounds.Contains(visible_bounds)); for (int i = 0; i < test_api_->GetButtonCount(); ++i) - if (internal::ShelfButton* button = test_api_->GetButton(i)) + if (ShelfButton* button = test_api_->GetButton(i)) EXPECT_TRUE(visible_bounds.Contains(button->GetBoundsInScreen())); CheckAppListButtonIsInBounds(); } diff --git a/ash/shelf/shelf_widget.cc b/ash/shelf/shelf_widget.cc index f3f1f29..68ab0ba 100644 --- a/ash/shelf/shelf_widget.cc +++ b/ash/shelf/shelf_widget.cc @@ -52,7 +52,7 @@ const int kTimeToUnDimMs = 200; // Fast in activating. // Class used to slightly dim shelf items when maximized and visible. class DimmerView : public views::View, public views::WidgetDelegate, - ash::internal::BackgroundAnimatorDelegate { + ash::BackgroundAnimatorDelegate { public: // If |disable_dimming_animations_for_test| is set, all alpha animations will // be performed instantly. @@ -74,7 +74,7 @@ class DimmerView : public views::View, return View::GetWidget(); } - // ash::internal::BackgroundAnimatorDelegate overrides: + // ash::BackgroundAnimatorDelegate overrides: virtual void UpdateBackground(int alpha) OVERRIDE { alpha_ = alpha; SchedulePaint(); @@ -126,7 +126,7 @@ class DimmerView : public views::View, bool disable_dimming_animations_for_test_; // The animator for the background transitions. - ash::internal::BackgroundAnimator background_animator_; + ash::BackgroundAnimator background_animator_; // Notification of entering / exiting of the shelf area by mouse. scoped_ptr<DimmerEventFilter> event_filter_; @@ -234,7 +234,7 @@ void DimmerView::DimmerEventFilter::OnTouchEvent(ui::TouchEvent* event) { touch_inside_ = touch_inside; } -using ash::internal::ShelfLayoutManager; +using ash::ShelfLayoutManager; // ShelfWindowTargeter makes it easier to resize windows with the mouse when the // window-edge slightly overlaps with the shelf edge. The targeter also makes it @@ -313,18 +313,16 @@ namespace ash { // sizes it to the width of the shelf minus the size of the status area. class ShelfWidget::DelegateView : public views::WidgetDelegate, public views::AccessiblePaneView, - public internal::BackgroundAnimatorDelegate, + public BackgroundAnimatorDelegate, public aura::WindowObserver { public: explicit DelegateView(ShelfWidget* shelf); virtual ~DelegateView(); - void set_focus_cycler(internal::FocusCycler* focus_cycler) { + void set_focus_cycler(FocusCycler* focus_cycler) { focus_cycler_ = focus_cycler; } - internal::FocusCycler* focus_cycler() { - return focus_cycler_; - } + FocusCycler* focus_cycler() { return focus_cycler_; } ui::Layer* opaque_background() { return &opaque_background_; } @@ -383,7 +381,7 @@ class ShelfWidget::DelegateView : public views::WidgetDelegate, private: ShelfWidget* shelf_; scoped_ptr<views::Widget> dimmer_; - internal::FocusCycler* focus_cycler_; + FocusCycler* focus_cycler_; int alpha_; ui::Layer opaque_background_; @@ -601,7 +599,7 @@ void ShelfWidget::DelegateView::UpdateBackground(int alpha) { ShelfWidget::ShelfWidget(aura::Window* shelf_container, aura::Window* status_container, - internal::WorkspaceController* workspace_controller) + WorkspaceController* workspace_controller) : delegate_view_(new DelegateView(this)), background_animator_(delegate_view_, 0, kShelfBackgroundAlpha), activating_as_fallback_(false), @@ -619,7 +617,7 @@ ShelfWidget::ShelfWidget(aura::Window* shelf_container, SetContentsView(delegate_view_); delegate_view_->SetParentLayer(GetLayer()); - status_area_widget_ = new internal::StatusAreaWidget(status_container); + status_area_widget_ = new StatusAreaWidget(status_container); status_area_widget_->CreateTrayViews(); if (Shell::GetInstance()->session_state_delegate()-> IsActiveUserSessionStarted()) { @@ -627,14 +625,13 @@ ShelfWidget::ShelfWidget(aura::Window* shelf_container, } Shell::GetInstance()->focus_cycler()->AddWidget(status_area_widget_); - shelf_layout_manager_ = new internal::ShelfLayoutManager(this); + shelf_layout_manager_ = new ShelfLayoutManager(this); shelf_layout_manager_->AddObserver(this); shelf_container->SetLayoutManager(shelf_layout_manager_); shelf_layout_manager_->set_workspace_controller(workspace_controller); workspace_controller->SetShelf(shelf_layout_manager_); - status_container->SetLayoutManager( - new internal::StatusAreaLayoutManager(this)); + status_container->SetLayoutManager(new StatusAreaLayoutManager(this)); shelf_container->SetEventTargeter(scoped_ptr<ui::EventTargeter>(new ShelfWindowTargeter(shelf_container, shelf_layout_manager_))); @@ -743,8 +740,7 @@ void ShelfWidget::CreateShelf() { SetFocusCycler(shell->focus_cycler()); // Inform the root window controller. - internal::RootWindowController::ForWindow(window_container_) - ->OnShelfCreated(); + RootWindowController::ForWindow(window_container_)->OnShelfCreated(); shelf_->SetVisible( shell->session_state_delegate()->IsActiveUserSessionStarted()); @@ -761,13 +757,13 @@ void ShelfWidget::SetShelfVisibility(bool visible) { shelf_->SetVisible(visible); } -void ShelfWidget::SetFocusCycler(internal::FocusCycler* focus_cycler) { +void ShelfWidget::SetFocusCycler(FocusCycler* focus_cycler) { delegate_view_->set_focus_cycler(focus_cycler); if (focus_cycler) focus_cycler->AddWidget(this); } -internal::FocusCycler* ShelfWidget::GetFocusCycler() { +FocusCycler* ShelfWidget::GetFocusCycler() { return delegate_view_->focus_cycler(); } diff --git a/ash/shelf/shelf_widget.h b/ash/shelf/shelf_widget.h index d2ff8b4..8a2ccc6 100644 --- a/ash/shelf/shelf_widget.h +++ b/ash/shelf/shelf_widget.h @@ -17,23 +17,19 @@ class Window; } namespace ash { -class Shelf; - -namespace internal { class FocusCycler; -class StatusAreaWidget; +class Shelf; class ShelfLayoutManager; +class StatusAreaWidget; class WorkspaceController; -} class ASH_EXPORT ShelfWidget : public views::Widget, public views::WidgetObserver, public ShelfLayoutManagerObserver { public: - ShelfWidget( - aura::Window* shelf_container, - aura::Window* status_container, - internal::WorkspaceController* workspace_controller); + ShelfWidget(aura::Window* shelf_container, + aura::Window* status_container, + WorkspaceController* workspace_controller); virtual ~ShelfWidget(); // Returns if shelf alignment option is enabled, and the user is able @@ -53,13 +49,9 @@ class ASH_EXPORT ShelfWidget : public views::Widget, void SetDimsShelf(bool dimming); bool GetDimsShelf() const; - internal::ShelfLayoutManager* shelf_layout_manager() { - return shelf_layout_manager_; - } + ShelfLayoutManager* shelf_layout_manager() { return shelf_layout_manager_; } Shelf* shelf() const { return shelf_.get(); } - internal::StatusAreaWidget* status_area_widget() const { - return status_area_widget_; - } + StatusAreaWidget* status_area_widget() const { return status_area_widget_; } void CreateShelf(); @@ -68,8 +60,8 @@ class ASH_EXPORT ShelfWidget : public views::Widget, bool IsShelfVisible() const; // Sets the focus cycler. Also adds the shelf to the cycle. - void SetFocusCycler(internal::FocusCycler* focus_cycler); - internal::FocusCycler* GetFocusCycler(); + void SetFocusCycler(FocusCycler* focus_cycler); + FocusCycler* GetFocusCycler(); // Called by the activation delegate, before the shelf is activated // when no other windows are visible. @@ -104,14 +96,14 @@ class ASH_EXPORT ShelfWidget : public views::Widget, private: class DelegateView; - internal::ShelfLayoutManager* shelf_layout_manager_; + ShelfLayoutManager* shelf_layout_manager_; scoped_ptr<Shelf> shelf_; - internal::StatusAreaWidget* status_area_widget_; + StatusAreaWidget* status_area_widget_; // delegate_view_ is attached to window_container_ and is cleaned up // during CloseChildWindows of the associated RootWindowController. DelegateView* delegate_view_; - internal::BackgroundAnimator background_animator_; + BackgroundAnimator background_animator_; bool activating_as_fallback_; aura::Window* window_container_; }; diff --git a/ash/shelf/shelf_widget_unittest.cc b/ash/shelf/shelf_widget_unittest.cc index 873cb35..770bd7e 100644 --- a/ash/shelf/shelf_widget_unittest.cc +++ b/ash/shelf/shelf_widget_unittest.cc @@ -30,7 +30,7 @@ ShelfWidget* GetShelfWidget() { return Shelf::ForPrimaryDisplay()->shelf_widget(); } -internal::ShelfLayoutManager* GetShelfLayoutManager() { +ShelfLayoutManager* GetShelfLayoutManager() { return GetShelfWidget()->shelf_layout_manager(); } @@ -117,7 +117,7 @@ TEST_F(ShelfWidgetTest, LauncherInitiallySized) { ShelfWidget* shelf_widget = GetShelfWidget(); Shelf* shelf = shelf_widget->shelf(); ASSERT_TRUE(shelf); - internal::ShelfLayoutManager* shelf_layout_manager = GetShelfLayoutManager(); + ShelfLayoutManager* shelf_layout_manager = GetShelfLayoutManager(); ASSERT_TRUE(shelf_layout_manager); ASSERT_TRUE(shelf_widget->status_area_widget()); int status_width = shelf_widget->status_area_widget()-> @@ -181,7 +181,7 @@ TEST_F(ShelfWidgetTest, ShelfEdgeOverlappingWindowHitTestMouse) { ShelfWidget* shelf_widget = GetShelfWidget(); gfx::Rect shelf_bounds = shelf_widget->GetWindowBoundsInScreen(); EXPECT_TRUE(!shelf_bounds.IsEmpty()); - internal::ShelfLayoutManager* shelf_layout_manager = + ShelfLayoutManager* shelf_layout_manager = shelf_widget->shelf_layout_manager(); ASSERT_TRUE(shelf_layout_manager); EXPECT_EQ(SHELF_VISIBLE, shelf_layout_manager->visibility_state()); @@ -244,7 +244,7 @@ TEST_F(ShelfWidgetTest, HiddenShelfHitTestTouch) { ShelfWidget* shelf_widget = GetShelfWidget(); gfx::Rect shelf_bounds = shelf_widget->GetWindowBoundsInScreen(); EXPECT_TRUE(!shelf_bounds.IsEmpty()); - internal::ShelfLayoutManager* shelf_layout_manager = + ShelfLayoutManager* shelf_layout_manager = shelf_widget->shelf_layout_manager(); ASSERT_TRUE(shelf_layout_manager); EXPECT_EQ(SHELF_VISIBLE, shelf_layout_manager->visibility_state()); diff --git a/ash/shelf/shelf_window_watcher.cc b/ash/shelf/shelf_window_watcher.cc index 9488d10..b16deea 100644 --- a/ash/shelf/shelf_window_watcher.cc +++ b/ash/shelf/shelf_window_watcher.cc @@ -50,7 +50,6 @@ bool IsDragging(aura::Window* window) { } // namespace namespace ash { -namespace internal { ShelfWindowWatcher::RootWindowObserver::RootWindowObserver( ShelfWindowWatcher* window_watcher) @@ -289,5 +288,4 @@ void ShelfWindowWatcher::OnDisplayRemoved(const gfx::Display& old_display) { // Do nothing here. } -} // namespace internal } // namespace ash diff --git a/ash/shelf/shelf_window_watcher.h b/ash/shelf/shelf_window_watcher.h index ba42756..cb99bc7 100644 --- a/ash/shelf/shelf_window_watcher.h +++ b/ash/shelf/shelf_window_watcher.h @@ -29,7 +29,6 @@ namespace ash { class ShelfModel; class ShelfItemDelegateManager; -namespace internal { // ShelfWindowWatcher creates and handles a ShelfItem for windows that have // a ShelfItemDetails property in the default container. class ShelfWindowWatcher : public aura::client::ActivationChangeObserver, @@ -144,7 +143,6 @@ class ShelfWindowWatcher : public aura::client::ActivationChangeObserver, DISALLOW_COPY_AND_ASSIGN(ShelfWindowWatcher); }; -} // namespace internal } // namespace ash #endif // ASH_SHELF_SHELF_WINDOW_WATCHER_H_ diff --git a/ash/shelf/shelf_window_watcher_item_delegate.cc b/ash/shelf/shelf_window_watcher_item_delegate.cc index e1ce8ec..005d2d4 100644 --- a/ash/shelf/shelf_window_watcher_item_delegate.cc +++ b/ash/shelf/shelf_window_watcher_item_delegate.cc @@ -14,7 +14,6 @@ #include "ui/wm/core/window_animations.h" namespace ash { -namespace internal { ShelfWindowWatcherItemDelegate::ShelfWindowWatcherItemDelegate( aura::Window* window, ShelfModel* model) @@ -69,5 +68,4 @@ bool ShelfWindowWatcherItemDelegate::ShouldShowTooltip() { return true; } -} // namespace internal } // namespace ash diff --git a/ash/shelf/shelf_window_watcher_item_delegate.h b/ash/shelf/shelf_window_watcher_item_delegate.h index 7a40f63..9de8f6f 100644 --- a/ash/shelf/shelf_window_watcher_item_delegate.h +++ b/ash/shelf/shelf_window_watcher_item_delegate.h @@ -14,11 +14,8 @@ class Window; } namespace ash { - class ShelfModel; -namespace internal { - // ShelfItemDelegate for the items created by ShelfWindowWatcher. class ShelfWindowWatcherItemDelegate : public ShelfItemDelegate { public: @@ -45,7 +42,6 @@ class ShelfWindowWatcherItemDelegate : public ShelfItemDelegate { DISALLOW_COPY_AND_ASSIGN(ShelfWindowWatcherItemDelegate); }; -} // namespace internal } // namespace ash #endif // ASH_SHELF_SHELF_WINDOW_WATCHER_ITEM_DELEGATE_H_ diff --git a/ash/shelf/shelf_window_watcher_unittest.cc b/ash/shelf/shelf_window_watcher_unittest.cc index f4ba99d..588db3b 100644 --- a/ash/shelf/shelf_window_watcher_unittest.cc +++ b/ash/shelf/shelf_window_watcher_unittest.cc @@ -21,7 +21,6 @@ #include "ui/base/hit_test.h" namespace ash { -namespace internal { class ShelfWindowWatcherTest : public test::AshTestBase { public: @@ -286,5 +285,4 @@ TEST_F(ShelfWindowWatcherTest, ReparentWindowDuringTheDragging) { EXPECT_EQ(1, model_->item_count()); } -} // namespace internal } // namespace ash diff --git a/ash/shell.cc b/ash/shell.cc index d770314..f449d3e 100644 --- a/ash/shell.cc +++ b/ash/shell.cc @@ -197,8 +197,8 @@ void Shell::DeleteInstance() { } // static -internal::RootWindowController* Shell::GetPrimaryRootWindowController() { - return internal::GetRootWindowController(GetPrimaryRootWindow()); +RootWindowController* Shell::GetPrimaryRootWindowController() { + return GetRootWindowController(GetPrimaryRootWindow()); } // static @@ -273,8 +273,8 @@ void Shell::ShowContextMenu(const gfx::Point& location_in_screen, aura::Window* root = wm::GetRootWindowMatching(gfx::Rect(location_in_screen, gfx::Size())); - internal::GetRootWindowController(root)-> - ShowContextMenu(location_in_screen, source_type); + GetRootWindowController(root) + ->ShowContextMenu(location_in_screen, source_type); } void Shell::ToggleAppList(aura::Window* window) { @@ -282,7 +282,7 @@ void Shell::ToggleAppList(aura::Window* window) { if (!window) window = GetTargetRootWindow(); if (!app_list_controller_) - app_list_controller_.reset(new internal::AppListController); + app_list_controller_.reset(new AppListController); app_list_controller_->SetVisible(!app_list_controller_->IsVisible(), window); } @@ -303,7 +303,7 @@ bool Shell::IsSystemModalWindowOpen() const { if (simulate_modal_window_open_for_testing_) return true; const std::vector<aura::Window*> containers = GetContainersFromAllRootWindows( - internal::kShellWindowId_SystemModalContainer, NULL); + kShellWindowId_SystemModalContainer, NULL); for (std::vector<aura::Window*>::const_iterator cit = containers.begin(); cit != containers.end(); ++cit) { for (aura::Window::Windows::const_iterator wit = (*cit)->children().begin(); @@ -324,9 +324,8 @@ views::NonClientFrameView* Shell::CreateDefaultNonClientFrameView( } void Shell::RotateFocus(Direction direction) { - focus_cycler_->RotateFocus( - direction == FORWARD ? internal::FocusCycler::FORWARD : - internal::FocusCycler::BACKWARD); + focus_cycler_->RotateFocus(direction == FORWARD ? FocusCycler::FORWARD + : FocusCycler::BACKWARD); } void Shell::SetDisplayWorkAreaInsets(Window* contains, @@ -365,8 +364,7 @@ void Shell::OnLockStateChanged(bool locked) { // Make sure that there is no system modal in Lock layer when unlocked. if (!locked) { std::vector<aura::Window*> containers = GetContainersFromAllRootWindows( - internal::kShellWindowId_LockSystemModalContainer, - GetPrimaryRootWindow()); + kShellWindowId_LockSystemModalContainer, GetPrimaryRootWindow()); for (std::vector<aura::Window*>::const_iterator iter = containers.begin(); iter != containers.end(); ++iter) { DCHECK_EQ(0u, (*iter)->children().size()); @@ -446,8 +444,7 @@ void Shell::RemoveShellObserver(ShellObserver* observer) { void Shell::EnableMaximizeModeWindowManager(bool enable) { if (enable && !maximize_mode_window_manager_.get()) { - maximize_mode_window_manager_.reset( - new internal::MaximizeModeWindowManager()); + maximize_mode_window_manager_.reset(new MaximizeModeWindowManager()); } else if (!enable && maximize_mode_window_manager_.get()) { maximize_mode_window_manager_.reset(); } @@ -467,28 +464,26 @@ void Shell::UpdateShelfVisibility() { void Shell::SetShelfAutoHideBehavior(ShelfAutoHideBehavior behavior, aura::Window* root_window) { - ash::internal::ShelfLayoutManager::ForShelf(root_window)-> - SetAutoHideBehavior(behavior); + ash::ShelfLayoutManager::ForShelf(root_window)->SetAutoHideBehavior(behavior); } ShelfAutoHideBehavior Shell::GetShelfAutoHideBehavior( aura::Window* root_window) const { - return ash::internal::ShelfLayoutManager::ForShelf(root_window)-> - auto_hide_behavior(); + return ash::ShelfLayoutManager::ForShelf(root_window)->auto_hide_behavior(); } void Shell::SetShelfAlignment(ShelfAlignment alignment, aura::Window* root_window) { - if (ash::internal::ShelfLayoutManager::ForShelf(root_window)-> - SetAlignment(alignment)) { + if (ash::ShelfLayoutManager::ForShelf(root_window)->SetAlignment(alignment)) { FOR_EACH_OBSERVER( ShellObserver, observers_, OnShelfAlignmentChanged(root_window)); } } ShelfAlignment Shell::GetShelfAlignment(aura::Window* root_window) { - return internal::GetRootWindowController(root_window)-> - GetShelfLayoutManager()->GetAlignment(); + return GetRootWindowController(root_window) + ->GetShelfLayoutManager() + ->GetAlignment(); } void Shell::SetDimming(bool should_dim) { @@ -506,7 +501,7 @@ void Shell::NotifyFullscreenStateChange(bool is_fullscreen, void Shell::CreateModalBackground(aura::Window* window) { if (!modality_filter_) { - modality_filter_.reset(new internal::SystemModalContainerEventFilter(this)); + modality_filter_.reset(new SystemModalContainerEventFilter(this)); AddPreTargetHandler(modality_filter_.get()); } RootWindowControllerList controllers = GetAllRootWindowControllers(); @@ -554,8 +549,7 @@ ShelfDelegate* Shell::GetShelfDelegate() { new ShelfItemDelegateManager(shelf_model_.get())); shelf_delegate_.reset(delegate_->CreateShelfDelegate(shelf_model_.get())); - scoped_ptr<ShelfItemDelegate> controller( - new internal::AppListShelfItemDelegate); + scoped_ptr<ShelfItemDelegate> controller(new AppListShelfItemDelegate); // Finding the shelf model's location of the app list and setting its // ShelfItemDelegate. @@ -565,9 +559,8 @@ ShelfDelegate* Shell::GetShelfDelegate() { DCHECK(app_list_id); shelf_item_delegate_manager_->SetShelfItemDelegate(app_list_id, controller.Pass()); - shelf_window_watcher_.reset(new internal::ShelfWindowWatcher( - shelf_model_.get(), - shelf_item_delegate_manager_.get())); + shelf_window_watcher_.reset(new ShelfWindowWatcher( + shelf_model_.get(), shelf_item_delegate_manager_.get())); } return shelf_delegate_.get(); } @@ -618,14 +611,14 @@ Shell::Shell(ShellDelegate* delegate) is_touch_hud_projection_enabled_(false) { DCHECK(delegate_.get()); gpu_support_.reset(delegate_->CreateGPUSupport()); - display_manager_.reset(new internal::DisplayManager); + display_manager_.reset(new DisplayManager); display_controller_.reset(new DisplayController); #if defined(OS_CHROMEOS) && defined(USE_X11) user_metrics_recorder_.reset(new UserMetricsRecorder); #endif // defined(OS_CHROMEOS) #if defined(OS_CHROMEOS) - internal::PowerStatus::Initialize(); + PowerStatus::Initialize(); #endif } @@ -777,7 +770,7 @@ Shell::~Shell() { #endif // defined(OS_CHROMEOS) #if defined(OS_CHROMEOS) - internal::PowerStatus::Shutdown(); + PowerStatus::Shutdown(); #endif DCHECK(instance_ == this); @@ -787,25 +780,23 @@ Shell::~Shell() { void Shell::Init() { delegate_->PreInit(); if (keyboard::IsKeyboardUsabilityExperimentEnabled()) { - display_manager_->SetSecondDisplayMode( - internal::DisplayManager::VIRTUAL_KEYBOARD); + display_manager_->SetSecondDisplayMode(DisplayManager::VIRTUAL_KEYBOARD); } bool display_initialized = display_manager_->InitFromCommandLine(); #if defined(OS_CHROMEOS) output_configurator_->Init(!gpu_support_->IsPanelFittingDisabled()); - output_configurator_animation_.reset( - new internal::OutputConfiguratorAnimation()); + output_configurator_animation_.reset(new OutputConfiguratorAnimation()); output_configurator_->AddObserver(output_configurator_animation_.get()); - projecting_observer_.reset(new internal::ProjectingObserver()); + projecting_observer_.reset(new ProjectingObserver()); output_configurator_->AddObserver(projecting_observer_.get()); if (!display_initialized && base::SysInfo::IsRunningOnChromeOS()) { - display_change_observer_.reset(new internal::DisplayChangeObserver); + display_change_observer_.reset(new DisplayChangeObserver); // Register |display_change_observer_| first so that the rest of // observer gets invoked after the root windows are configured. output_configurator_->AddObserver(display_change_observer_.get()); - display_error_observer_.reset(new internal::DisplayErrorObserver()); + display_error_observer_.reset(new DisplayErrorObserver()); output_configurator_->AddObserver(display_error_observer_.get()); output_configurator_->set_state_controller(display_change_observer_.get()); output_configurator_->set_mirroring_controller(display_manager_.get()); @@ -842,9 +833,9 @@ void Shell::Init() { focus_client_.reset(focus_controller); activation_client_ = focus_controller; activation_client_->AddObserver(this); - focus_cycler_.reset(new internal::FocusCycler()); + focus_cycler_.reset(new FocusCycler()); - screen_position_controller_.reset(new internal::ScreenPositionController); + screen_position_controller_.reset(new ScreenPositionController); window_tree_host_factory_.reset(delegate_->CreateWindowTreeHostFactory()); display_controller_->Start(); @@ -854,7 +845,7 @@ void Shell::Init() { #if defined(OS_CHROMEOS) resolution_notification_controller_.reset( - new internal::ResolutionNotificationController); + new ResolutionNotificationController); #endif cursor_manager_.SetDisplay(GetScreen()->GetPrimaryDisplay()); @@ -883,7 +874,7 @@ void Shell::Init() { user_activity_detector_.reset(new ::wm::UserActivityDetector); AddPreTargetHandler(user_activity_detector_.get()); - overlay_filter_.reset(new internal::OverlayEventFilter); + overlay_filter_.reset(new OverlayEventFilter); AddPreTargetHandler(overlay_filter_.get()); AddShellObserver(overlay_filter_.get()); @@ -891,18 +882,18 @@ void Shell::Init() { root_window->GetHost()->GetAcceleratedWidget())); AddPreTargetHandler(input_method_filter_.get()); - accelerator_filter_.reset(new internal::AcceleratorFilter); + accelerator_filter_.reset(new AcceleratorFilter); AddPreTargetHandler(accelerator_filter_.get()); - event_transformation_handler_.reset(new internal::EventTransformationHandler); + event_transformation_handler_.reset(new EventTransformationHandler); AddPreTargetHandler(event_transformation_handler_.get()); toplevel_window_event_handler_.reset(new ToplevelWindowEventHandler); - system_gesture_filter_.reset(new internal::SystemGestureEventFilter); + system_gesture_filter_.reset(new SystemGestureEventFilter); AddPreTargetHandler(system_gesture_filter_.get()); - keyboard_metrics_filter_.reset(new internal::KeyboardUMAEventFilter); + keyboard_metrics_filter_.reset(new KeyboardUMAEventFilter); AddPreTargetHandler(keyboard_metrics_filter_.get()); // The keyboard system must be initialized before the RootWindowController is @@ -921,8 +912,8 @@ void Shell::Init() { #endif AddShellObserver(lock_state_controller_.get()); - drag_drop_controller_.reset(new internal::DragDropController); - mouse_cursor_filter_.reset(new internal::MouseCursorEventFilter()); + drag_drop_controller_.reset(new DragDropController); + mouse_cursor_filter_.reset(new MouseCursorEventFilter()); PrependPreTargetHandler(mouse_cursor_filter_.get()); // Create Controllers that may need root window. @@ -949,7 +940,7 @@ void Shell::Init() { new views::corewm::TooltipAura(gfx::SCREEN_TYPE_ALTERNATE)))); AddPreTargetHandler(tooltip_controller_.get()); - event_client_.reset(new internal::EventClientImpl); + event_client_.reset(new EventClientImpl); // This controller needs to be set before SetupManagedWindowMode. desktop_background_controller_.reset(new DesktopBackgroundController()); @@ -960,7 +951,7 @@ void Shell::Init() { new_window_delegate_.reset(delegate_->CreateNewWindowDelegate()); media_delegate_.reset(delegate_->CreateMediaDelegate()); - resize_shadow_controller_.reset(new internal::ResizeShadowController()); + resize_shadow_controller_.reset(new ResizeShadowController()); shadow_controller_.reset( new ::wm::ShadowController(activation_client_)); @@ -971,25 +962,22 @@ void Shell::Init() { system_tray_delegate_.reset(delegate()->CreateSystemTrayDelegate()); DCHECK(system_tray_delegate_.get()); - locale_notification_controller_.reset( - new internal::LocaleNotificationController); + locale_notification_controller_.reset(new LocaleNotificationController); // Initialize system_tray_delegate_ after StatusAreaWidget is created. system_tray_delegate_->Initialize(); #if defined(OS_CHROMEOS) // Create the LogoutConfirmationController after the SystemTrayDelegate. - logout_confirmation_controller_.reset( - new internal::LogoutConfirmationController( - base::Bind(&SystemTrayDelegate::SignOut, - base::Unretained(system_tray_delegate_.get())))); + logout_confirmation_controller_.reset(new LogoutConfirmationController( + base::Bind(&SystemTrayDelegate::SignOut, + base::Unretained(system_tray_delegate_.get())))); #endif // TODO(oshima): Initialize all RootWindowControllers once, and // initialize controller/delegates above when initializing the // primary root window controller. - internal::RootWindowController::CreateForPrimaryDisplay( - root_window->GetHost()); + RootWindowController::CreateForPrimaryDisplay(root_window->GetHost()); display_controller_->InitSecondaryDisplays(); @@ -1010,26 +998,23 @@ void Shell::Init() { scoped_ptr<ash::BrightnessControlDelegate>( new ash::system::BrightnessControllerChromeos).Pass()); - power_event_observer_.reset(new internal::PowerEventObserver()); + power_event_observer_.reset(new PowerEventObserver()); user_activity_notifier_.reset( - new internal::UserActivityNotifier(user_activity_detector_.get())); + new UserActivityNotifier(user_activity_detector_.get())); video_activity_notifier_.reset( - new internal::VideoActivityNotifier(video_detector_.get())); - bluetooth_notification_controller_.reset( - new internal::BluetoothNotificationController); - last_window_closed_logout_reminder_.reset( - new internal::LastWindowClosedLogoutReminder); + new VideoActivityNotifier(video_detector_.get())); + bluetooth_notification_controller_.reset(new BluetoothNotificationController); + last_window_closed_logout_reminder_.reset(new LastWindowClosedLogoutReminder); #endif weak_display_manager_factory_.reset( - new base::WeakPtrFactory<internal::DisplayManager>( - display_manager_.get())); + new base::WeakPtrFactory<DisplayManager>(display_manager_.get())); // The compositor thread and main message loop have to be running in // order to create mirror window. Run it after the main message loop // is started. base::MessageLoopForUI::current()->PostTask( FROM_HERE, - base::Bind(&internal::DisplayManager::CreateMirrorWindowIfAny, + base::Bind(&DisplayManager::CreateMirrorWindowIfAny, weak_display_manager_factory_->GetWeakPtr())); } @@ -1083,7 +1068,7 @@ bool Shell::CanWindowReceiveEvents(aura::Window* window) { RootWindowControllerList controllers = GetAllRootWindowControllers(); for (RootWindowControllerList::iterator iter = controllers.begin(); iter != controllers.end(); ++iter) { - internal::SystemModalContainerLayoutManager* layout_manager = + SystemModalContainerLayoutManager* layout_manager = (*iter)->GetSystemModalLayoutManager(window); if (layout_manager && layout_manager->CanWindowReceiveEvents(window)) return true; diff --git a/ash/shell.h b/ash/shell.h index 20019ee..bc84e18 100644 --- a/ash/shell.h +++ b/ash/shell.h @@ -76,80 +76,78 @@ namespace ash { class AcceleratorController; class AccelerometerController; +class AcceleratorFilter; class AccessibilityDelegate; +class AppListController; class AshNativeCursorManager; class AutoclickController; -class DesktopBackgroundController; -class DisplayController; -class FirstRunHelper; -class GPUSupport; -class HighContrastController; -class LockStateController; -class MagnificationController; -class MediaDelegate; -class MruWindowTracker; -class NestedDispatcherController; -class NewWindowDelegate; -class PartialMagnificationController; -class PowerButtonController; -class WindowTreeHostFactory; -class ScreenAsh; -class SessionStateDelegate; -class Shelf; -class ShelfDelegate; -class ShelfItemDelegateManager; -class ShelfModel; -class ShellDelegate; -class ShellObserver; -class StickyKeysController; -class SystemTray; -class SystemTrayDelegate; -class SystemTrayNotifier; -class ToplevelWindowEventHandler; -class UserWallpaperDelegate; -class VideoDetector; -class WebNotificationTray; -class WindowCycleController; -class WindowPositioner; -class WindowSelectorController; - -namespace internal { -class AcceleratorFilter; -class AppListController; class BluetoothNotificationController; class CaptureController; +class DesktopBackgroundController; class DisplayChangeObserver; +class DisplayController; class DisplayErrorObserver; class DisplayManager; class DragDropController; class EventClientImpl; class EventRewriterEventFilter; class EventTransformationHandler; +class FirstRunHelper; class FocusCycler; +class GPUSupport; +class HighContrastController; class KeyboardUMAEventFilter; class LastWindowClosedLogoutReminder; class LocaleNotificationController; +class LockStateController; class LogoutConfirmationController; +class MagnificationController; class MaximizeModeWindowManager; +class MediaDelegate; class MouseCursorEventFilter; +class MruWindowTracker; +class NestedDispatcherController; +class NewWindowDelegate; class OutputConfiguratorAnimation; class OverlayEventFilter; +class PartialMagnificationController; +class PowerButtonController; class PowerEventObserver; class ProjectingObserver; class ResizeShadowController; class ResolutionNotificationController; class RootWindowController; class ScopedTargetRootWindow; +class ScreenAsh; class ScreenPositionController; +class SessionStateDelegate; +class Shelf; +class ShelfDelegate; +class ShelfItemDelegateManager; +class ShelfModel; class ShelfWindowWatcher; +class ShellDelegate; +class ShellObserver; class SlowAnimationEventFilter; class StatusAreaWidget; +class StickyKeysController; class SystemGestureEventFilter; class SystemModalContainerEventFilter; +class SystemTray; +class SystemTrayDelegate; +class SystemTrayNotifier; +class ToplevelWindowEventHandler; class TouchObserverHUD; +class UserActivityDetector; class UserActivityNotifier; +class UserWallpaperDelegate; class VideoActivityNotifier; -} +class VideoDetector; +class WebNotificationTray; +class WindowCycleController; +class WindowPositioner; +class WindowSelectorController; +class WindowTreeHostFactory; namespace shell { class WindowWatcher; @@ -164,12 +162,11 @@ class ShellTestApi; // // Upon creation, the Shell sets itself as the RootWindow's delegate, which // takes ownership of the Shell. -class ASH_EXPORT Shell - : public internal::SystemModalContainerEventFilterDelegate, - public ui::EventTarget, - public aura::client::ActivationChangeObserver { +class ASH_EXPORT Shell : public SystemModalContainerEventFilterDelegate, + public ui::EventTarget, + public aura::client::ActivationChangeObserver { public: - typedef std::vector<internal::RootWindowController*> RootWindowControllerList; + typedef std::vector<RootWindowController*> RootWindowControllerList; enum Direction { FORWARD, @@ -191,7 +188,7 @@ class ASH_EXPORT Shell // Returns the root window controller for the primary root window. // TODO(oshima): move this to |RootWindowController| - static internal::RootWindowController* GetPrimaryRootWindowController(); + static RootWindowController* GetPrimaryRootWindowController(); // Returns all root window controllers. // TODO(oshima): move this to |RootWindowController| @@ -338,9 +335,7 @@ class ASH_EXPORT Shell return accelerator_controller_.get(); } - internal::DisplayManager* display_manager() { - return display_manager_.get(); - } + DisplayManager* display_manager() { return display_manager_.get(); } ::wm::InputMethodEventFilter* input_method_filter() { return input_method_filter_.get(); } @@ -350,9 +345,7 @@ class ASH_EXPORT Shell views::corewm::TooltipController* tooltip_controller() { return tooltip_controller_.get(); } - internal::OverlayEventFilter* overlay_filter() { - return overlay_filter_.get(); - } + OverlayEventFilter* overlay_filter() { return overlay_filter_.get(); } DesktopBackgroundController* desktop_background_controller() { return desktop_background_controller_.get(); } @@ -374,16 +367,14 @@ class ASH_EXPORT Shell WindowSelectorController* window_selector_controller() { return window_selector_controller_.get(); } - internal::FocusCycler* focus_cycler() { - return focus_cycler_.get(); - } + FocusCycler* focus_cycler() { return focus_cycler_.get(); } DisplayController* display_controller() { return display_controller_.get(); } - internal::MouseCursorEventFilter* mouse_cursor_filter() { + MouseCursorEventFilter* mouse_cursor_filter() { return mouse_cursor_filter_.get(); } - internal::EventTransformationHandler* event_transformation_handler() { + EventTransformationHandler* event_transformation_handler() { return event_transformation_handler_.get(); } ::wm::CursorManager* cursor_manager() { return &cursor_manager_; } @@ -489,7 +480,7 @@ class ASH_EXPORT Shell initially_hide_cursor_ = hide; } - internal::ResizeShadowController* resize_shadow_controller() { + ResizeShadowController* resize_shadow_controller() { return resize_shadow_controller_.get(); } @@ -510,19 +501,18 @@ class ASH_EXPORT Shell ui::OutputConfigurator* output_configurator() { return output_configurator_.get(); } - internal::OutputConfiguratorAnimation* output_configurator_animation() { + OutputConfiguratorAnimation* output_configurator_animation() { return output_configurator_animation_.get(); } - internal::DisplayErrorObserver* display_error_observer() { + DisplayErrorObserver* display_error_observer() { return display_error_observer_.get(); } - internal::ResolutionNotificationController* - resolution_notification_controller() { + ResolutionNotificationController* resolution_notification_controller() { return resolution_notification_controller_.get(); } - internal::LogoutConfirmationController* logout_confirmation_controller() { + LogoutConfirmationController* logout_confirmation_controller() { return logout_confirmation_controller_.get(); } #endif // defined(OS_CHROMEOS) @@ -572,8 +562,8 @@ class ASH_EXPORT Shell FRIEND_TEST_ALL_PREFIXES(ExtendedDesktopTest, TestCursor); FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, MouseEventCursors); FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, TransformActivate); - friend class internal::RootWindowController; - friend class internal::ScopedTargetRootWindow; + friend class RootWindowController; + friend class ScopedTargetRootWindow; friend class test::ShellTestApi; friend class shell::WindowWatcher; @@ -591,7 +581,7 @@ class ASH_EXPORT Shell // Initializes the root window so that it can host browser windows. void InitRootWindow(aura::Window* root_window); - // ash::internal::SystemModalContainerEventFilterDelegate overrides: + // ash::SystemModalContainerEventFilterDelegate overrides: virtual bool CanWindowReceiveEvents(aura::Window* window) OVERRIDE; // Overridden from ui::EventTarget: @@ -637,15 +627,15 @@ class ASH_EXPORT Shell scoped_ptr<MediaDelegate> media_delegate_; scoped_ptr<ShelfDelegate> shelf_delegate_; scoped_ptr<ShelfItemDelegateManager> shelf_item_delegate_manager_; - scoped_ptr<internal::ShelfWindowWatcher> shelf_window_watcher_; + scoped_ptr<ShelfWindowWatcher> shelf_window_watcher_; scoped_ptr<ShelfModel> shelf_model_; scoped_ptr<WindowPositioner> window_positioner_; - scoped_ptr<internal::AppListController> app_list_controller_; + scoped_ptr<AppListController> app_list_controller_; - scoped_ptr<internal::DragDropController> drag_drop_controller_; - scoped_ptr<internal::ResizeShadowController> resize_shadow_controller_; + scoped_ptr<DragDropController> drag_drop_controller_; + scoped_ptr<ResizeShadowController> resize_shadow_controller_; scoped_ptr< ::wm::ShadowController> shadow_controller_; scoped_ptr< ::wm::VisibilityController> visibility_controller_; scoped_ptr< ::wm::WindowModalityController> window_modality_controller_; @@ -657,7 +647,7 @@ class ASH_EXPORT Shell scoped_ptr< ::wm::UserActivityDetector> user_activity_detector_; scoped_ptr<VideoDetector> video_detector_; scoped_ptr<WindowSelectorController> window_selector_controller_; - scoped_ptr<internal::FocusCycler> focus_cycler_; + scoped_ptr<FocusCycler> focus_cycler_; scoped_ptr<DisplayController> display_controller_; scoped_ptr<HighContrastController> high_contrast_controller_; scoped_ptr<MagnificationController> magnification_controller_; @@ -665,67 +655,63 @@ class ASH_EXPORT Shell scoped_ptr<AutoclickController> autoclick_controller_; scoped_ptr<aura::client::FocusClient> focus_client_; aura::client::ActivationClient* activation_client_; - scoped_ptr<internal::MouseCursorEventFilter> mouse_cursor_filter_; - scoped_ptr<internal::ScreenPositionController> screen_position_controller_; - scoped_ptr<internal::SystemModalContainerEventFilter> modality_filter_; - scoped_ptr<internal::EventClientImpl> event_client_; - scoped_ptr<internal::EventTransformationHandler> - event_transformation_handler_; + scoped_ptr<MouseCursorEventFilter> mouse_cursor_filter_; + scoped_ptr<ScreenPositionController> screen_position_controller_; + scoped_ptr<SystemModalContainerEventFilter> modality_filter_; + scoped_ptr<EventClientImpl> event_client_; + scoped_ptr<EventTransformationHandler> event_transformation_handler_; scoped_ptr<WindowTreeHostFactory> window_tree_host_factory_; // An event filter that pre-handles key events while the partial // screenshot UI or the keyboard overlay is active. - scoped_ptr<internal::OverlayEventFilter> overlay_filter_; + scoped_ptr<OverlayEventFilter> overlay_filter_; // An event filter for logging keyboard-related metrics. - scoped_ptr<internal::KeyboardUMAEventFilter> keyboard_metrics_filter_; + scoped_ptr<KeyboardUMAEventFilter> keyboard_metrics_filter_; // An event filter which handles moving and resizing windows. scoped_ptr<ToplevelWindowEventHandler> toplevel_window_event_handler_; // An event filter which handles system level gestures - scoped_ptr<internal::SystemGestureEventFilter> system_gesture_filter_; + scoped_ptr<SystemGestureEventFilter> system_gesture_filter_; // An event filter that pre-handles global accelerators. - scoped_ptr<internal::AcceleratorFilter> accelerator_filter_; + scoped_ptr<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<internal::DisplayManager> display_manager_; - scoped_ptr<base::WeakPtrFactory<internal::DisplayManager> > + scoped_ptr<DisplayManager> display_manager_; + scoped_ptr<base::WeakPtrFactory<DisplayManager> > weak_display_manager_factory_; - scoped_ptr<internal::LocaleNotificationController> - locale_notification_controller_; + scoped_ptr<LocaleNotificationController> locale_notification_controller_; // The maximized window manager (if enabled). - scoped_ptr<internal::MaximizeModeWindowManager> maximize_mode_window_manager_; + scoped_ptr<MaximizeModeWindowManager> maximize_mode_window_manager_; scoped_ptr<AccelerometerController> accelerometer_controller_; #if defined(OS_CHROMEOS) - scoped_ptr<internal::PowerEventObserver> power_event_observer_; - scoped_ptr<internal::UserActivityNotifier> user_activity_notifier_; - scoped_ptr<internal::VideoActivityNotifier> video_activity_notifier_; + scoped_ptr<PowerEventObserver> power_event_observer_; + scoped_ptr<UserActivityNotifier> user_activity_notifier_; + scoped_ptr<VideoActivityNotifier> video_activity_notifier_; scoped_ptr<StickyKeysController> sticky_keys_controller_; - scoped_ptr<internal::ResolutionNotificationController> + scoped_ptr<ResolutionNotificationController> resolution_notification_controller_; - scoped_ptr<internal::BluetoothNotificationController> + scoped_ptr<BluetoothNotificationController> bluetooth_notification_controller_; - scoped_ptr<internal::LogoutConfirmationController> - logout_confirmation_controller_; - scoped_ptr<internal::LastWindowClosedLogoutReminder> + scoped_ptr<LogoutConfirmationController> logout_confirmation_controller_; + scoped_ptr<LastWindowClosedLogoutReminder> last_window_closed_logout_reminder_; // Controls video output device state. scoped_ptr<ui::OutputConfigurator> output_configurator_; - scoped_ptr<internal::OutputConfiguratorAnimation> - output_configurator_animation_; - scoped_ptr<internal::DisplayErrorObserver> display_error_observer_; - scoped_ptr<internal::ProjectingObserver> projecting_observer_; + scoped_ptr<OutputConfiguratorAnimation> output_configurator_animation_; + scoped_ptr<DisplayErrorObserver> display_error_observer_; + scoped_ptr<ProjectingObserver> projecting_observer_; // Listens for output changes and updates the display manager. - scoped_ptr<internal::DisplayChangeObserver> display_change_observer_; + scoped_ptr<DisplayChangeObserver> display_change_observer_; #if defined(USE_X11) scoped_ptr<ui::EventHandler> magnifier_key_scroll_handler_; diff --git a/ash/shell/lock_view.cc b/ash/shell/lock_view.cc index 2cdb4b7..eae9d9c 100644 --- a/ash/shell/lock_view.cc +++ b/ash/shell/lock_view.cc @@ -94,9 +94,8 @@ void CreateLockScreen() { (root_window_size.height() - ps.height()) / 2, ps.width(), ps.height()); params.delegate = lock_view; - params.parent = Shell::GetContainer( - Shell::GetPrimaryRootWindow(), - internal::kShellWindowId_LockScreenContainer); + params.parent = Shell::GetContainer(Shell::GetPrimaryRootWindow(), + kShellWindowId_LockScreenContainer); widget->Init(params); widget->SetContentsView(lock_view); widget->Show(); diff --git a/ash/shell/shell_delegate_impl.cc b/ash/shell/shell_delegate_impl.cc index 4efd104..2b6ccc4 100644 --- a/ash/shell/shell_delegate_impl.cc +++ b/ash/shell/shell_delegate_impl.cc @@ -139,7 +139,7 @@ ash::SessionStateDelegate* ShellDelegateImpl::CreateSessionStateDelegate() { } ash::AccessibilityDelegate* ShellDelegateImpl::CreateAccessibilityDelegate() { - return new internal::DefaultAccessibilityDelegate; + return new DefaultAccessibilityDelegate; } ash::NewWindowDelegate* ShellDelegateImpl::CreateNewWindowDelegate() { diff --git a/ash/shell/window_watcher.cc b/ash/shell/window_watcher.cc index 075d4a3..55231cf 100644 --- a/ash/shell/window_watcher.cc +++ b/ash/shell/window_watcher.cc @@ -38,9 +38,8 @@ class WindowWatcher::WorkspaceWindowWatcher : public aura::WindowObserver { } void RootWindowAdded(aura::Window* root) { - aura::Window* panel_container = ash::Shell::GetContainer( - root, - internal::kShellWindowId_PanelContainer); + aura::Window* panel_container = + ash::Shell::GetContainer(root, kShellWindowId_PanelContainer); panel_container->AddObserver(watcher_); aura::Window* container = @@ -51,9 +50,8 @@ class WindowWatcher::WorkspaceWindowWatcher : public aura::WindowObserver { } void RootWindowRemoved(aura::Window* root) { - aura::Window* panel_container = ash::Shell::GetContainer( - root, - internal::kShellWindowId_PanelContainer); + aura::Window* panel_container = + ash::Shell::GetContainer(root, kShellWindowId_PanelContainer); panel_container->RemoveObserver(watcher_); aura::Window* container = diff --git a/ash/shell_factory.h b/ash/shell_factory.h index 041c4c1..b990e95 100644 --- a/ash/shell_factory.h +++ b/ash/shell_factory.h @@ -24,12 +24,10 @@ class Widget; namespace ash { -namespace internal { views::Widget* CreateDesktopBackground(aura::Window* root_window, int container_id); ASH_EXPORT views::Widget* CreateStatusArea(views::View* contents); -} // namespace internal } // namespace ash diff --git a/ash/shell_unittest.cc b/ash/shell_unittest.cc index 781b32a..343bd1d 100644 --- a/ash/shell_unittest.cc +++ b/ash/shell_unittest.cc @@ -45,53 +45,47 @@ namespace ash { namespace { aura::Window* GetDefaultContainer() { - return Shell::GetContainer( - Shell::GetPrimaryRootWindow(), - internal::kShellWindowId_DefaultContainer); + return Shell::GetContainer(Shell::GetPrimaryRootWindow(), + kShellWindowId_DefaultContainer); } aura::Window* GetAlwaysOnTopContainer() { - return Shell::GetContainer( - Shell::GetPrimaryRootWindow(), - internal::kShellWindowId_AlwaysOnTopContainer); + return Shell::GetContainer(Shell::GetPrimaryRootWindow(), + kShellWindowId_AlwaysOnTopContainer); } // Expect ALL the containers! void ExpectAllContainers() { aura::Window* root_window = Shell::GetPrimaryRootWindow(); + EXPECT_TRUE(Shell::GetContainer(root_window, + kShellWindowId_DesktopBackgroundContainer)); + EXPECT_TRUE( + Shell::GetContainer(root_window, kShellWindowId_DefaultContainer)); + EXPECT_TRUE( + Shell::GetContainer(root_window, kShellWindowId_AlwaysOnTopContainer)); + EXPECT_TRUE(Shell::GetContainer(root_window, kShellWindowId_PanelContainer)); + EXPECT_TRUE(Shell::GetContainer(root_window, kShellWindowId_ShelfContainer)); + EXPECT_TRUE( + Shell::GetContainer(root_window, kShellWindowId_SystemModalContainer)); EXPECT_TRUE(Shell::GetContainer( - root_window, internal::kShellWindowId_DesktopBackgroundContainer)); + root_window, kShellWindowId_LockScreenBackgroundContainer)); + EXPECT_TRUE( + Shell::GetContainer(root_window, kShellWindowId_LockScreenContainer)); + EXPECT_TRUE(Shell::GetContainer(root_window, + kShellWindowId_LockSystemModalContainer)); + EXPECT_TRUE(Shell::GetContainer(root_window, kShellWindowId_StatusContainer)); + EXPECT_TRUE(Shell::GetContainer(root_window, kShellWindowId_MenuContainer)); + EXPECT_TRUE(Shell::GetContainer(root_window, + kShellWindowId_DragImageAndTooltipContainer)); + EXPECT_TRUE( + Shell::GetContainer(root_window, kShellWindowId_SettingBubbleContainer)); + EXPECT_TRUE( + Shell::GetContainer(root_window, kShellWindowId_OverlayContainer)); EXPECT_TRUE(Shell::GetContainer( - root_window, internal::kShellWindowId_DefaultContainer)); - EXPECT_TRUE(Shell::GetContainer( - root_window, internal::kShellWindowId_AlwaysOnTopContainer)); - EXPECT_TRUE(Shell::GetContainer( - root_window, internal::kShellWindowId_PanelContainer)); - EXPECT_TRUE(Shell::GetContainer( - root_window, internal::kShellWindowId_ShelfContainer)); - EXPECT_TRUE(Shell::GetContainer( - root_window, internal::kShellWindowId_SystemModalContainer)); - EXPECT_TRUE(Shell::GetContainer( - root_window, internal::kShellWindowId_LockScreenBackgroundContainer)); - EXPECT_TRUE(Shell::GetContainer( - root_window, internal::kShellWindowId_LockScreenContainer)); - EXPECT_TRUE(Shell::GetContainer( - root_window, internal::kShellWindowId_LockSystemModalContainer)); - EXPECT_TRUE(Shell::GetContainer( - root_window, internal::kShellWindowId_StatusContainer)); - EXPECT_TRUE(Shell::GetContainer( - root_window, internal::kShellWindowId_MenuContainer)); - EXPECT_TRUE(Shell::GetContainer( - root_window, internal::kShellWindowId_DragImageAndTooltipContainer)); - EXPECT_TRUE(Shell::GetContainer( - root_window, internal::kShellWindowId_SettingBubbleContainer)); - EXPECT_TRUE(Shell::GetContainer( - root_window, internal::kShellWindowId_OverlayContainer)); - EXPECT_TRUE(Shell::GetContainer( - root_window, internal::kShellWindowId_VirtualKeyboardParentContainer)); + root_window, kShellWindowId_VirtualKeyboardParentContainer)); #if defined(OS_CHROMEOS) - EXPECT_TRUE(Shell::GetContainer( - root_window, internal::kShellWindowId_MouseCursorContainer)); + EXPECT_TRUE( + Shell::GetContainer(root_window, kShellWindowId_MouseCursorContainer)); #endif } @@ -186,10 +180,9 @@ class ShellTest : public test::AshTestBase { Shell::GetInstance()->session_state_delegate(); delegate->LockScreen(); views::Widget* lock_widget = CreateTestWindow(widget_params); - ash::Shell::GetContainer( - Shell::GetPrimaryRootWindow(), - ash::internal::kShellWindowId_LockScreenContainer)-> - AddChild(lock_widget->GetNativeView()); + ash::Shell::GetContainer(Shell::GetPrimaryRootWindow(), + ash::kShellWindowId_LockScreenContainer) + ->AddChild(lock_widget->GetNativeView()); lock_widget->Show(); EXPECT_TRUE(delegate->IsScreenLocked()); EXPECT_TRUE(lock_widget->GetNativeView()->HasFocus()); @@ -274,8 +267,7 @@ TEST_F(ShellTest, CreateModalWindow) { // It should be in modal container. aura::Window* modal_container = Shell::GetContainer( - Shell::GetPrimaryRootWindow(), - internal::kShellWindowId_SystemModalContainer); + Shell::GetPrimaryRootWindow(), kShellWindowId_SystemModalContainer); EXPECT_EQ(modal_container, modal_widget->GetNativeWindow()->parent()); modal_widget->Close(); @@ -308,17 +300,15 @@ TEST_F(ShellTest, CreateLockScreenModalWindow) { Shell::GetInstance()->session_state_delegate()->LockScreen(); // Create a LockScreen window. views::Widget* lock_widget = CreateTestWindow(widget_params); - ash::Shell::GetContainer( - Shell::GetPrimaryRootWindow(), - ash::internal::kShellWindowId_LockScreenContainer)-> - AddChild(lock_widget->GetNativeView()); + ash::Shell::GetContainer(Shell::GetPrimaryRootWindow(), + ash::kShellWindowId_LockScreenContainer) + ->AddChild(lock_widget->GetNativeView()); lock_widget->Show(); EXPECT_TRUE(lock_widget->GetNativeView()->HasFocus()); // It should be in LockScreen container. aura::Window* lock_screen = Shell::GetContainer( - Shell::GetPrimaryRootWindow(), - ash::internal::kShellWindowId_LockScreenContainer); + Shell::GetPrimaryRootWindow(), ash::kShellWindowId_LockScreenContainer); EXPECT_EQ(lock_screen, lock_widget->GetNativeWindow()->parent()); // Create a modal window with a lock window as parent. @@ -328,9 +318,9 @@ TEST_F(ShellTest, CreateLockScreenModalWindow) { EXPECT_TRUE(lock_modal_widget->GetNativeView()->HasFocus()); // It should be in LockScreen modal container. - aura::Window* lock_modal_container = Shell::GetContainer( - Shell::GetPrimaryRootWindow(), - ash::internal::kShellWindowId_LockSystemModalContainer); + aura::Window* lock_modal_container = + Shell::GetContainer(Shell::GetPrimaryRootWindow(), + ash::kShellWindowId_LockSystemModalContainer); EXPECT_EQ(lock_modal_container, lock_modal_widget->GetNativeWindow()->parent()); @@ -344,8 +334,7 @@ TEST_F(ShellTest, CreateLockScreenModalWindow) { // It should be in non-LockScreen modal container. aura::Window* modal_container = Shell::GetContainer( - Shell::GetPrimaryRootWindow(), - ash::internal::kShellWindowId_SystemModalContainer); + Shell::GetPrimaryRootWindow(), ash::kShellWindowId_SystemModalContainer); EXPECT_EQ(modal_container, modal_widget->GetNativeWindow()->parent()); // Modal dialog without parent, caused crash see crbug.com/226141 @@ -408,9 +397,9 @@ TEST_F(ShellTest, ManagedWindowModeBasics) { shelf_widget->GetWindowBoundsInScreen().bottom()); // We have a desktop background but not a bare layer. // TODO (antrim): enable once we find out why it fails component build. - // internal::DesktopBackgroundWidgetController* background = + // DesktopBackgroundWidgetController* background = // Shell::GetPrimaryRootWindow()-> - // GetProperty(internal::kWindowDesktopComponent); + // GetProperty(kWindowDesktopComponent); // EXPECT_TRUE(background); // EXPECT_TRUE(background->widget()); // EXPECT_FALSE(background->layer()); diff --git a/ash/shell_window_ids.h b/ash/shell_window_ids.h index aedc8b5..a4bd516 100644 --- a/ash/shell_window_ids.h +++ b/ash/shell_window_ids.h @@ -9,10 +9,6 @@ namespace ash { -// TODO: we're using this in random places outside of ash, it shouldn't be in -// internal. -namespace internal { - // A higher-level container that holds all of the containers stacked below // kShellWindowId_LockScreenContainer. Only used by PowerButtonController for // animating lower-level containers. @@ -110,8 +106,6 @@ const int kShellWindowId_MouseCursorContainer = 25; // The topmost container, used for power off animation. const int kShellWindowId_PowerButtonAnimationContainer = 26; -} // namespace internal - } // namespace ash diff --git a/ash/sticky_keys/sticky_keys_overlay.cc b/ash/sticky_keys/sticky_keys_overlay.cc index e91caf4..3bafd39 100644 --- a/ash/sticky_keys/sticky_keys_overlay.cc +++ b/ash/sticky_keys/sticky_keys_overlay.cc @@ -223,9 +223,8 @@ StickyKeysOverlay::StickyKeysOverlay() params.remove_standard_frame = true; params.delegate = overlay_view_; params.bounds = CalculateOverlayBounds(); - params.parent = Shell::GetContainer( - Shell::GetTargetRootWindow(), - internal::kShellWindowId_OverlayContainer); + params.parent = Shell::GetContainer(Shell::GetTargetRootWindow(), + kShellWindowId_OverlayContainer); overlay_widget_.reset(new views::Widget); overlay_widget_->Init(params); overlay_widget_->SetVisibilityChangedAnimationsEnabled(false); diff --git a/ash/switchable_windows.cc b/ash/switchable_windows.cc index 352599b..8d503aa 100644 --- a/ash/switchable_windows.cc +++ b/ash/switchable_windows.cc @@ -10,10 +10,8 @@ namespace ash { const int kSwitchableWindowContainerIds[] = { - internal::kShellWindowId_DefaultContainer, - internal::kShellWindowId_AlwaysOnTopContainer, - internal::kShellWindowId_PanelContainer -}; + kShellWindowId_DefaultContainer, kShellWindowId_AlwaysOnTopContainer, + kShellWindowId_PanelContainer}; const size_t kSwitchableWindowContainerIdsLength = arraysize(kSwitchableWindowContainerIds); diff --git a/ash/system/audio/tray_audio.cc b/ash/system/audio/tray_audio.cc index 9e7c732..194b6c6 100644 --- a/ash/system/audio/tray_audio.cc +++ b/ash/system/audio/tray_audio.cc @@ -40,7 +40,6 @@ #include "ui/views/view.h" namespace ash { -namespace internal { TrayAudio::TrayAudio(SystemTray* system_tray, scoped_ptr<system::TrayAudioDelegate> audio_delegate) @@ -147,5 +146,4 @@ void TrayAudio::Update() { } } -} // namespace internal } // namespace ash diff --git a/ash/system/audio/tray_audio.h b/ash/system/audio/tray_audio.h index 93f99bf..9d76bb9 100644 --- a/ash/system/audio/tray_audio.h +++ b/ash/system/audio/tray_audio.h @@ -15,8 +15,6 @@ namespace system { class TrayAudioDelegate; } -namespace internal { - namespace tray { class VolumeView; } @@ -62,7 +60,6 @@ class TrayAudio : public TrayImageItem, DISALLOW_COPY_AND_ASSIGN(TrayAudio); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_AUDIO_TRAY_AUDIO_H_ diff --git a/ash/system/audio/volume_view.cc b/ash/system/audio/volume_view.cc index 22fc71f..03b3884 100644 --- a/ash/system/audio/volume_view.cc +++ b/ash/system/audio/volume_view.cc @@ -35,7 +35,6 @@ const int kVolumeLevels = 4; } // namespace namespace ash { -namespace internal { namespace tray { class VolumeButton : public views::ToggleImageButton { @@ -328,5 +327,4 @@ bool VolumeView::PerformAction(const ui::Event& event) { } } // namespace tray -} // namespace internal } // namespace ash diff --git a/ash/system/audio/volume_view.h b/ash/system/audio/volume_view.h index a3e8291..167ef45 100644 --- a/ash/system/audio/volume_view.h +++ b/ash/system/audio/volume_view.h @@ -16,19 +16,14 @@ class ImageView; } namespace ash { - +class HoverHighlightView; class SystemTrayItem; namespace system { class TrayAudioDelegate; } -namespace internal { - -class HoverHighlightView; - namespace tray { - class BarSeparator; class VolumeButton; class VolumeSlider; @@ -83,7 +78,6 @@ class VolumeView : public ActionableView, }; } // namespace tray -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_AUDIO_VOLUME_VIEW_H_ diff --git a/ash/system/bluetooth/tray_bluetooth.cc b/ash/system/bluetooth/tray_bluetooth.cc index eb3177e..870ea73 100644 --- a/ash/system/bluetooth/tray_bluetooth.cc +++ b/ash/system/bluetooth/tray_bluetooth.cc @@ -25,10 +25,7 @@ #include "ui/views/layout/box_layout.h" namespace ash { -namespace internal { - namespace tray { - namespace { // Updates bluetooth device |device| in the |list|. If it is new, append to the @@ -465,5 +462,4 @@ void TrayBluetooth::OnBluetoothDiscoveringChanged() { detailed_->Update(); } -} // namespace internal } // namespace ash diff --git a/ash/system/bluetooth/tray_bluetooth.h b/ash/system/bluetooth/tray_bluetooth.h index 2e452c6..1330c3c 100644 --- a/ash/system/bluetooth/tray_bluetooth.h +++ b/ash/system/bluetooth/tray_bluetooth.h @@ -9,8 +9,6 @@ #include "ash/system/tray/system_tray_item.h" namespace ash { -namespace internal { - namespace tray { class BluetoothDefaultView; class BluetoothDetailedView; @@ -42,7 +40,6 @@ class TrayBluetooth : public SystemTrayItem, DISALLOW_COPY_AND_ASSIGN(TrayBluetooth); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_BLUETOOTH_TRAY_BLUETOOTH_H_ diff --git a/ash/system/chromeos/audio/audio_detailed_view.cc b/ash/system/chromeos/audio/audio_detailed_view.cc index 803f4dd..b77c406 100644 --- a/ash/system/chromeos/audio/audio_detailed_view.cc +++ b/ash/system/chromeos/audio/audio_detailed_view.cc @@ -49,7 +49,6 @@ base::string16 GetAudioDeviceName(const chromeos::AudioDevice& device) { using chromeos::CrasAudioHandler; namespace ash { -namespace internal { namespace tray { AudioDetailedView::AudioDetailedView(SystemTrayItem* owner, @@ -173,5 +172,4 @@ void AudioDetailedView::OnViewClicked(views::View* sender) { } } // namespace tray -} // namespace internal } // namespace ash diff --git a/ash/system/chromeos/audio/audio_detailed_view.h b/ash/system/chromeos/audio/audio_detailed_view.h index 6953676..fc836b3 100644 --- a/ash/system/chromeos/audio/audio_detailed_view.h +++ b/ash/system/chromeos/audio/audio_detailed_view.h @@ -17,8 +17,6 @@ class View; } namespace ash { -namespace internal { - class HoverHighlightView; namespace tray { @@ -60,7 +58,6 @@ class AudioDetailedView : public TrayDetailsView, }; } // namespace tray -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_CHROMEOS_AUDIO_AUDIO_DETAILED_VIEW_H_ diff --git a/ash/system/chromeos/audio/tray_audio_chromeos.cc b/ash/system/chromeos/audio/tray_audio_chromeos.cc index fc20aea..0126dda 100644 --- a/ash/system/chromeos/audio/tray_audio_chromeos.cc +++ b/ash/system/chromeos/audio/tray_audio_chromeos.cc @@ -16,8 +16,6 @@ namespace ash { using system::TrayAudioDelegate; using system::TrayAudioDelegateChromeOs; -namespace internal { - TrayAudioChromeOs::TrayAudioChromeOs(SystemTray* system_tray) : TrayAudio(system_tray, scoped_ptr<TrayAudioDelegate>(new TrayAudioDelegateChromeOs())), @@ -56,5 +54,4 @@ void TrayAudioChromeOs::DestroyDetailedView() { } } -} // namespace internal } // namespace ash diff --git a/ash/system/chromeos/audio/tray_audio_chromeos.h b/ash/system/chromeos/audio/tray_audio_chromeos.h index 6817f85..c5cb9ea 100644 --- a/ash/system/chromeos/audio/tray_audio_chromeos.h +++ b/ash/system/chromeos/audio/tray_audio_chromeos.h @@ -10,9 +10,6 @@ #include "base/memory/scoped_ptr.h" namespace ash { - -namespace internal { - namespace tray { class AudioDetailedView; } @@ -36,7 +33,6 @@ class ASH_EXPORT TrayAudioChromeOs : public TrayAudio { DISALLOW_COPY_AND_ASSIGN(TrayAudioChromeOs); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_CHROMEOS_AUDIO_TRAY_AUDIO_CHROMEOS_H_ diff --git a/ash/system/chromeos/bluetooth/bluetooth_notification_controller.cc b/ash/system/chromeos/bluetooth/bluetooth_notification_controller.cc index 76e2cf8..1965ac2 100644 --- a/ash/system/chromeos/bluetooth/bluetooth_notification_controller.cc +++ b/ash/system/chromeos/bluetooth/bluetooth_notification_controller.cc @@ -143,7 +143,6 @@ void BluetoothPairingNotificationDelegate::ButtonClick(int button_index) { namespace ash { -namespace internal { BluetoothNotificationController::BluetoothNotificationController() : weak_ptr_factory_(this) { @@ -368,5 +367,4 @@ void BluetoothNotificationController::NotifyPairedDevice( message_center::MessageCenter::Get()->AddNotification(notification.Pass()); } -} // namespace internal } // namespace ash diff --git a/ash/system/chromeos/bluetooth/bluetooth_notification_controller.h b/ash/system/chromeos/bluetooth/bluetooth_notification_controller.h index 0d51a40c..e44b281 100644 --- a/ash/system/chromeos/bluetooth/bluetooth_notification_controller.h +++ b/ash/system/chromeos/bluetooth/bluetooth_notification_controller.h @@ -17,7 +17,6 @@ #include "device/bluetooth/bluetooth_device.h" namespace ash { -namespace internal { // The BluetoothNotificationController receives incoming pairing requests from // the BluetoothAdapter, and notifications of changes to the adapter state and @@ -89,7 +88,6 @@ class ASH_EXPORT BluetoothNotificationController DISALLOW_COPY_AND_ASSIGN(BluetoothNotificationController); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_CHROMEOS_BLUETOOTH_BLUETOOTH_NOTIFICATION_CONTROLLER_H_ diff --git a/ash/system/chromeos/brightness/tray_brightness.cc b/ash/system/chromeos/brightness/tray_brightness.cc index 23f6fa7..901b0aa 100644 --- a/ash/system/chromeos/brightness/tray_brightness.cc +++ b/ash/system/chromeos/brightness/tray_brightness.cc @@ -32,10 +32,7 @@ #include "ui/views/view.h" namespace ash { -namespace internal { - namespace tray { - namespace { // We don't let the screen brightness go lower than this when it's being @@ -281,5 +278,4 @@ void TrayBrightness::HandleBrightnessChanged(double percent, PopupDetailedView(kTrayPopupAutoCloseDelayInSeconds, false); } -} // namespace internal } // namespace ash diff --git a/ash/system/chromeos/brightness/tray_brightness.h b/ash/system/chromeos/brightness/tray_brightness.h index 9b5addf..379a8d2 100644 --- a/ash/system/chromeos/brightness/tray_brightness.h +++ b/ash/system/chromeos/brightness/tray_brightness.h @@ -11,8 +11,6 @@ #include "chromeos/dbus/power_manager_client.h" namespace ash { -namespace internal { - namespace tray { class BrightnessView; } @@ -66,7 +64,6 @@ class ASH_EXPORT TrayBrightness DISALLOW_COPY_AND_ASSIGN(TrayBrightness); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_CHROMEOS_BRIGHTNESS_TRAY_BRIGHTNESS_H_ diff --git a/ash/system/chromeos/brightness/tray_brightness_unittest.cc b/ash/system/chromeos/brightness/tray_brightness_unittest.cc index 72e1816..a1b5d70 100644 --- a/ash/system/chromeos/brightness/tray_brightness_unittest.cc +++ b/ash/system/chromeos/brightness/tray_brightness_unittest.cc @@ -11,7 +11,6 @@ #include "ui/views/view.h" namespace ash { - namespace { user::LoginStatus GetUserLoginStatus() { @@ -20,8 +19,6 @@ user::LoginStatus GetUserLoginStatus() { } // namespace -namespace internal { - class TrayBrightnessTest : public test::AshTestBase { public: TrayBrightnessTest() {} @@ -95,7 +92,5 @@ TEST_F(TrayBrightnessTest, DetailedViewVisibilityChangesDuringMaximizeMode) { EXPECT_TRUE(tray->visible()); } -} // namespace internal - } // namespace ash diff --git a/ash/system/chromeos/enterprise/tray_enterprise.cc b/ash/system/chromeos/enterprise/tray_enterprise.cc index 8fca1c6..ecb54e4 100644 --- a/ash/system/chromeos/enterprise/tray_enterprise.cc +++ b/ash/system/chromeos/enterprise/tray_enterprise.cc @@ -12,7 +12,6 @@ #include "grit/ash_resources.h" namespace ash { -namespace internal { TrayEnterprise::TrayEnterprise(SystemTray* system_tray) : SystemTrayItem(system_tray), @@ -56,5 +55,4 @@ void TrayEnterprise::OnViewClicked(views::View* sender) { Shell::GetInstance()->system_tray_delegate()->ShowEnterpriseInfo(); } -} // namespace internal } // namespace ash diff --git a/ash/system/chromeos/enterprise/tray_enterprise.h b/ash/system/chromeos/enterprise/tray_enterprise.h index 697dfcd..984ef21 100644 --- a/ash/system/chromeos/enterprise/tray_enterprise.h +++ b/ash/system/chromeos/enterprise/tray_enterprise.h @@ -14,8 +14,6 @@ class SystemTray; } namespace ash { -namespace internal { - class LabelTrayView; class TrayEnterprise : public SystemTrayItem, @@ -45,7 +43,6 @@ class TrayEnterprise : public SystemTrayItem, DISALLOW_COPY_AND_ASSIGN(TrayEnterprise); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_CHROMEOS_ENTERPRISE_TRAY_ENTERPRISE_H diff --git a/ash/system/chromeos/label_tray_view.cc b/ash/system/chromeos/label_tray_view.cc index 9a57b32..6d1665f 100644 --- a/ash/system/chromeos/label_tray_view.cc +++ b/ash/system/chromeos/label_tray_view.cc @@ -14,7 +14,6 @@ #include "ui/views/layout/fill_layout.h" namespace ash { -namespace internal { LabelTrayView::LabelTrayView(ViewClickListener* click_listener, int icon_resource_id) @@ -64,5 +63,4 @@ views::View* LabelTrayView::CreateChildView( return child; } -} // namespace internal } // namespace ash diff --git a/ash/system/chromeos/label_tray_view.h b/ash/system/chromeos/label_tray_view.h index b29c37b..bef5adf 100644 --- a/ash/system/chromeos/label_tray_view.h +++ b/ash/system/chromeos/label_tray_view.h @@ -9,7 +9,6 @@ #include "ui/views/view.h" namespace ash { -namespace internal { class ViewClickListener; @@ -31,7 +30,6 @@ class LabelTrayView : public views::View { DISALLOW_COPY_AND_ASSIGN(LabelTrayView); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_CHROMEOS_LABEL_TRAY_VIEW_H_ diff --git a/ash/system/chromeos/managed/tray_locally_managed_user.cc b/ash/system/chromeos/managed/tray_locally_managed_user.cc index e9f44a5..2758879 100644 --- a/ash/system/chromeos/managed/tray_locally_managed_user.cc +++ b/ash/system/chromeos/managed/tray_locally_managed_user.cc @@ -21,7 +21,6 @@ using message_center::Notification; namespace ash { -namespace internal { const char TrayLocallyManagedUser::kNotificationId[] = "chrome://user/locally-managed"; @@ -89,5 +88,4 @@ void TrayLocallyManagedUser::CreateOrUpdateNotification( message_center::MessageCenter::Get()->AddNotification(notification.Pass()); } -} // namespace internal -} // namespace ash +} // namespace ash diff --git a/ash/system/chromeos/managed/tray_locally_managed_user.h b/ash/system/chromeos/managed/tray_locally_managed_user.h index a508ec3..666530b 100644 --- a/ash/system/chromeos/managed/tray_locally_managed_user.h +++ b/ash/system/chromeos/managed/tray_locally_managed_user.h @@ -11,11 +11,8 @@ #include "base/strings/string16.h" namespace ash { -class SystemTray; - -namespace internal { - class LabelTrayView; +class SystemTray; class ASH_EXPORT TrayLocallyManagedUser : public SystemTrayItem, public ViewClickListener { @@ -49,7 +46,6 @@ class ASH_EXPORT TrayLocallyManagedUser : public SystemTrayItem, DISALLOW_COPY_AND_ASSIGN(TrayLocallyManagedUser); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_CHROMEOS_LOCALLY_MANAGED_TRAY_LOCALLY_MANAGED_USER_H diff --git a/ash/system/chromeos/managed/tray_locally_managed_user_unittest.cc b/ash/system/chromeos/managed/tray_locally_managed_user_unittest.cc index 46f60d1..ca5af22 100644 --- a/ash/system/chromeos/managed/tray_locally_managed_user_unittest.cc +++ b/ash/system/chromeos/managed/tray_locally_managed_user_unittest.cc @@ -16,7 +16,6 @@ using message_center::NotificationList; namespace ash { -namespace internal { class TrayLocallyManagedUserTest : public test::AshTestBase { public: @@ -85,5 +84,4 @@ TEST_F(TrayLocallyManagedUserInitialTest, LocallyManagedUserNoCrash) { notification->rich_notification_data().priority); } -} // namespace test } // namespace diff --git a/ash/system/chromeos/network/network_detailed_view.h b/ash/system/chromeos/network/network_detailed_view.h index fe7ac21d..772f239 100644 --- a/ash/system/chromeos/network/network_detailed_view.h +++ b/ash/system/chromeos/network/network_detailed_view.h @@ -9,8 +9,6 @@ #include "chromeos/network/network_state_handler.h" namespace ash { -namespace internal { - namespace tray { // Abstract base class for all NetworkDetailedView derived subclasses, @@ -48,8 +46,6 @@ class NetworkDetailedView : public TrayDetailsView { }; } // namespace tray - -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_DETAILED_VIEW_H diff --git a/ash/system/chromeos/network/network_state_list_detailed_view.cc b/ash/system/chromeos/network/network_state_list_detailed_view.cc index a6bb3aa..80d243f 100644 --- a/ash/system/chromeos/network/network_state_list_detailed_view.cc +++ b/ash/system/chromeos/network/network_state_list_detailed_view.cc @@ -51,9 +51,7 @@ using chromeos::NetworkStateHandler; using chromeos::NetworkTypePattern; namespace ash { -namespace internal { namespace tray { - namespace { // Delay between scan requests. @@ -126,7 +124,7 @@ class NetworkStateListDetailedView::InfoBubble set_use_focusless(true); set_parent_window(ash::Shell::GetContainer( anchor->GetWidget()->GetNativeWindow()->GetRootWindow(), - ash::internal::kShellWindowId_SettingBubbleContainer)); + ash::kShellWindowId_SettingBubbleContainer)); SetLayoutManager(new views::FillLayout()); AddChildView(content); } @@ -834,5 +832,4 @@ void NetworkStateListDetailedView::ToggleMobile() { } } // namespace tray -} // namespace internal } // namespace ash diff --git a/ash/system/chromeos/network/network_state_list_detailed_view.h b/ash/system/chromeos/network/network_state_list_detailed_view.h index c54325ca..c868235 100644 --- a/ash/system/chromeos/network/network_state_list_detailed_view.h +++ b/ash/system/chromeos/network/network_state_list_detailed_view.h @@ -27,12 +27,8 @@ class BubbleDelegateView; } namespace ash { - -class SystemTrayItem; - -namespace internal { - class HoverHighlightView; +class SystemTrayItem; class TrayPopupLabelButton; namespace tray { @@ -153,7 +149,6 @@ class NetworkStateListDetailedView }; } // namespace tray -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_STATE_LIST_DETAILED_VIEW diff --git a/ash/system/chromeos/network/tray_network.cc b/ash/system/chromeos/network/tray_network.cc index d8e745b..598246c 100644 --- a/ash/system/chromeos/network/tray_network.cc +++ b/ash/system/chromeos/network/tray_network.cc @@ -40,8 +40,6 @@ using chromeos::NetworkStateHandler; using chromeos::NetworkTypePattern; namespace ash { -namespace internal { - namespace tray { class NetworkTrayView : public TrayItemView, @@ -374,5 +372,4 @@ void TrayNetwork::NetworkServiceChanged(const chromeos::NetworkState* network) { detailed_->NetworkServiceChanged(network); } -} // namespace internal } // namespace ash diff --git a/ash/system/chromeos/network/tray_network.h b/ash/system/chromeos/network/tray_network.h index 1b0b7e6..54f79c6 100644 --- a/ash/system/chromeos/network/tray_network.h +++ b/ash/system/chromeos/network/tray_network.h @@ -20,8 +20,6 @@ class NetworkState; } namespace ash { -namespace internal { - namespace tray { class NetworkDefaultView; class NetworkDetailedView; @@ -71,7 +69,6 @@ class TrayNetwork : public SystemTrayItem, DISALLOW_COPY_AND_ASSIGN(TrayNetwork); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_CHROMEOS_NETWORK_TRAY_NETWORK_H diff --git a/ash/system/chromeos/network/tray_network_state_observer.cc b/ash/system/chromeos/network/tray_network_state_observer.cc index d090762..6de9bfe 100644 --- a/ash/system/chromeos/network/tray_network_state_observer.cc +++ b/ash/system/chromeos/network/tray_network_state_observer.cc @@ -16,7 +16,6 @@ using chromeos::NetworkHandler; namespace ash { -namespace internal { TrayNetworkStateObserver::TrayNetworkStateObserver(Delegate* delegate) : delegate_(delegate) { @@ -56,4 +55,3 @@ void TrayNetworkStateObserver::NetworkPropertiesUpdated( } } // namespace ash -} // namespace internal diff --git a/ash/system/chromeos/network/tray_network_state_observer.h b/ash/system/chromeos/network/tray_network_state_observer.h index e2f47d1..edc7891 100644 --- a/ash/system/chromeos/network/tray_network_state_observer.h +++ b/ash/system/chromeos/network/tray_network_state_observer.h @@ -11,7 +11,6 @@ #include "chromeos/network/network_state_handler_observer.h" namespace ash { -namespace internal { class TrayNetworkStateObserver : public chromeos::NetworkStateHandlerObserver { public: @@ -48,6 +47,5 @@ class TrayNetworkStateObserver : public chromeos::NetworkStateHandlerObserver { }; } // namespace ash -} // namespace internal #endif // ASH_SYSTEM_CHROMEOS_NETWORK_TRAY_NETWORK_STATE_OBSERVER_H diff --git a/ash/system/chromeos/network/tray_sms.cc b/ash/system/chromeos/network/tray_sms.cc index d16865b..c3147a6 100644 --- a/ash/system/chromeos/network/tray_sms.cc +++ b/ash/system/chromeos/network/tray_sms.cc @@ -53,7 +53,6 @@ bool GetMessageFromDictionary(const base::DictionaryValue* message, } // namespace namespace ash { -namespace internal { class TraySms::SmsDefaultView : public TrayItemMore { public: @@ -417,5 +416,4 @@ void TraySms::Update(bool notify) { } } -} // namespace internal } // namespace ash diff --git a/ash/system/chromeos/network/tray_sms.h b/ash/system/chromeos/network/tray_sms.h index 5a79360..9796acf 100644 --- a/ash/system/chromeos/network/tray_sms.h +++ b/ash/system/chromeos/network/tray_sms.h @@ -12,7 +12,6 @@ #include "chromeos/network/network_sms_handler.h" namespace ash { -namespace internal { class TraySms : public SystemTrayItem, public chromeos::NetworkSmsHandler::Observer { @@ -60,7 +59,6 @@ class TraySms : public SystemTrayItem, DISALLOW_COPY_AND_ASSIGN(TraySms); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_CHROMEOS_NETWORK_TRAY_SMS_H diff --git a/ash/system/chromeos/network/tray_vpn.cc b/ash/system/chromeos/network/tray_vpn.cc index d150626..3325557 100644 --- a/ash/system/chromeos/network/tray_vpn.cc +++ b/ash/system/chromeos/network/tray_vpn.cc @@ -27,8 +27,6 @@ using chromeos::NetworkStateHandler; using chromeos::NetworkTypePattern; namespace ash { -namespace internal { - namespace tray { class VpnDefaultView : public TrayItemMore, @@ -176,5 +174,4 @@ void TrayVPN::NetworkServiceChanged(const chromeos::NetworkState* network) { detailed_->NetworkServiceChanged(network); } -} // namespace internal } // namespace ash diff --git a/ash/system/chromeos/network/tray_vpn.h b/ash/system/chromeos/network/tray_vpn.h index 1d16e54..601d842 100644 --- a/ash/system/chromeos/network/tray_vpn.h +++ b/ash/system/chromeos/network/tray_vpn.h @@ -10,8 +10,6 @@ #include "base/memory/scoped_ptr.h" namespace ash { -namespace internal { - class TrayNetworkStateObserver; namespace tray { @@ -50,7 +48,6 @@ class TrayVPN : public SystemTrayItem, DISALLOW_COPY_AND_ASSIGN(TrayVPN); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_CHROMEOS_NETWORK_TRAY_VPN_H diff --git a/ash/system/chromeos/power/power_event_observer.cc b/ash/system/chromeos/power/power_event_observer.cc index 42d67f9..d2f3e58 100644 --- a/ash/system/chromeos/power/power_event_observer.cc +++ b/ash/system/chromeos/power/power_event_observer.cc @@ -14,7 +14,6 @@ #include "ui/wm/core/user_activity_detector.h" namespace ash { -namespace internal { PowerEventObserver::PowerEventObserver() : screen_locked_(false) { @@ -80,5 +79,4 @@ void PowerEventObserver::ScreenIsUnlocked() { screen_locked_ = false; } -} // namespace internal } // namespace ash diff --git a/ash/system/chromeos/power/power_event_observer.h b/ash/system/chromeos/power/power_event_observer.h index b35cb1b..518959b 100644 --- a/ash/system/chromeos/power/power_event_observer.h +++ b/ash/system/chromeos/power/power_event_observer.h @@ -13,7 +13,6 @@ #include "chromeos/dbus/session_manager_client.h" namespace ash { -namespace internal { // A class that observes power-management-related events. class ASH_EXPORT PowerEventObserver @@ -44,7 +43,6 @@ class ASH_EXPORT PowerEventObserver DISALLOW_COPY_AND_ASSIGN(PowerEventObserver); }; -} // namespace internal } // namespace chromeos #endif // ASH_SYSTEM_CHROMEOS_POWER_POWER_EVENT_OBSERVER_H_ diff --git a/ash/system/chromeos/power/power_event_observer_unittest.cc b/ash/system/chromeos/power/power_event_observer_unittest.cc index a2282c3..94dcdedd 100644 --- a/ash/system/chromeos/power/power_event_observer_unittest.cc +++ b/ash/system/chromeos/power/power_event_observer_unittest.cc @@ -11,7 +11,6 @@ #include "chromeos/dbus/power_manager_client.h" namespace ash { -namespace internal { class PowerEventObserverTest : public test::AshTestBase { public: @@ -68,5 +67,4 @@ TEST_F(PowerEventObserverTest, LockBeforeSuspend) { EXPECT_EQ(0, client->GetNumPendingSuspendReadinessCallbacks()); } -} // namespace internal } // namespace ash diff --git a/ash/system/chromeos/power/power_status.cc b/ash/system/chromeos/power/power_status.cc index 68cdf1a..7f418c8 100644 --- a/ash/system/chromeos/power/power_status.cc +++ b/ash/system/chromeos/power/power_status.cc @@ -24,8 +24,6 @@ #include "ui/gfx/rect.h" namespace ash { -namespace internal { - namespace { // Updates |proto| to ensure that its fields are consistent. @@ -305,5 +303,4 @@ void PowerStatus::PowerChanged( FOR_EACH_OBSERVER(Observer, observers_, OnPowerStatusChanged()); } -} // namespace internal } // namespace ash diff --git a/ash/system/chromeos/power/power_status.h b/ash/system/chromeos/power/power_status.h index e306049..88f3585 100644 --- a/ash/system/chromeos/power/power_status.h +++ b/ash/system/chromeos/power/power_status.h @@ -15,7 +15,6 @@ #include "ui/gfx/image/image_skia.h" namespace ash { -namespace internal { // PowerStatus is a singleton that receives updates about the system's // power status from chromeos::PowerManagerClient and makes the information @@ -152,7 +151,6 @@ class ASH_EXPORT PowerStatus : public chromeos::PowerManagerClient::Observer { DISALLOW_COPY_AND_ASSIGN(PowerStatus); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_CHROMEOS_POWER_POWER_STATUS_H_ diff --git a/ash/system/chromeos/power/power_status_unittest.cc b/ash/system/chromeos/power/power_status_unittest.cc index ba9d2c1..cf1da4b 100644 --- a/ash/system/chromeos/power/power_status_unittest.cc +++ b/ash/system/chromeos/power/power_status_unittest.cc @@ -15,8 +15,6 @@ #include "third_party/cros_system_api/dbus/service_constants.h" namespace ash { -namespace internal { - namespace { class TestObserver : public PowerStatus::Observer { @@ -142,5 +140,4 @@ TEST_F(PowerStatusTest, SplitTimeIntoHoursAndMinutes) { EXPECT_EQ(3, minutes); } -} // namespace internal } // namespace ash diff --git a/ash/system/chromeos/power/power_status_view.cc b/ash/system/chromeos/power/power_status_view.cc index dbcf1e1..058ac08 100644 --- a/ash/system/chromeos/power/power_status_view.cc +++ b/ash/system/chromeos/power/power_status_view.cc @@ -22,7 +22,6 @@ #include "ui/views/layout/grid_layout.h" namespace ash { -namespace internal { // Padding between battery status text and battery icon on default view. const int kPaddingBetweenBatteryStatusAndIcon = 3; @@ -84,8 +83,7 @@ void PowerStatusView::LayoutDefaultView() { kTrayPopupPaddingBetweenItems); SetLayoutManager(layout); - icon_ = - new ash::internal::FixedSizedImageView(0, ash::kTrayPopupItemHeight); + icon_ = new ash::FixedSizedImageView(0, ash::kTrayPopupItemHeight); AddChildView(icon_); AddChildView(percentage_label_); @@ -218,5 +216,4 @@ void PowerStatusView::Layout() { } } -} // namespace internal } // namespace ash diff --git a/ash/system/chromeos/power/power_status_view.h b/ash/system/chromeos/power/power_status_view.h index e560e96..940ae0e 100644 --- a/ash/system/chromeos/power/power_status_view.h +++ b/ash/system/chromeos/power/power_status_view.h @@ -15,7 +15,6 @@ class Label; } namespace ash { -namespace internal { class ASH_EXPORT PowerStatusView : public views::View, public PowerStatus::Observer { @@ -68,7 +67,6 @@ class ASH_EXPORT PowerStatusView : public views::View, DISALLOW_COPY_AND_ASSIGN(PowerStatusView); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_CHROMEOS_POWER_POWER_STATUS_VIEW_H_ diff --git a/ash/system/chromeos/power/power_status_view_unittest.cc b/ash/system/chromeos/power/power_status_view_unittest.cc index 22cd892..5cf4332 100644 --- a/ash/system/chromeos/power/power_status_view_unittest.cc +++ b/ash/system/chromeos/power/power_status_view_unittest.cc @@ -15,7 +15,6 @@ using power_manager::PowerSupplyProperties; namespace ash { -namespace internal { class PowerStatusViewTest : public test::AshTestBase { public: @@ -212,5 +211,4 @@ TEST_F(PowerStatusNotificationViewTest, Basic) { EXPECT_TRUE(RemainingTimeInView().empty()); } -} // internal -} // ash +} // namespace ash diff --git a/ash/system/chromeos/power/tray_power.cc b/ash/system/chromeos/power/tray_power.cc index de3ff76..5442266 100644 --- a/ash/system/chromeos/power/tray_power.cc +++ b/ash/system/chromeos/power/tray_power.cc @@ -38,9 +38,7 @@ using message_center::MessageCenter; using message_center::Notification; namespace ash { -namespace internal { namespace tray { - namespace { const int kMaxSpringChargerAccessibilityNotifyCount = 3; @@ -397,5 +395,4 @@ void TrayPower::RecordChargerType() { } } -} // namespace internal } // namespace ash diff --git a/ash/system/chromeos/power/tray_power.h b/ash/system/chromeos/power/tray_power.h index d79ac5e..3bd0b20 100644 --- a/ash/system/chromeos/power/tray_power.h +++ b/ash/system/chromeos/power/tray_power.h @@ -20,8 +20,6 @@ class MessageCenter; } namespace ash { -namespace internal { - namespace tray { class PowerNotificationView; class PowerTrayView; @@ -111,7 +109,6 @@ class ASH_EXPORT TrayPower : public SystemTrayItem, DISALLOW_COPY_AND_ASSIGN(TrayPower); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_CHROMEOS_POWER_TRAY_POWER_H_ diff --git a/ash/system/chromeos/power/tray_power_unittest.cc b/ash/system/chromeos/power/tray_power_unittest.cc index a5552fa..6be2dfc 100644 --- a/ash/system/chromeos/power/tray_power_unittest.cc +++ b/ash/system/chromeos/power/tray_power_unittest.cc @@ -42,7 +42,6 @@ class MockMessageCenter : public message_center::FakeMessageCenter { } // namespace namespace ash { -namespace internal { class TrayPowerTest : public test::AshTestBase { public: @@ -232,5 +231,4 @@ TEST_F(TrayPowerTest, UpdateNotificationState) { EXPECT_EQ(TrayPower::NOTIFICATION_NONE, notification_state()); } -} // namespace internal } // namespace ash diff --git a/ash/system/chromeos/power/user_activity_notifier.cc b/ash/system/chromeos/power/user_activity_notifier.cc index a67f334..7afd3a8 100644 --- a/ash/system/chromeos/power/user_activity_notifier.cc +++ b/ash/system/chromeos/power/user_activity_notifier.cc @@ -12,8 +12,6 @@ #include "ui/wm/core/user_activity_detector.h" namespace ash { -namespace internal { - namespace { // Minimum number of seconds between notifications. @@ -64,5 +62,4 @@ void UserActivityNotifier::OnUserActivity(const ui::Event* event) { } } -} // namespace internal } // namespace ash diff --git a/ash/system/chromeos/power/user_activity_notifier.h b/ash/system/chromeos/power/user_activity_notifier.h index 4374304..22ac4c0 100644 --- a/ash/system/chromeos/power/user_activity_notifier.h +++ b/ash/system/chromeos/power/user_activity_notifier.h @@ -15,7 +15,6 @@ class UserActivityDetector; } // namespace wm namespace ash { -namespace internal { // Notifies the power manager when the user is active. class UserActivityNotifier : public ::wm::UserActivityObserver { @@ -35,7 +34,6 @@ class UserActivityNotifier : public ::wm::UserActivityObserver { DISALLOW_COPY_AND_ASSIGN(UserActivityNotifier); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_CHROMEOS_POWER_USER_ACTIVITY_NOTIFIER_H_ diff --git a/ash/system/chromeos/power/video_activity_notifier.cc b/ash/system/chromeos/power/video_activity_notifier.cc index 8a82fb3..07f8490 100644 --- a/ash/system/chromeos/power/video_activity_notifier.cc +++ b/ash/system/chromeos/power/video_activity_notifier.cc @@ -9,8 +9,6 @@ #include "chromeos/dbus/power_manager_client.h" namespace ash { -namespace internal { - namespace { // Minimum number of seconds between notifications. @@ -47,5 +45,4 @@ void VideoActivityNotifier::OnLockStateChanged(bool locked) { screen_is_locked_ = locked; } -} // namespace internal } // namespace ash diff --git a/ash/system/chromeos/power/video_activity_notifier.h b/ash/system/chromeos/power/video_activity_notifier.h index ae57d28..8c2dc41 100644 --- a/ash/system/chromeos/power/video_activity_notifier.h +++ b/ash/system/chromeos/power/video_activity_notifier.h @@ -11,7 +11,6 @@ #include "base/time/time.h" namespace ash { -namespace internal { // Notifies the power manager when a video is playing. class VideoActivityNotifier : public VideoDetectorObserver, @@ -38,7 +37,6 @@ class VideoActivityNotifier : public VideoDetectorObserver, DISALLOW_COPY_AND_ASSIGN(VideoActivityNotifier); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_CHROMEOS_POWER_VIDEO_ACTIVITY_NOTIFIER_H_ diff --git a/ash/system/chromeos/screen_security/screen_capture_tray_item.cc b/ash/system/chromeos/screen_security/screen_capture_tray_item.cc index 92e9309..c4689de 100644 --- a/ash/system/chromeos/screen_security/screen_capture_tray_item.cc +++ b/ash/system/chromeos/screen_security/screen_capture_tray_item.cc @@ -16,7 +16,6 @@ using message_center::Notification; namespace ash { -namespace internal { namespace { const char kScreenCaptureNotificationId[] = "chrome://screen/capture"; @@ -90,5 +89,4 @@ void ScreenCaptureTrayItem::OnScreenCaptureStop() { Update(); } -} // namespace internal } // namespace ash diff --git a/ash/system/chromeos/screen_security/screen_capture_tray_item.h b/ash/system/chromeos/screen_security/screen_capture_tray_item.h index 92f6c8a..5285ab2 100644 --- a/ash/system/chromeos/screen_security/screen_capture_tray_item.h +++ b/ash/system/chromeos/screen_security/screen_capture_tray_item.h @@ -13,7 +13,6 @@ class View; } namespace ash { -namespace internal { class ASH_EXPORT ScreenCaptureTrayItem : public ScreenTrayItem, public ScreenCaptureObserver { @@ -41,7 +40,6 @@ class ASH_EXPORT ScreenCaptureTrayItem : public ScreenTrayItem, DISALLOW_COPY_AND_ASSIGN(ScreenCaptureTrayItem); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_CHROMEOS_SCREEN_CAPTURE_SCREEN_CAPTURE_TRAY_ITEM_H_ diff --git a/ash/system/chromeos/screen_security/screen_share_tray_item.cc b/ash/system/chromeos/screen_security/screen_share_tray_item.cc index 93d858a..e2bf334 100644 --- a/ash/system/chromeos/screen_security/screen_share_tray_item.cc +++ b/ash/system/chromeos/screen_security/screen_share_tray_item.cc @@ -16,7 +16,6 @@ using message_center::Notification; namespace ash { -namespace internal { namespace { const char kScreenShareNotificationId[] = "chrome://screen/share"; @@ -100,5 +99,4 @@ void ScreenShareTrayItem::OnScreenShareStop() { Update(); } -} // namespace internal } // namespace ash diff --git a/ash/system/chromeos/screen_security/screen_share_tray_item.h b/ash/system/chromeos/screen_security/screen_share_tray_item.h index 14f26e5..d8d8f1e 100644 --- a/ash/system/chromeos/screen_security/screen_share_tray_item.h +++ b/ash/system/chromeos/screen_security/screen_share_tray_item.h @@ -13,7 +13,6 @@ class View; } namespace ash { -namespace internal { class ASH_EXPORT ScreenShareTrayItem : public ScreenTrayItem, public ScreenShareObserver { @@ -41,7 +40,6 @@ class ASH_EXPORT ScreenShareTrayItem : public ScreenTrayItem, DISALLOW_COPY_AND_ASSIGN(ScreenShareTrayItem); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_CHROMEOS_SCREEN_SHARE_SCREEN_SHARE_TRAY_ITEM_H_ diff --git a/ash/system/chromeos/screen_security/screen_tray_item.cc b/ash/system/chromeos/screen_security/screen_tray_item.cc index 7e7dc5f..f6ac38c 100644 --- a/ash/system/chromeos/screen_security/screen_tray_item.cc +++ b/ash/system/chromeos/screen_security/screen_tray_item.cc @@ -16,8 +16,6 @@ const int kStopButtonRightPadding = 18; } // namespace namespace ash { -namespace internal { - namespace tray { // ScreenTrayView implementations. @@ -210,5 +208,4 @@ void ScreenTrayItem::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) { tray_view_->Layout(); } -} // namespace internal } // namespace ash diff --git a/ash/system/chromeos/screen_security/screen_tray_item.h b/ash/system/chromeos/screen_security/screen_tray_item.h index ddbb126..9e5880d 100644 --- a/ash/system/chromeos/screen_security/screen_tray_item.h +++ b/ash/system/chromeos/screen_security/screen_tray_item.h @@ -20,8 +20,6 @@ class View; } namespace ash { -namespace internal { - class ScreenTrayItem; namespace tray { @@ -141,7 +139,6 @@ class ASH_EXPORT ScreenTrayItem : public SystemTrayItem { DISALLOW_COPY_AND_ASSIGN(ScreenTrayItem); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_CHROMEOS_SCREEN_TRAY_ITEM_H_ diff --git a/ash/system/chromeos/screen_security/screen_tray_item_unittest.cc b/ash/system/chromeos/screen_security/screen_tray_item_unittest.cc index c8e673c..027d81c 100644 --- a/ash/system/chromeos/screen_security/screen_tray_item_unittest.cc +++ b/ash/system/chromeos/screen_security/screen_tray_item_unittest.cc @@ -17,7 +17,6 @@ #include "ui/views/view.h" namespace ash { -namespace internal { // Test with unicode strings. const char kTestScreenCaptureAppName[] = @@ -223,5 +222,4 @@ TEST_F(ScreenShareTest, SystemTrayInteraction) { TestSystemTrayInteraction(this); } -} // namespace internal -} // namespace ash +} // namespace ash diff --git a/ash/system/chromeos/session/last_window_closed_logout_reminder.cc b/ash/system/chromeos/session/last_window_closed_logout_reminder.cc index 97f77111..de85d46 100644 --- a/ash/system/chromeos/session/last_window_closed_logout_reminder.cc +++ b/ash/system/chromeos/session/last_window_closed_logout_reminder.cc @@ -12,8 +12,6 @@ #include "base/time/time.h" namespace ash { -namespace internal { - namespace { const int kLogoutConfirmationDelayInSeconds = 20; } @@ -41,5 +39,4 @@ void LastWindowClosedLogoutReminder::OnLastWindowClosed() { base::TimeDelta::FromSeconds(kLogoutConfirmationDelayInSeconds)); } -} // namespace internal } // namespace ash diff --git a/ash/system/chromeos/session/last_window_closed_logout_reminder.h b/ash/system/chromeos/session/last_window_closed_logout_reminder.h index 5cea7cc..5914225 100644 --- a/ash/system/chromeos/session/last_window_closed_logout_reminder.h +++ b/ash/system/chromeos/session/last_window_closed_logout_reminder.h @@ -10,7 +10,6 @@ #include "base/compiler_specific.h" namespace ash { -namespace internal { // Shows a dialog asking the user whether to end the session when the last // window has been closed in a public session. @@ -25,7 +24,6 @@ class LastWindowClosedLogoutReminder : public LastWindowClosedObserver { DISALLOW_COPY_AND_ASSIGN(LastWindowClosedLogoutReminder); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_CHROMEOS_SESSION_LAST_WINDOW_CLOSED_LOGOUT_REMINDER_H_ diff --git a/ash/system/chromeos/session/logout_button_tray.cc b/ash/system/chromeos/session/logout_button_tray.cc index 971441d..850b850 100644 --- a/ash/system/chromeos/session/logout_button_tray.cc +++ b/ash/system/chromeos/session/logout_button_tray.cc @@ -25,8 +25,6 @@ #include "ui/views/painter.h" namespace ash { -namespace internal { - namespace { const int kLogoutButtonHorizontalExtraPadding = 7; @@ -164,5 +162,4 @@ void LogoutButtonTray::UpdateVisibility() { login_status_ != user::LOGGED_IN_LOCKED); } -} // namespace internal } // namespace ash diff --git a/ash/system/chromeos/session/logout_button_tray.h b/ash/system/chromeos/session/logout_button_tray.h index 2406567..8c40c2a 100644 --- a/ash/system/chromeos/session/logout_button_tray.h +++ b/ash/system/chromeos/session/logout_button_tray.h @@ -19,8 +19,6 @@ class LabelButton; } namespace ash { -namespace internal { - class StatusAreaWidget; // Adds a logout button to the launcher's status area if enabled by the @@ -60,7 +58,6 @@ class ASH_EXPORT LogoutButtonTray : public TrayBackgroundView, DISALLOW_COPY_AND_ASSIGN(LogoutButtonTray); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_CHROMEOS_SESSION_LOGOUT_BUTTON_TRAY_H_ diff --git a/ash/system/chromeos/session/logout_confirmation_controller.cc b/ash/system/chromeos/session/logout_confirmation_controller.cc index f0fc36a..61d8c9b 100644 --- a/ash/system/chromeos/session/logout_confirmation_controller.cc +++ b/ash/system/chromeos/session/logout_confirmation_controller.cc @@ -13,7 +13,6 @@ #include "ui/views/widget/widget.h" namespace ash { -namespace internal { LogoutConfirmationController::LogoutConfirmationController( const base::Closure& logout_closure) @@ -83,5 +82,4 @@ void LogoutConfirmationController::OnDialogClosed() { logout_timer_.Stop(); } -} // namespace internal } // namespace ash diff --git a/ash/system/chromeos/session/logout_confirmation_controller.h b/ash/system/chromeos/session/logout_confirmation_controller.h index 48b93b7..ee3aa20 100644 --- a/ash/system/chromeos/session/logout_confirmation_controller.h +++ b/ash/system/chromeos/session/logout_confirmation_controller.h @@ -18,7 +18,6 @@ class TickClock; } namespace ash { -namespace internal { class LogoutConfirmationDialog; @@ -65,7 +64,6 @@ class ASH_EXPORT LogoutConfirmationController : public ShellObserver { DISALLOW_COPY_AND_ASSIGN(LogoutConfirmationController); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_CHROMEOS_SESSION_LOGOUT_CONFIRMATION_CONTROLLER_H_ diff --git a/ash/system/chromeos/session/logout_confirmation_controller_unittest.cc b/ash/system/chromeos/session/logout_confirmation_controller_unittest.cc index 5bbd754..cefb128 100644 --- a/ash/system/chromeos/session/logout_confirmation_controller_unittest.cc +++ b/ash/system/chromeos/session/logout_confirmation_controller_unittest.cc @@ -19,8 +19,6 @@ #include "testing/gtest/include/gtest/gtest.h" namespace ash { -namespace internal { - namespace { // A SingleThreadTaskRunner that mocks the current time and allows it to be @@ -289,5 +287,4 @@ TEST_F(LogoutConfirmationControllerTest, DurationExpiredAfterDeniedRequest) { EXPECT_TRUE(log_out_called_); } -} // namespace internal } // namespace ash diff --git a/ash/system/chromeos/session/logout_confirmation_dialog.cc b/ash/system/chromeos/session/logout_confirmation_dialog.cc index e795927..80a71e8 100644 --- a/ash/system/chromeos/session/logout_confirmation_dialog.cc +++ b/ash/system/chromeos/session/logout_confirmation_dialog.cc @@ -20,8 +20,6 @@ #include "ui/views/widget/widget.h" namespace ash { -namespace internal { - namespace { const int kCountdownUpdateIntervalMs = 1000; // 1 second. @@ -112,5 +110,4 @@ void LogoutConfirmationDialog::UpdateLabel() { } } -} // namespace internal } // namespace ash diff --git a/ash/system/chromeos/session/logout_confirmation_dialog.h b/ash/system/chromeos/session/logout_confirmation_dialog.h index d88f85d..91e45366 100644 --- a/ash/system/chromeos/session/logout_confirmation_dialog.h +++ b/ash/system/chromeos/session/logout_confirmation_dialog.h @@ -16,7 +16,6 @@ class Label; } namespace ash { -namespace internal { class LogoutConfirmationController; @@ -53,7 +52,6 @@ class LogoutConfirmationDialog : public views::DialogDelegateView { DISALLOW_COPY_AND_ASSIGN(LogoutConfirmationDialog); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_CHROMEOS_SESSION_LOGOUT_CONFIRMATION_DIALOG_H_ diff --git a/ash/system/chromeos/session/tray_session_length_limit.cc b/ash/system/chromeos/session/tray_session_length_limit.cc index 72aeaec..6e1df7a 100644 --- a/ash/system/chromeos/session/tray_session_length_limit.cc +++ b/ash/system/chromeos/session/tray_session_length_limit.cc @@ -37,8 +37,6 @@ using message_center::Notification; namespace ash { -namespace internal { - namespace { // If the remaining session time falls below this threshold, the user should be @@ -388,5 +386,4 @@ bool TraySessionLengthLimit::IsTrayViewVisibleForTest() { return tray_view_ && tray_view_->visible(); } -} // namespace internal } // namespace ash diff --git a/ash/system/chromeos/session/tray_session_length_limit.h b/ash/system/chromeos/session/tray_session_length_limit.h index 5b31cbb..1c9da17 100644 --- a/ash/system/chromeos/session/tray_session_length_limit.h +++ b/ash/system/chromeos/session/tray_session_length_limit.h @@ -14,13 +14,10 @@ #include "base/timer/timer.h" namespace ash { - namespace test { class TraySessionLengthLimitTest; } -namespace internal { - namespace tray { class RemainingSessionTimeTrayView; } @@ -71,7 +68,6 @@ class ASH_EXPORT TraySessionLengthLimit : public SystemTrayItem, DISALLOW_COPY_AND_ASSIGN(TraySessionLengthLimit); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_CHROMEOS_SESSION_SESSION_LENGTH_LIMIT_H_ diff --git a/ash/system/chromeos/session/tray_session_length_limit_unittest.cc b/ash/system/chromeos/session/tray_session_length_limit_unittest.cc index bc3c325..a946fe7 100644 --- a/ash/system/chromeos/session/tray_session_length_limit_unittest.cc +++ b/ash/system/chromeos/session/tray_session_length_limit_unittest.cc @@ -26,8 +26,7 @@ class TraySessionLengthLimitTest : public AshTestBase { AshTestBase::SetUp(); SystemTray* system_tray = Shell::GetPrimaryRootWindowController()->GetSystemTray(); - tray_session_length_limit_ = new internal::TraySessionLengthLimit( - system_tray); + tray_session_length_limit_ = new TraySessionLengthLimit(system_tray); system_tray->AddTrayItem(tray_session_length_limit_); } @@ -47,7 +46,7 @@ class TraySessionLengthLimitTest : public AshTestBase { message_center::MessageCenter::Get()->GetVisibleNotifications(); for (message_center::NotificationList::Notifications::const_iterator iter = notifications.begin(); iter != notifications.end(); ++iter) { - if ((*iter)->id() == internal::TraySessionLengthLimit::kNotificationId) + if ((*iter)->id() == TraySessionLengthLimit::kNotificationId) return *iter; } return NULL; @@ -60,10 +59,10 @@ class TraySessionLengthLimitTest : public AshTestBase { void RemoveNotification() { message_center::MessageCenter::Get()->RemoveNotification( - internal::TraySessionLengthLimit::kNotificationId, true /* by_user */); + TraySessionLengthLimit::kNotificationId, true /* by_user */); } - internal::TraySessionLengthLimit* tray_session_length_limit() { + TraySessionLengthLimit* tray_session_length_limit() { return tray_session_length_limit_; } @@ -73,7 +72,7 @@ class TraySessionLengthLimitTest : public AshTestBase { private: // Weak reference, owned by the SystemTray. - internal::TraySessionLengthLimit* tray_session_length_limit_; + TraySessionLengthLimit* tray_session_length_limit_; DISALLOW_COPY_AND_ASSIGN(TraySessionLengthLimitTest); }; @@ -84,31 +83,31 @@ TEST_F(TraySessionLengthLimitTest, TrayView) { // Limit is 15 min. UpdateSessionLengthLimitInMin(15); - EXPECT_EQ(internal::TraySessionLengthLimit::LIMIT_SET, + EXPECT_EQ(TraySessionLengthLimit::LIMIT_SET, tray_session_length_limit()->GetLimitState()); EXPECT_TRUE(IsTrayViewVisible()); // Limit is 3 min. UpdateSessionLengthLimitInMin(3); - EXPECT_EQ(internal::TraySessionLengthLimit::LIMIT_EXPIRING_SOON, + EXPECT_EQ(TraySessionLengthLimit::LIMIT_EXPIRING_SOON, tray_session_length_limit()->GetLimitState()); EXPECT_TRUE(IsTrayViewVisible()); // Nothing left. UpdateSessionLengthLimitInMin(0); - EXPECT_EQ(internal::TraySessionLengthLimit::LIMIT_EXPIRING_SOON, + EXPECT_EQ(TraySessionLengthLimit::LIMIT_EXPIRING_SOON, tray_session_length_limit()->GetLimitState()); EXPECT_TRUE(IsTrayViewVisible()); // Checks the behavior in case the limit goes negative. UpdateSessionLengthLimitInMin(-5); - EXPECT_EQ(internal::TraySessionLengthLimit::LIMIT_EXPIRING_SOON, + EXPECT_EQ(TraySessionLengthLimit::LIMIT_EXPIRING_SOON, tray_session_length_limit()->GetLimitState()); EXPECT_TRUE(IsTrayViewVisible()); // Clears the session length limit, the TrayView should get invisible. ClearSessionLengthLimit(); - ASSERT_EQ(internal::TraySessionLengthLimit::LIMIT_NONE, + ASSERT_EQ(TraySessionLengthLimit::LIMIT_NONE, tray_session_length_limit()->GetLimitState()); EXPECT_FALSE(IsTrayViewVisible()); } diff --git a/ash/system/chromeos/settings/tray_settings.cc b/ash/system/chromeos/settings/tray_settings.cc index 34e58d1..af69755 100644 --- a/ash/system/chromeos/settings/tray_settings.cc +++ b/ash/system/chromeos/settings/tray_settings.cc @@ -25,8 +25,6 @@ #include "ui/views/view.h" namespace ash { -namespace internal { - namespace tray { class SettingsDefaultView : public ActionableView, @@ -46,7 +44,7 @@ class SettingsDefaultView : public ActionableView, login_status_ != user::LOGGED_IN_LOCKED) { ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); views::ImageView* icon = - new ash::internal::FixedSizedImageView(0, ash::kTrayPopupItemHeight); + new ash::FixedSizedImageView(0, ash::kTrayPopupItemHeight); icon->SetImage( rb.GetImageNamed(IDR_AURA_UBER_TRAY_SETTINGS).ToImageSkia()); AddChildView(icon); @@ -60,8 +58,8 @@ class SettingsDefaultView : public ActionableView, } if (PowerStatus::Get()->IsBatteryPresent()) { - power_status_view_ = new ash::internal::PowerStatusView( - ash::internal::PowerStatusView::VIEW_DEFAULT, power_view_right_align); + power_status_view_ = new ash::PowerStatusView( + ash::PowerStatusView::VIEW_DEFAULT, power_view_right_align); AddChildView(power_status_view_); OnPowerStatusChanged(); } @@ -71,7 +69,7 @@ class SettingsDefaultView : public ActionableView, PowerStatus::Get()->RemoveObserver(this); } - // Overridden from ash::internal::ActionableView. + // Overridden from ash::ActionableView. virtual bool PerformAction(const ui::Event& event) OVERRIDE { if (login_status_ == user::LOGGED_IN_NONE || login_status_ == user::LOGGED_IN_LOCKED) @@ -117,7 +115,7 @@ class SettingsDefaultView : public ActionableView, private: user::LoginStatus login_status_; views::Label* label_; - ash::internal::PowerStatusView* power_status_view_; + ash::PowerStatusView* power_status_view_; DISALLOW_COPY_AND_ASSIGN(SettingsDefaultView); }; @@ -167,5 +165,4 @@ void TraySettings::DestroyDetailedView() { void TraySettings::UpdateAfterLoginStatusChange(user::LoginStatus status) { } -} // namespace internal } // namespace ash diff --git a/ash/system/chromeos/settings/tray_settings.h b/ash/system/chromeos/settings/tray_settings.h index e48aad3..bd5e6d9 100644 --- a/ash/system/chromeos/settings/tray_settings.h +++ b/ash/system/chromeos/settings/tray_settings.h @@ -8,8 +8,6 @@ #include "ash/system/tray/system_tray_item.h" namespace ash { -namespace internal { - namespace tray { class SettingsDefaultView; } @@ -34,7 +32,6 @@ class TraySettings : public SystemTrayItem { DISALLOW_COPY_AND_ASSIGN(TraySettings); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_CHROMEOS_SETTINGS_TRAY_SETTINGS_H_ diff --git a/ash/system/chromeos/system_clock_observer.cc b/ash/system/chromeos/system_clock_observer.cc index c5ab20c..d154d5e 100644 --- a/ash/system/chromeos/system_clock_observer.cc +++ b/ash/system/chromeos/system_clock_observer.cc @@ -9,7 +9,6 @@ #include "chromeos/dbus/dbus_thread_manager.h" namespace ash { -namespace internal { SystemClockObserver::SystemClockObserver() { chromeos::DBusThreadManager::Get()->GetSystemClockClient() @@ -32,5 +31,4 @@ void SystemClockObserver::TimezoneChanged(const icu::TimeZone& timezone) { Shell::GetInstance()->system_tray_notifier()->NotifyRefreshClock(); } -} // namespace internal } // namespace ash diff --git a/ash/system/chromeos/system_clock_observer.h b/ash/system/chromeos/system_clock_observer.h index e2625a8..dcc11ee 100644 --- a/ash/system/chromeos/system_clock_observer.h +++ b/ash/system/chromeos/system_clock_observer.h @@ -9,7 +9,6 @@ #include "chromeos/settings/timezone_settings.h" namespace ash { -namespace internal { class SystemClockObserver : public chromeos::SystemClockClient::Observer, @@ -28,7 +27,6 @@ class SystemClockObserver DISALLOW_COPY_AND_ASSIGN(SystemClockObserver); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_CHROMEOS_SYSTEM_CLOCK_OBSERVER_H_ diff --git a/ash/system/chromeos/tray_caps_lock.cc b/ash/system/chromeos/tray_caps_lock.cc index 163634f..7142a8e 100644 --- a/ash/system/chromeos/tray_caps_lock.cc +++ b/ash/system/chromeos/tray_caps_lock.cc @@ -23,8 +23,6 @@ #include "ui/views/widget/widget.h" namespace ash { -namespace internal { - namespace { bool CapsLockIsEnabled() { @@ -216,5 +214,4 @@ void TrayCapsLock::DestroyDetailedView() { detailed_ = NULL; } -} // namespace internal } // namespace ash diff --git a/ash/system/chromeos/tray_caps_lock.h b/ash/system/chromeos/tray_caps_lock.h index 1ccd0f1..f24ad6b 100644 --- a/ash/system/chromeos/tray_caps_lock.h +++ b/ash/system/chromeos/tray_caps_lock.h @@ -14,8 +14,6 @@ class View; } namespace ash { -namespace internal { - class CapsLockDefaultView; class TrayCapsLock : public TrayImageItem, @@ -46,7 +44,6 @@ class TrayCapsLock : public TrayImageItem, DISALLOW_COPY_AND_ASSIGN(TrayCapsLock); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_CHROMEOS_TRAY_CAPS_LOCK_H_ diff --git a/ash/system/chromeos/tray_display.cc b/ash/system/chromeos/tray_display.cc index 8b627b7..b5814c1 100644 --- a/ash/system/chromeos/tray_display.cc +++ b/ash/system/chromeos/tray_display.cc @@ -31,7 +31,6 @@ using message_center::Notification; namespace ash { -namespace internal { namespace { DisplayManager* GetDisplayManager() { @@ -130,7 +129,7 @@ void OpenSettings() { const char TrayDisplay::kNotificationId[] = "chrome://settings/display"; -class DisplayView : public internal::ActionableView { +class DisplayView : public ActionableView { public: explicit DisplayView() { SetLayoutManager(new views::BoxLayout( @@ -139,7 +138,7 @@ class DisplayView : public internal::ActionableView { kTrayPopupPaddingBetweenItems)); ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); - image_ = new internal::FixedSizedImageView(0, kTrayPopupItemHeight); + image_ = new FixedSizedImageView(0, kTrayPopupItemHeight); image_->SetImage( bundle.GetImageNamed(IDR_AURA_UBER_TRAY_DISPLAY).ToImageSkia()); AddChildView(image_); @@ -436,5 +435,4 @@ bool TrayDisplay::GetAccessibleStateForTesting(ui::AXViewState* state) { return false; } -} // namespace internal } // namespace ash diff --git a/ash/system/chromeos/tray_display.h b/ash/system/chromeos/tray_display.h index e111d7d..fc01ba2 100644 --- a/ash/system/chromeos/tray_display.h +++ b/ash/system/chromeos/tray_display.h @@ -15,13 +15,12 @@ #include "ui/views/view.h" namespace ash { +class DisplayView; + namespace test { class AshTestBase; } -namespace internal { -class DisplayView; - class ASH_EXPORT TrayDisplay : public SystemTrayItem, public DisplayController::Observer { public: @@ -74,7 +73,6 @@ class ASH_EXPORT TrayDisplay : public SystemTrayItem, DISALLOW_COPY_AND_ASSIGN(TrayDisplay); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_CHROMEOS_TRAY_DISPLAY_H_ diff --git a/ash/system/chromeos/tray_display_unittest.cc b/ash/system/chromeos/tray_display_unittest.cc index 0f3609b..5689c84 100644 --- a/ash/system/chromeos/tray_display_unittest.cc +++ b/ash/system/chromeos/tray_display_unittest.cc @@ -23,7 +23,6 @@ #include "ui/views/controls/label.h" namespace ash { -namespace internal { base::string16 GetTooltipText(const base::string16& headline, const base::string16& name1, @@ -573,5 +572,4 @@ TEST_F(TrayDisplayTest, UpdateAfterSuppressDisplayNotification) { GetDisplayNotificationText()); } -} // namespace internal } // namespace ash diff --git a/ash/system/chromeos/tray_tracing.cc b/ash/system/chromeos/tray_tracing.cc index eddeac7..907b51b 100644 --- a/ash/system/chromeos/tray_tracing.cc +++ b/ash/system/chromeos/tray_tracing.cc @@ -21,11 +21,9 @@ #include "ui/views/layout/box_layout.h" namespace ash { -namespace internal { - namespace tray { -class DefaultTracingView : public internal::ActionableView { +class DefaultTracingView : public ActionableView { public: DefaultTracingView() { SetLayoutManager(new views::BoxLayout( @@ -34,7 +32,7 @@ class DefaultTracingView : public internal::ActionableView { kTrayPopupPaddingBetweenItems)); ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); - image_ = new internal::FixedSizedImageView(0, kTrayPopupItemHeight); + image_ = new FixedSizedImageView(0, kTrayPopupItemHeight); image_->SetImage( bundle.GetImageNamed(IDR_AURA_UBER_TRAY_TRACING).ToImageSkia()); AddChildView(image_); @@ -64,7 +62,7 @@ class DefaultTracingView : public internal::ActionableView { } // namespace tray //////////////////////////////////////////////////////////////////////////////// -// ash::internal::TrayTracing +// ash::TrayTracing TrayTracing::TrayTracing(SystemTray* system_tray) : TrayImageItem(system_tray, IDR_AURA_UBER_TRAY_TRACING), @@ -109,5 +107,4 @@ void TrayTracing::OnTracingModeChanged(bool value) { SetTrayIconVisible(value); } -} // namespace internal } // namespace ash diff --git a/ash/system/chromeos/tray_tracing.h b/ash/system/chromeos/tray_tracing.h index f9491e1..683b326 100644 --- a/ash/system/chromeos/tray_tracing.h +++ b/ash/system/chromeos/tray_tracing.h @@ -22,8 +22,6 @@ class ASH_EXPORT TracingObserver { virtual void OnTracingModeChanged(bool value) = 0; }; -namespace internal { - // This is the item that displays when users enable performance tracing at // chrome://slow. It alerts them that this mode is running, and provides an // easy way to open the page to disable it. @@ -51,7 +49,6 @@ class TrayTracing : public TrayImageItem, DISALLOW_COPY_AND_ASSIGN(TrayTracing); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_TRAY_TRACING_H_ diff --git a/ash/system/chromeos/virtual_keyboard/virtual_keyboard_tray.cc b/ash/system/chromeos/virtual_keyboard/virtual_keyboard_tray.cc index f1a9c5c..f064b82 100644 --- a/ash/system/chromeos/virtual_keyboard/virtual_keyboard_tray.cc +++ b/ash/system/chromeos/virtual_keyboard/virtual_keyboard_tray.cc @@ -19,8 +19,6 @@ #include "ui/views/controls/button/image_button.h" namespace ash { -namespace internal { - namespace { class VirtualKeyboardButton : public views::ImageButton { @@ -116,5 +114,4 @@ void VirtualKeyboardTray::OnAccessibilityModeChanged( IsVirtualKeyboardEnabled()); } -} // namespace internal } // namespace ash diff --git a/ash/system/chromeos/virtual_keyboard/virtual_keyboard_tray.h b/ash/system/chromeos/virtual_keyboard/virtual_keyboard_tray.h index a74cb9c..8f0e2bb 100644 --- a/ash/system/chromeos/virtual_keyboard/virtual_keyboard_tray.h +++ b/ash/system/chromeos/virtual_keyboard/virtual_keyboard_tray.h @@ -16,8 +16,6 @@ class ImageButton; } namespace ash { -namespace internal { - class StatusAreaWidget; class VirtualKeyboardTray : public TrayBackgroundView, @@ -49,7 +47,6 @@ class VirtualKeyboardTray : public TrayBackgroundView, DISALLOW_COPY_AND_ASSIGN(VirtualKeyboardTray); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_CHROMEOS_VIRTUAL_KEYBOARD_VIRTUAL_KEYBOARD_TRAY_H_ diff --git a/ash/system/date/date_default_view.cc b/ash/system/date/date_default_view.cc index 33a0f4f..e72e048 100644 --- a/ash/system/date/date_default_view.cc +++ b/ash/system/date/date_default_view.cc @@ -27,7 +27,6 @@ const int kPaddingVertical = 19; } // namespace namespace ash { -namespace internal { DateDefaultView::DateDefaultView(ash::user::LoginStatus login) : help_(NULL), @@ -118,5 +117,4 @@ void DateDefaultView::ButtonPressed(views::Button* sender, } } -} // namespace internal } // namespace ash diff --git a/ash/system/date/date_default_view.h b/ash/system/date/date_default_view.h index 3cfe42c..2b80b02 100644 --- a/ash/system/date/date_default_view.h +++ b/ash/system/date/date_default_view.h @@ -12,8 +12,6 @@ #include "ui/views/view.h" namespace ash { -namespace internal { - namespace tray { class DateView; } // namespace tray @@ -45,7 +43,6 @@ class ASH_EXPORT DateDefaultView : public views::View, DISALLOW_COPY_AND_ASSIGN(DateDefaultView); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_DATE_DATE_DEFAULT_VIEW_H_ diff --git a/ash/system/date/date_view.cc b/ash/system/date/date_view.cc index 9453837..26f910d 100644 --- a/ash/system/date/date_view.cc +++ b/ash/system/date/date_view.cc @@ -24,9 +24,7 @@ #include "ui/views/widget/widget.h" namespace ash { -namespace internal { namespace tray { - namespace { // Amount of slop to add into the timer to make sure we're into the next minute @@ -314,5 +312,4 @@ void TimeView::SetupLabel(views::Label* label) { } } // namespace tray -} // namespace internal } // namespace ash diff --git a/ash/system/date/date_view.h b/ash/system/date/date_view.h index ed7fadb..7d03a9a 100644 --- a/ash/system/date/date_view.h +++ b/ash/system/date/date_view.h @@ -18,7 +18,6 @@ class Label; } namespace ash { -namespace internal { namespace tray { // Abstract base class containing common updating and layout code for the @@ -131,7 +130,6 @@ class ASH_EXPORT TimeView : public BaseDateTimeView { }; } // namespace tray -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_DATE_DATE_VIEW_H_ diff --git a/ash/system/date/date_view_unittest.cc b/ash/system/date/date_view_unittest.cc index 931d220..4bada63 100644 --- a/ash/system/date/date_view_unittest.cc +++ b/ash/system/date/date_view_unittest.cc @@ -8,7 +8,6 @@ #include "ui/views/controls/label.h" namespace ash { -namespace internal { namespace tray { class TimeViewTest : public ash::test::AshTestBase { @@ -62,5 +61,4 @@ TEST_F(TimeViewTest, Basics) { } } // namespace tray -} // namespace internal } // namespace ash diff --git a/ash/system/date/tray_date.cc b/ash/system/date/tray_date.cc index ac6754a..156d355 100644 --- a/ash/system/date/tray_date.cc +++ b/ash/system/date/tray_date.cc @@ -16,7 +16,6 @@ #endif namespace ash { -namespace internal { TrayDate::TrayDate(SystemTray* system_tray) : SystemTrayItem(system_tray), @@ -113,5 +112,4 @@ void TrayDate::Refresh() { time_tray_->UpdateText(); } -} // namespace internal } // namespace ash diff --git a/ash/system/date/tray_date.h b/ash/system/date/tray_date.h index 6ba6e03..90c02e2 100644 --- a/ash/system/date/tray_date.h +++ b/ash/system/date/tray_date.h @@ -15,12 +15,10 @@ class Label; } namespace ash { -namespace internal { - +class DateDefaultView; #if defined(OS_CHROMEOS) class SystemClockObserver; #endif -class DateDefaultView; namespace tray { class TimeView; @@ -71,7 +69,6 @@ class ASH_EXPORT TrayDate : public SystemTrayItem, public ClockObserver { DISALLOW_COPY_AND_ASSIGN(TrayDate); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_DATE_TRAY_DATE_H_ diff --git a/ash/system/drive/tray_drive.cc b/ash/system/drive/tray_drive.cc index 40a64c3..54e19e3 100644 --- a/ash/system/drive/tray_drive.cc +++ b/ash/system/drive/tray_drive.cc @@ -36,9 +36,6 @@ #include "ui/views/widget/widget.h" namespace ash { - -namespace internal { - namespace { const int kSidePadding = 8; @@ -515,5 +512,4 @@ void TrayDrive::HideIfNoOperations() { detailed_->Update(&empty_list); } -} // namespace internal } // namespace ash diff --git a/ash/system/drive/tray_drive.h b/ash/system/drive/tray_drive.h index 6550fde..3fea2b5 100644 --- a/ash/system/drive/tray_drive.h +++ b/ash/system/drive/tray_drive.h @@ -14,8 +14,6 @@ class Label; } namespace ash { -namespace internal { - namespace tray { class DriveTrayView; class DriveDefaultView; @@ -52,7 +50,6 @@ class TrayDrive : public TrayImageItem, DISALLOW_COPY_AND_ASSIGN(TrayDrive); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_DRIVE_TRAY_DRIVE_H_ diff --git a/ash/system/ime/tray_ime.cc b/ash/system/ime/tray_ime.cc index a2dafa4..b1ffb28 100644 --- a/ash/system/ime/tray_ime.cc +++ b/ash/system/ime/tray_ime.cc @@ -32,7 +32,6 @@ #include "ui/views/widget/widget.h" namespace ash { -namespace internal { namespace tray { class IMEDefaultView : public TrayItemMore { @@ -270,5 +269,4 @@ void TrayIME::OnIMERefresh() { detailed_->Update(list, property_list); } -} // namespace internal } // namespace ash diff --git a/ash/system/ime/tray_ime.h b/ash/system/ime/tray_ime.h index 06c81a5..0f46192 100644 --- a/ash/system/ime/tray_ime.h +++ b/ash/system/ime/tray_ime.h @@ -13,11 +13,8 @@ class Label; } namespace ash { - struct IMEInfo; -namespace internal { - namespace tray { class IMEDefaultView; class IMEDetailedView; @@ -56,7 +53,6 @@ class TrayIME : public SystemTrayItem, DISALLOW_COPY_AND_ASSIGN(TrayIME); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_IME_TRAY_IME_H_ diff --git a/ash/system/locale/locale_notification_controller.cc b/ash/system/locale/locale_notification_controller.cc index 419baaf..281b735 100644 --- a/ash/system/locale/locale_notification_controller.cc +++ b/ash/system/locale/locale_notification_controller.cc @@ -20,7 +20,6 @@ using message_center::Notification; namespace ash { -namespace internal { namespace { const char kLocaleChangeNotificationId[] = "chrome://settings/locale"; @@ -125,5 +124,4 @@ void LocaleNotificationController::OnLocaleChanged( message_center::MessageCenter::Get()->AddNotification(notification.Pass()); } -} // namespace internal } // namespace ash diff --git a/ash/system/locale/locale_notification_controller.h b/ash/system/locale/locale_notification_controller.h index d23895c..6ec3aef 100644 --- a/ash/system/locale/locale_notification_controller.h +++ b/ash/system/locale/locale_notification_controller.h @@ -12,7 +12,6 @@ #include "base/compiler_specific.h" namespace ash { -namespace internal { // Observes the locale change and creates rich notification for the change. class LocaleNotificationController : public LocaleObserver { @@ -35,7 +34,6 @@ class LocaleNotificationController : public LocaleObserver { DISALLOW_COPY_AND_ASSIGN(LocaleNotificationController); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_LOCALE_LOCALE_NOTIFICATION_CONTROLLER_H_ diff --git a/ash/system/overview/overview_button_tray.cc b/ash/system/overview/overview_button_tray.cc index edcf6e5..b18ee1a 100644 --- a/ash/system/overview/overview_button_tray.cc +++ b/ash/system/overview/overview_button_tray.cc @@ -29,10 +29,8 @@ const int kVerticalShelfVerticalPadding = 5; namespace ash { -OverviewButtonTray::OverviewButtonTray( - internal::StatusAreaWidget* status_area_widget) - : TrayBackgroundView(status_area_widget), - icon_(NULL) { +OverviewButtonTray::OverviewButtonTray(StatusAreaWidget* status_area_widget) + : TrayBackgroundView(status_area_widget), icon_(NULL) { SetContentsBackground(); ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); diff --git a/ash/system/overview/overview_button_tray.h b/ash/system/overview/overview_button_tray.h index 9007f0a..d988626 100644 --- a/ash/system/overview/overview_button_tray.h +++ b/ash/system/overview/overview_button_tray.h @@ -20,24 +20,24 @@ namespace ash { // This hosts a ShellObserver that listens for the activation of Maximize Mode // This tray will only be visible while in this state. This tray does not // provide any bubble view windows. -class ASH_EXPORT OverviewButtonTray : public internal::TrayBackgroundView, +class ASH_EXPORT OverviewButtonTray : public TrayBackgroundView, public ShellObserver { public: - explicit OverviewButtonTray(internal::StatusAreaWidget* status_area_widget); + explicit OverviewButtonTray(StatusAreaWidget* status_area_widget); virtual ~OverviewButtonTray(); // Updates the tray's visibility based on the LoginStatus and the current // state of MaximizeMode virtual void UpdateAfterLoginStatusChange(user::LoginStatus status); - // internal::ActionableView: + // ActionableView: virtual bool PerformAction(const ui::Event& event) OVERRIDE; // ShellObserver: virtual void OnMaximizeModeStarted() OVERRIDE; virtual void OnMaximizeModeEnded() OVERRIDE; - // internal::TrayBackgroundView: + // TrayBackgroundView: virtual bool ClickedOutsideBubble() OVERRIDE; virtual base::string16 GetAccessibleNameForTray() OVERRIDE; virtual void HideBubbleWithView( diff --git a/ash/system/overview/overview_button_tray_unittest.cc b/ash/system/overview/overview_button_tray_unittest.cc index b0cc6d0..ec2f22d 100644 --- a/ash/system/overview/overview_button_tray_unittest.cc +++ b/ash/system/overview/overview_button_tray_unittest.cc @@ -29,7 +29,7 @@ OverviewButtonTray* GetTray() { } OverviewButtonTray* GetSecondaryTray() { - internal::RootWindowController* primary_controller = + RootWindowController* primary_controller = Shell::GetPrimaryRootWindowController(); Shell::RootWindowControllerList controllers = Shell::GetAllRootWindowControllers(); diff --git a/ash/system/status_area_widget.cc b/ash/system/status_area_widget.cc index 0b2f7d0..ac2cffb 100644 --- a/ash/system/status_area_widget.cc +++ b/ash/system/status_area_widget.cc @@ -28,12 +28,10 @@ namespace ash { -namespace internal { - const char StatusAreaWidget::kNativeViewName[] = "StatusAreaWidget"; StatusAreaWidget::StatusAreaWidget(aura::Window* status_container) - : status_area_widget_delegate_(new internal::StatusAreaWidgetDelegate), + : status_area_widget_delegate_(new StatusAreaWidgetDelegate), overview_button_tray_(NULL), system_tray_(NULL), web_notification_tray_(NULL), @@ -191,5 +189,4 @@ void StatusAreaWidget::UpdateAfterLoginStatusChange( overview_button_tray_->UpdateAfterLoginStatusChange(login_status); } -} // namespace internal } // namespace ash diff --git a/ash/system/status_area_widget.h b/ash/system/status_area_widget.h index ad1c6dd..41ea72e 100644 --- a/ash/system/status_area_widget.h +++ b/ash/system/status_area_widget.h @@ -11,15 +11,11 @@ #include "ui/views/widget/widget.h" namespace ash { - class OverviewButtonTray; class ShellDelegate; +class StatusAreaWidgetDelegate; class SystemTray; class WebNotificationTray; - -namespace internal { - -class StatusAreaWidgetDelegate; #if defined(OS_CHROMEOS) class LogoutButtonTray; class VirtualKeyboardTray; @@ -50,7 +46,7 @@ class ASH_EXPORT StatusAreaWidget : public views::Widget { // notification tray. void UpdateAfterLoginStatusChange(user::LoginStatus login_status); - internal::StatusAreaWidgetDelegate* status_area_widget_delegate() { + StatusAreaWidgetDelegate* status_area_widget_delegate() { return status_area_widget_delegate_; } SystemTray* system_tray() { return system_tray_; } @@ -84,7 +80,7 @@ class ASH_EXPORT StatusAreaWidget : public views::Widget { void AddOverviewButtonTray(); // Weak pointers to View classes that are parented to StatusAreaWidget: - internal::StatusAreaWidgetDelegate* status_area_widget_delegate_; + StatusAreaWidgetDelegate* status_area_widget_delegate_; OverviewButtonTray* overview_button_tray_; SystemTray* system_tray_; WebNotificationTray* web_notification_tray_; @@ -97,7 +93,6 @@ class ASH_EXPORT StatusAreaWidget : public views::Widget { DISALLOW_COPY_AND_ASSIGN(StatusAreaWidget); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_STATUS_AREA_WIDGET_H_ diff --git a/ash/system/status_area_widget_delegate.cc b/ash/system/status_area_widget_delegate.cc index 72a289d..cdac5cb 100644 --- a/ash/system/status_area_widget_delegate.cc +++ b/ash/system/status_area_widget_delegate.cc @@ -20,7 +20,6 @@ #include "ui/views/widget/widget.h" namespace ash { -namespace internal { namespace { const int kStatusTrayOffsetFromScreenEdge = 4; @@ -154,5 +153,4 @@ void StatusAreaWidgetDelegate::UpdateWidgetSize() { GetWidget()->SetSize(GetPreferredSize()); } -} // namespace internal } // namespace ash diff --git a/ash/system/status_area_widget_delegate.h b/ash/system/status_area_widget_delegate.h index 751c31b..8dd3202 100644 --- a/ash/system/status_area_widget_delegate.h +++ b/ash/system/status_area_widget_delegate.h @@ -13,8 +13,6 @@ #include "ui/views/widget/widget_delegate.h" namespace ash { -namespace internal { - class FocusCycler; class ASH_EXPORT StatusAreaWidgetDelegate : public views::AccessiblePaneView, @@ -64,7 +62,6 @@ class ASH_EXPORT StatusAreaWidgetDelegate : public views::AccessiblePaneView, DISALLOW_COPY_AND_ASSIGN(StatusAreaWidgetDelegate); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_STATUS_AREA_WIDGET_DELEGATE_H_ diff --git a/ash/system/tray/actionable_view.cc b/ash/system/tray/actionable_view.cc index 6e55325..dc26cde 100644 --- a/ash/system/tray/actionable_view.cc +++ b/ash/system/tray/actionable_view.cc @@ -9,7 +9,6 @@ #include "ui/gfx/canvas.h" namespace ash { -namespace internal { // static const char ActionableView::kViewClassName[] = "tray/ActionableView"; @@ -91,5 +90,4 @@ void ActionableView::OnGestureEvent(ui::GestureEvent* event) { event->SetHandled(); } -} // namespace internal } // namespace ash diff --git a/ash/system/tray/actionable_view.h b/ash/system/tray/actionable_view.h index cef83fe..c5ccbe3 100644 --- a/ash/system/tray/actionable_view.h +++ b/ash/system/tray/actionable_view.h @@ -11,7 +11,6 @@ #include "ui/views/view.h" namespace ash { -namespace internal { // A focusable view that performs an action when user clicks on it, or presses // enter or space when focused. Note that the action is triggered on mouse-up, @@ -62,7 +61,6 @@ class ASH_EXPORT ActionableView : public views::View { DISALLOW_COPY_AND_ASSIGN(ActionableView); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_TRAY_ACTIONABLE_VIEW_H_ diff --git a/ash/system/tray/fixed_sized_image_view.cc b/ash/system/tray/fixed_sized_image_view.cc index d0d49b9..9eb9497 100644 --- a/ash/system/tray/fixed_sized_image_view.cc +++ b/ash/system/tray/fixed_sized_image_view.cc @@ -5,7 +5,6 @@ #include "ash/system/tray/fixed_sized_image_view.h" namespace ash { -namespace internal { FixedSizedImageView::FixedSizedImageView(int width, int height) : width_(width), @@ -23,5 +22,4 @@ gfx::Size FixedSizedImageView::GetPreferredSize() { height_ ? height_ : size.height()); } -} // namespace internal } // namespace ash diff --git a/ash/system/tray/fixed_sized_image_view.h b/ash/system/tray/fixed_sized_image_view.h index 1e5c7cd..b2b00ce 100644 --- a/ash/system/tray/fixed_sized_image_view.h +++ b/ash/system/tray/fixed_sized_image_view.h @@ -10,7 +10,6 @@ #include "ui/views/controls/image_view.h" namespace ash { -namespace internal { // An image view with a specified width and height (kTrayPopupDetailsIconWidth). // If the specified width or height is zero, then the image size is used for @@ -29,7 +28,6 @@ class FixedSizedImageView : public views::ImageView { DISALLOW_COPY_AND_ASSIGN(FixedSizedImageView); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_TRAY_FIXED_SIZED_IMAGE_VIEW_H_ diff --git a/ash/system/tray/fixed_sized_scroll_view.cc b/ash/system/tray/fixed_sized_scroll_view.cc index d3fff9ad..c7a0394 100644 --- a/ash/system/tray/fixed_sized_scroll_view.cc +++ b/ash/system/tray/fixed_sized_scroll_view.cc @@ -5,7 +5,6 @@ #include "ash/system/tray/fixed_sized_scroll_view.h" namespace ash { -namespace internal { FixedSizedScrollView::FixedSizedScrollView() { set_notify_enter_exit_on_child(true); @@ -53,5 +52,4 @@ void FixedSizedScrollView::OnBoundsChanged(const gfx::Rect& previous_bounds) { contents()->SetBoundsRect(bounds); } -} // namespace internal } // namespace ash diff --git a/ash/system/tray/fixed_sized_scroll_view.h b/ash/system/tray/fixed_sized_scroll_view.h index aff53c2..d091028 100644 --- a/ash/system/tray/fixed_sized_scroll_view.h +++ b/ash/system/tray/fixed_sized_scroll_view.h @@ -10,7 +10,6 @@ #include "ui/views/controls/scroll_view.h" namespace ash { -namespace internal { // A custom scroll-view that has a specified dimension. class FixedSizedScrollView : public views::ScrollView { @@ -40,7 +39,6 @@ class FixedSizedScrollView : public views::ScrollView { DISALLOW_COPY_AND_ASSIGN(FixedSizedScrollView); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_TRAY_FIXED_SIZED_SCROLL_VIEW_H_ diff --git a/ash/system/tray/hover_highlight_view.cc b/ash/system/tray/hover_highlight_view.cc index e78944c..ac445b6 100644 --- a/ash/system/tray/hover_highlight_view.cc +++ b/ash/system/tray/hover_highlight_view.cc @@ -25,7 +25,6 @@ const int kCheckLabelPadding = 4; } // namespace namespace ash { -namespace internal { HoverHighlightView::HoverHighlightView(ViewClickListener* listener) : listener_(listener), @@ -186,5 +185,4 @@ void HoverHighlightView::OnFocus() { ActionableView::OnFocus(); } -} // namespace internal } // namespace ash diff --git a/ash/system/tray/hover_highlight_view.h b/ash/system/tray/hover_highlight_view.h index 0ca9358f..17b50ba 100644 --- a/ash/system/tray/hover_highlight_view.h +++ b/ash/system/tray/hover_highlight_view.h @@ -15,8 +15,6 @@ class Label; } namespace ash { -namespace internal { - class ViewClickListener; // A view that changes background color on hover, and triggers a callback in the @@ -87,7 +85,6 @@ class HoverHighlightView : public ActionableView { DISALLOW_COPY_AND_ASSIGN(HoverHighlightView); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_TRAY_HOVER_HIGHLIGHT_VIEW_H_ diff --git a/ash/system/tray/special_popup_row.cc b/ash/system/tray/special_popup_row.cc index f8887c3..0f6899d 100644 --- a/ash/system/tray/special_popup_row.cc +++ b/ash/system/tray/special_popup_row.cc @@ -19,8 +19,6 @@ #include "ui/views/painter.h" namespace ash { -namespace internal { - namespace { const int kIconPaddingLeft = 5; @@ -130,5 +128,4 @@ void SpecialPopupRow::Layout() { content_->SetBoundsRect(bounds); } -} // namespace internal } // namespace ash diff --git a/ash/system/tray/special_popup_row.h b/ash/system/tray/special_popup_row.h index ee068e4..7f4ea1d 100644 --- a/ash/system/tray/special_popup_row.h +++ b/ash/system/tray/special_popup_row.h @@ -13,8 +13,6 @@ class Label; } namespace ash { -namespace internal { - class ThrobberView; class TrayItemView; class TrayPopupHeaderButton; @@ -48,7 +46,6 @@ class SpecialPopupRow : public views::View { DISALLOW_COPY_AND_ASSIGN(SpecialPopupRow); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_TRAY_SPECIAL_POPUP_ROW_H_ diff --git a/ash/system/tray/system_tray.cc b/ash/system/tray/system_tray.cc index 5c1189d..18cb451 100644 --- a/ash/system/tray/system_tray.cc +++ b/ash/system/tray/system_tray.cc @@ -73,18 +73,14 @@ namespace ash { // The minimum width of the system tray menu width. const int kMinimumSystemTrayMenuWidth = 300; -namespace internal { - // Class to initialize and manage the SystemTrayBubble and TrayBubbleWrapper // instances for a bubble. class SystemBubbleWrapper { public: // Takes ownership of |bubble|. - explicit SystemBubbleWrapper(internal::SystemTrayBubble* bubble) - : bubble_(bubble), - is_persistent_(false) { - } + explicit SystemBubbleWrapper(SystemTrayBubble* bubble) + : bubble_(bubble), is_persistent_(false) {} // Initializes the bubble view and creates |bubble_wrapper_|. void InitView(TrayBackgroundView* tray, @@ -95,8 +91,7 @@ class SystemBubbleWrapper { user::LoginStatus login_status = Shell::GetInstance()->system_tray_delegate()->GetUserLoginStatus(); bubble_->InitView(anchor, login_status, init_params); - bubble_wrapper_.reset( - new internal::TrayBubbleWrapper(tray, bubble_->bubble_view())); + bubble_wrapper_.reset(new TrayBubbleWrapper(tray, bubble_->bubble_view())); if (ash::switches::UseAlternateShelfLayout()) { // The system bubble should not have an arrow. bubble_->bubble_view()->SetArrowPaintType( @@ -120,21 +115,18 @@ class SystemBubbleWrapper { bool is_persistent() const { return is_persistent_; } private: - scoped_ptr<internal::SystemTrayBubble> bubble_; - scoped_ptr<internal::TrayBubbleWrapper> bubble_wrapper_; + scoped_ptr<SystemTrayBubble> bubble_; + scoped_ptr<TrayBubbleWrapper> bubble_wrapper_; bool is_persistent_; DISALLOW_COPY_AND_ASSIGN(SystemBubbleWrapper); }; -} // namespace internal // SystemTray -using internal::SystemTrayBubble; - -SystemTray::SystemTray(internal::StatusAreaWidget* status_area_widget) - : internal::TrayBackgroundView(status_area_widget), +SystemTray::SystemTray(StatusAreaWidget* status_area_widget) + : TrayBackgroundView(status_area_widget), items_(), default_bubble_height_(0), hide_notifications_(false), @@ -156,13 +148,13 @@ SystemTray::~SystemTray() { } void SystemTray::InitializeTrayItems(SystemTrayDelegate* delegate) { - internal::TrayBackgroundView::Initialize(); + TrayBackgroundView::Initialize(); CreateItems(delegate); } void SystemTray::CreateItems(SystemTrayDelegate* delegate) { #if defined(OS_CHROMEOS) - AddTrayItem(new internal::TraySessionLengthLimit(this)); + AddTrayItem(new TraySessionLengthLimit(this)); #endif #if !defined(OS_WIN) // Create user items for each possible user. @@ -170,52 +162,51 @@ void SystemTray::CreateItems(SystemTrayDelegate* delegate) { int maximum_user_profiles = shell->session_state_delegate()->GetMaximumNumberOfLoggedInUsers(); for (int i = 0; i < maximum_user_profiles; i++) - AddTrayItem(new internal::TrayUser(this, i)); + AddTrayItem(new TrayUser(this, i)); if (maximum_user_profiles > 1) { // Add a special double line separator between users and the rest of the // menu if more then one user is logged in. - AddTrayItem(new internal::TrayUserSeparator(this)); + AddTrayItem(new TrayUserSeparator(this)); } #endif - tray_accessibility_ = new internal::TrayAccessibility(this); - tray_date_ = new internal::TrayDate(this); + tray_accessibility_ = new TrayAccessibility(this); + tray_date_ = new TrayDate(this); #if defined(OS_CHROMEOS) - AddTrayItem(new internal::TrayEnterprise(this)); - AddTrayItem(new internal::TrayLocallyManagedUser(this)); - AddTrayItem(new internal::TrayIME(this)); + AddTrayItem(new TrayEnterprise(this)); + AddTrayItem(new TrayLocallyManagedUser(this)); + AddTrayItem(new TrayIME(this)); AddTrayItem(tray_accessibility_); - AddTrayItem(new internal::TrayTracing(this)); - AddTrayItem( - new internal::TrayPower(this, message_center::MessageCenter::Get())); - AddTrayItem(new internal::TrayNetwork(this)); - AddTrayItem(new internal::TrayVPN(this)); - AddTrayItem(new internal::TraySms(this)); - AddTrayItem(new internal::TrayBluetooth(this)); - AddTrayItem(new internal::TrayDrive(this)); - AddTrayItem(new internal::TrayDisplay(this)); - AddTrayItem(new internal::ScreenCaptureTrayItem(this)); - AddTrayItem(new internal::ScreenShareTrayItem(this)); - AddTrayItem(new internal::TrayAudioChromeOs(this)); - AddTrayItem(new internal::TrayBrightness(this)); - AddTrayItem(new internal::TrayCapsLock(this)); - AddTrayItem(new internal::TraySettings(this)); - AddTrayItem(new internal::TrayUpdate(this)); + AddTrayItem(new TrayTracing(this)); + AddTrayItem(new TrayPower(this, message_center::MessageCenter::Get())); + AddTrayItem(new TrayNetwork(this)); + AddTrayItem(new TrayVPN(this)); + AddTrayItem(new TraySms(this)); + AddTrayItem(new TrayBluetooth(this)); + AddTrayItem(new TrayDrive(this)); + AddTrayItem(new TrayDisplay(this)); + AddTrayItem(new ScreenCaptureTrayItem(this)); + AddTrayItem(new ScreenShareTrayItem(this)); + AddTrayItem(new TrayAudioChromeOs(this)); + AddTrayItem(new TrayBrightness(this)); + AddTrayItem(new TrayCapsLock(this)); + AddTrayItem(new TraySettings(this)); + AddTrayItem(new TrayUpdate(this)); AddTrayItem(tray_date_); #elif defined(OS_WIN) AddTrayItem(tray_accessibility_); if (media::CoreAudioUtil::IsSupported()) - AddTrayItem(new internal::TrayAudioWin(this)); - AddTrayItem(new internal::TrayUpdate(this)); + AddTrayItem(new TrayAudioWin(this)); + AddTrayItem(new TrayUpdate(this)); AddTrayItem(tray_date_); #elif defined(OS_LINUX) - AddTrayItem(new internal::TrayIME(this)); + AddTrayItem(new TrayIME(this)); AddTrayItem(tray_accessibility_); - AddTrayItem(new internal::TrayBluetooth(this)); - AddTrayItem(new internal::TrayDrive(this)); - AddTrayItem(new internal::TrayUpdate(this)); + AddTrayItem(new TrayBluetooth(this)); + AddTrayItem(new TrayDrive(this)); + AddTrayItem(new TrayUpdate(this)); AddTrayItem(tray_date_); #endif @@ -348,7 +339,7 @@ bool SystemTray::HasNotificationBubble() const { return notification_bubble_.get() != NULL; } -internal::SystemTrayBubble* SystemTray::GetSystemBubble() { +SystemTrayBubble* SystemTray::GetSystemBubble() { if (!system_bubble_) return NULL; return system_bubble_->bubble(); @@ -501,7 +492,7 @@ void SystemTray::ShowItems(const std::vector<SystemTrayItem*>& items, if (items.size() == 1 && items[0]->ShouldHideArrow()) init_params.arrow_paint_type = views::BubbleBorder::PAINT_TRANSPARENT; SystemTrayBubble* bubble = new SystemTrayBubble(this, items, bubble_type); - system_bubble_.reset(new internal::SystemBubbleWrapper(bubble)); + system_bubble_.reset(new SystemBubbleWrapper(bubble)); system_bubble_->InitView(this, tray_container(), &init_params, persistent); } // Save height of default view for creating detailed views directly. @@ -558,8 +549,7 @@ void SystemTray::UpdateNotificationBubble() { ash::switches::UseAlternateShelfLayout(); init_params.arrow_color = kBackgroundColor; init_params.arrow_offset = GetTrayXOffset(notification_items_[0]); - notification_bubble_.reset( - new internal::SystemBubbleWrapper(notification_bubble)); + notification_bubble_.reset(new SystemBubbleWrapper(notification_bubble)); notification_bubble_->InitView(this, anchor, &init_params, false); if (notification_bubble->bubble_view()->child_count() == 0) { @@ -598,7 +588,7 @@ void SystemTray::UpdateWebNotifications() { void SystemTray::SetShelfAlignment(ShelfAlignment alignment) { if (alignment == shelf_alignment()) return; - internal::TrayBackgroundView::SetShelfAlignment(alignment); + TrayBackgroundView::SetShelfAlignment(alignment); UpdateAfterShelfAlignmentChange(alignment); // Destroy any existing bubble so that it is rebuilt correctly. CloseSystemBubbleAndDeactivateSystemTray(); @@ -686,9 +676,7 @@ views::View* SystemTray::GetTrayItemViewForTest(SystemTrayItem* item) { return it == tray_item_map_.end() ? NULL : it->second; } -internal::TrayDate* SystemTray::GetTrayDateForTesting() const { - return tray_date_; -} +TrayDate* SystemTray::GetTrayDateForTesting() const { return tray_date_; } bool SystemTray::PerformAction(const ui::Event& event) { // If we're already showing the default view, hide it; otherwise, show it diff --git a/ash/system/tray/system_tray.h b/ash/system/tray/system_tray.h index 7c5aa4f..3370c7d 100644 --- a/ash/system/tray/system_tray.h +++ b/ash/system/tray/system_tray.h @@ -20,16 +20,12 @@ #include <vector> namespace ash { - +class SystemBubbleWrapper; class SystemTrayDelegate; class SystemTrayItem; - -namespace internal { -class SystemBubbleWrapper; class TrayAccessibility; class TrayDate; class TrayUser; -} // There are different methods for creating bubble views. enum BubbleCreationType { @@ -37,10 +33,10 @@ enum BubbleCreationType { BUBBLE_USE_EXISTING, // Uses any existing bubble, or creates a new one. }; -class ASH_EXPORT SystemTray : public internal::TrayBackgroundView, +class ASH_EXPORT SystemTray : public TrayBackgroundView, public views::TrayBubbleView::Delegate { public: - explicit SystemTray(internal::StatusAreaWidget* status_area_widget); + explicit SystemTray(StatusAreaWidget* status_area_widget); virtual ~SystemTray(); // Calls TrayBackgroundView::Initialize(), creates the tray items, and @@ -102,10 +98,10 @@ class ASH_EXPORT SystemTray : public internal::TrayBackgroundView, bool HasNotificationBubble() const; // Returns true if the system_bubble_ exists and is of type |type|. - bool HasSystemBubbleType(internal::SystemTrayBubble::BubbleType type); + bool HasSystemBubbleType(SystemTrayBubble::BubbleType type); // Returns a pointer to the system bubble or NULL if none. - internal::SystemTrayBubble* GetSystemBubble(); + SystemTrayBubble* GetSystemBubble(); // Returns true if any bubble is visible. bool IsAnyBubbleVisible() const; @@ -144,7 +140,7 @@ class ASH_EXPORT SystemTray : public internal::TrayBackgroundView, AnchorAlignment anchor_alignment) OVERRIDE; virtual void HideBubble(const views::TrayBubbleView* bubble_view) OVERRIDE; - internal::TrayAccessibility* GetTrayAccessibilityForTest() { + TrayAccessibility* GetTrayAccessibilityForTest() { return tray_accessibility_; } @@ -152,7 +148,7 @@ class ASH_EXPORT SystemTray : public internal::TrayBackgroundView, views::View* GetTrayItemViewForTest(SystemTrayItem* tray_item); // Gets tray_date_ for browser tests. - internal::TrayDate* GetTrayDateForTesting() const; + TrayDate* GetTrayDateForTesting() const; private: // Creates the default set of items for the sytem tray. @@ -196,7 +192,7 @@ class ASH_EXPORT SystemTray : public internal::TrayBackgroundView, const ScopedVector<SystemTrayItem>& items() const { return items_; } - // Overridden from internal::ActionableView. + // Overridden from ActionableView. virtual bool PerformAction(const ui::Event& event) OVERRIDE; // Owned items. @@ -210,10 +206,10 @@ class ASH_EXPORT SystemTray : public internal::TrayBackgroundView, std::map<SystemTrayItem*, views::View*> tray_item_map_; // Bubble for default and detailed views. - scoped_ptr<internal::SystemBubbleWrapper> system_bubble_; + scoped_ptr<SystemBubbleWrapper> system_bubble_; // Bubble for notifications. - scoped_ptr<internal::SystemBubbleWrapper> notification_bubble_; + scoped_ptr<SystemBubbleWrapper> notification_bubble_; // Keep track of the default view height so that when we create detailed // views directly (e.g. from a notification) we know what height to use. @@ -228,8 +224,8 @@ class ASH_EXPORT SystemTray : public internal::TrayBackgroundView, // Note that the value is only valid when |system_bubble_| is true. bool full_system_tray_menu_; - internal::TrayAccessibility* tray_accessibility_; // not owned - internal::TrayDate* tray_date_; + TrayAccessibility* tray_accessibility_; // not owned + TrayDate* tray_date_; DISALLOW_COPY_AND_ASSIGN(SystemTray); }; diff --git a/ash/system/tray/system_tray_bubble.cc b/ash/system/tray/system_tray_bubble.cc index 0316b54..1aedaf0 100644 --- a/ash/system/tray/system_tray_bubble.cc +++ b/ash/system/tray/system_tray_bubble.cc @@ -127,8 +127,6 @@ class AnimationObserverDeleteLayer : public ui::ImplicitAnimationObserver { } // namespace -namespace internal { - // SystemTrayBubble SystemTrayBubble::SystemTrayBubble( @@ -384,5 +382,4 @@ void SystemTrayBubble::CreateItemViews(user::LoginStatus login_status) { focus_view->RequestFocus(); } -} // namespace internal } // namespace ash diff --git a/ash/system/tray/system_tray_bubble.h b/ash/system/tray/system_tray_bubble.h index a8f576e..ece879c 100644 --- a/ash/system/tray/system_tray_bubble.h +++ b/ash/system/tray/system_tray_bubble.h @@ -14,12 +14,9 @@ #include <vector> namespace ash { - class SystemTray; class SystemTrayItem; -namespace internal { - class SystemTrayBubble { public: enum BubbleType { @@ -76,7 +73,6 @@ class SystemTrayBubble { DISALLOW_COPY_AND_ASSIGN(SystemTrayBubble); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_BUBBLE_H_ diff --git a/ash/system/tray/system_tray_item.h b/ash/system/tray/system_tray_item.h index b0d1284..61d214e 100644 --- a/ash/system/tray/system_tray_item.h +++ b/ash/system/tray/system_tray_item.h @@ -16,12 +16,8 @@ class View; } namespace ash { - class SystemTray; - -namespace internal { class TrayItemView; -} class ASH_EXPORT SystemTrayItem { public: diff --git a/ash/system/tray/system_tray_unittest.cc b/ash/system/tray/system_tray_unittest.cc index 03ee4e4..281fd7c 100644 --- a/ash/system/tray/system_tray_unittest.cc +++ b/ash/system/tray/system_tray_unittest.cc @@ -173,7 +173,7 @@ TEST_F(SystemTrayTest, SystemTrayColoring) { TEST_F(SystemTrayTest, SystemTrayColoringAfterAlignmentChange) { SystemTray* tray = GetSystemTray(); ASSERT_TRUE(tray->GetWidget()); - internal::ShelfLayoutManager* manager = + ShelfLayoutManager* manager = Shell::GetPrimaryRootWindowController()->shelf()->shelf_layout_manager(); manager->SetAlignment(SHELF_ALIGNMENT_BOTTOM); // At the beginning the tray coloring is not active. @@ -343,9 +343,9 @@ TEST_F(SystemTrayTest, BubbleCreationTypesTest) { // Tests that the tray is laid out properly and is fully contained within // the shelf. TEST_F(SystemTrayTest, TrayBoundsInWidget) { - internal::ShelfLayoutManager* manager = + ShelfLayoutManager* manager = Shell::GetPrimaryRootWindowController()->shelf()->shelf_layout_manager(); - internal::StatusAreaWidget* widget = + StatusAreaWidget* widget = Shell::GetPrimaryRootWindowController()->shelf()->status_area_widget(); SystemTray* tray = widget->system_tray(); diff --git a/ash/system/tray/throbber_view.cc b/ash/system/tray/throbber_view.cc index 2c2cc20..c24b291 100644 --- a/ash/system/tray/throbber_view.cc +++ b/ash/system/tray/throbber_view.cc @@ -11,8 +11,6 @@ #include "ui/compositor/scoped_layer_animation_settings.h" namespace ash { -namespace internal { - namespace { // Time in ms per throbber frame. @@ -106,5 +104,4 @@ void ThrobberView::ScheduleAnimation(bool start_throbber) { layer()->SetOpacity(start_throbber ? 1.0 : 0.0); } -} // namespace internal } // namespace ash diff --git a/ash/system/tray/throbber_view.h b/ash/system/tray/throbber_view.h index 0f26632..c3f2004 100644 --- a/ash/system/tray/throbber_view.h +++ b/ash/system/tray/throbber_view.h @@ -10,7 +10,6 @@ #include "ui/views/view.h" namespace ash { -namespace internal { // A SmoothedThrobber with tooltip. class SystemTrayThrobber : public views::SmoothedThrobber { @@ -59,7 +58,6 @@ class ThrobberView : public views::View { DISALLOW_COPY_AND_ASSIGN(ThrobberView); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_TRAY_THROBBER_VIEW_H_ diff --git a/ash/system/tray/tray_background_view.cc b/ash/system/tray/tray_background_view.cc index f6af7c8..2e7b790 100644 --- a/ash/system/tray/tray_background_view.cc +++ b/ash/system/tray/tray_background_view.cc @@ -50,7 +50,6 @@ const int kAnimationDurationForPopupMS = 200; using views::TrayBubbleView; namespace ash { -namespace internal { // static const char TrayBackgroundView::kViewClassName[] = "tray/TrayBackgroundView"; @@ -316,15 +315,16 @@ void TrayBackgroundView::TrayContainer::UpdateLayout() { //////////////////////////////////////////////////////////////////////////////// // TrayBackgroundView -TrayBackgroundView::TrayBackgroundView( - internal::StatusAreaWidget* status_area_widget) +TrayBackgroundView::TrayBackgroundView(StatusAreaWidget* status_area_widget) : status_area_widget_(status_area_widget), tray_container_(NULL), shelf_alignment_(SHELF_ALIGNMENT_BOTTOM), background_(NULL), hide_background_animator_(this, 0, kTrayBackgroundAlpha), hover_background_animator_( - this, 0, kTrayBackgroundHoverAlpha - kTrayBackgroundAlpha), + this, + 0, + kTrayBackgroundHoverAlpha - kTrayBackgroundAlpha), hovered_(false), draw_background_as_active_(false), widget_observer_(new TrayWidgetObserver(this)) { @@ -422,7 +422,7 @@ void TrayBackgroundView::SetPaintsBackground( } void TrayBackgroundView::SetContentsBackground() { - background_ = new internal::TrayBackground(this); + background_ = new TrayBackground(this); tray_container_->set_background(background_); } @@ -507,7 +507,7 @@ void TrayBackgroundView::InitializeBubbleAnimations( aura::Window* TrayBackgroundView::GetBubbleWindowContainer() const { return ash::Shell::GetContainer( tray_container()->GetWidget()->GetNativeWindow()->GetRootWindow(), - ash::internal::kShellWindowId_SettingBubbleContainer); + ash::kShellWindowId_SettingBubbleContainer); } gfx::Rect TrayBackgroundView::GetBubbleAnchorRect( @@ -620,13 +620,11 @@ void TrayBackgroundView::UpdateBubbleViewArrow( aura::Window* root_window = bubble_view->GetWidget()->GetNativeView()->GetRootWindow(); - ash::internal::ShelfLayoutManager* shelf = - ShelfLayoutManager::ForShelf(root_window); + ash::ShelfLayoutManager* shelf = ShelfLayoutManager::ForShelf(root_window); bubble_view->SetArrowPaintType( (shelf && shelf->IsVisible()) ? views::BubbleBorder::PAINT_NORMAL : views::BubbleBorder::PAINT_TRANSPARENT); } -} // namespace internal } // namespace ash diff --git a/ash/system/tray/tray_background_view.h b/ash/system/tray/tray_background_view.h index 4addcba..365e63a 100644 --- a/ash/system/tray/tray_background_view.h +++ b/ash/system/tray/tray_background_view.h @@ -12,8 +12,6 @@ #include "ui/views/bubble/tray_bubble_view.h" namespace ash { -namespace internal { - class ShelfLayoutManager; class StatusAreaWidget; class TrayEventFilter; @@ -59,7 +57,7 @@ class ASH_EXPORT TrayBackgroundView : public ActionableView, DISALLOW_COPY_AND_ASSIGN(TrayContainer); }; - explicit TrayBackgroundView(internal::StatusAreaWidget* status_area_widget); + explicit TrayBackgroundView(StatusAreaWidget* status_area_widget); virtual ~TrayBackgroundView(); // Called after the tray has been added to the widget containing it. @@ -73,11 +71,11 @@ class ASH_EXPORT TrayBackgroundView : public ActionableView, virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE; virtual void AboutToRequestFocusFromTabTraversal(bool reverse) OVERRIDE; - // Overridden from internal::ActionableView. + // Overridden from ActionableView. virtual bool PerformAction(const ui::Event& event) OVERRIDE; virtual gfx::Rect GetFocusBounds() OVERRIDE; - // Overridden from internal::BackgroundAnimatorDelegate. + // Overridden from BackgroundAnimatorDelegate. virtual void UpdateBackground(int alpha) OVERRIDE; // Called whenever the shelf alignment changes. @@ -164,11 +162,11 @@ class ASH_EXPORT TrayBackgroundView : public ActionableView, ShelfAlignment shelf_alignment_; // Owned by the view passed to SetContents(). - internal::TrayBackground* background_; + TrayBackground* background_; // Animators for the background. They are only used for the old shelf layout. - internal::BackgroundAnimator hide_background_animator_; - internal::BackgroundAnimator hover_background_animator_; + BackgroundAnimator hide_background_animator_; + BackgroundAnimator hover_background_animator_; // True if the background gets hovered. bool hovered_; @@ -183,7 +181,6 @@ class ASH_EXPORT TrayBackgroundView : public ActionableView, DISALLOW_COPY_AND_ASSIGN(TrayBackgroundView); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_TRAY_TRAY_BACKGROUND_VIEW_H_ diff --git a/ash/system/tray/tray_bar_button_with_title.cc b/ash/system/tray/tray_bar_button_with_title.cc index 0fd94d84..a292a55 100644 --- a/ash/system/tray/tray_bar_button_with_title.cc +++ b/ash/system/tray/tray_bar_button_with_title.cc @@ -13,8 +13,6 @@ #include "ui/views/painter.h" namespace ash { -namespace internal { - namespace { const int kBarImagesActive[] = { @@ -109,5 +107,4 @@ void TrayBarButtonWithTitle::Layout() { } } -} // namespace internal } // namespace ash diff --git a/ash/system/tray/tray_bar_button_with_title.h b/ash/system/tray/tray_bar_button_with_title.h index 8b63d4f..626a14a 100644 --- a/ash/system/tray/tray_bar_button_with_title.h +++ b/ash/system/tray/tray_bar_button_with_title.h @@ -14,7 +14,6 @@ class Label; } namespace ash { -namespace internal { // A button with a bar image and title text below the bar image. These buttons // will be used in audio and brightness control UI, which can be toggled with @@ -43,7 +42,6 @@ class TrayBarButtonWithTitle : public views::CustomButton { DISALLOW_COPY_AND_ASSIGN(TrayBarButtonWithTitle); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_TRAY_TRAY_BAR_BUTTON_WITH_TITLE_H_ diff --git a/ash/system/tray/tray_bubble_wrapper.cc b/ash/system/tray/tray_bubble_wrapper.cc index 5bd0c96..3576f6c 100644 --- a/ash/system/tray/tray_bubble_wrapper.cc +++ b/ash/system/tray/tray_bubble_wrapper.cc @@ -14,7 +14,6 @@ #include "ui/views/widget/widget.h" namespace ash { -namespace internal { TrayBubbleWrapper::TrayBubbleWrapper(TrayBackgroundView* tray, views::TrayBubbleView* bubble_view) @@ -60,5 +59,4 @@ void TrayBubbleWrapper::OnWidgetBoundsChanged(views::Widget* widget, tray_->BubbleResized(bubble_view_); } -} // namespace internal } // namespace ash diff --git a/ash/system/tray/tray_bubble_wrapper.h b/ash/system/tray/tray_bubble_wrapper.h index 9ce443a..102e07e 100644 --- a/ash/system/tray/tray_bubble_wrapper.h +++ b/ash/system/tray/tray_bubble_wrapper.h @@ -14,8 +14,6 @@ class TrayBubbleView; } namespace ash { -namespace internal { - class TrayBackgroundView; class TrayEventFilter; @@ -45,7 +43,6 @@ class TrayBubbleWrapper : public views::WidgetObserver { DISALLOW_COPY_AND_ASSIGN(TrayBubbleWrapper); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_TRAY_TRAY_BUBBLE_WRAPPER_H_ diff --git a/ash/system/tray/tray_details_view.cc b/ash/system/tray/tray_details_view.cc index 1d8e3d8..1e439a3 100644 --- a/ash/system/tray/tray_details_view.cc +++ b/ash/system/tray/tray_details_view.cc @@ -15,7 +15,6 @@ #include "ui/views/layout/box_layout.h" namespace ash { -namespace internal { class ScrollSeparator : public views::View { public: @@ -161,5 +160,4 @@ void TrayDetailsView::OnPaintBorder(gfx::Canvas* canvas) { views::View::OnPaintBorder(canvas); } -} // namespace internal } // namespace ash diff --git a/ash/system/tray/tray_details_view.h b/ash/system/tray/tray_details_view.h index 767670e..6193594 100644 --- a/ash/system/tray/tray_details_view.h +++ b/ash/system/tray/tray_details_view.h @@ -14,13 +14,9 @@ class ScrollView; } namespace ash { - -class SystemTrayItem; - -namespace internal { - class FixedSizedScrollView; class ScrollBorder; +class SystemTrayItem; class ViewClickListener; class ASH_EXPORT TrayDetailsView : public views::View { @@ -67,7 +63,6 @@ class ASH_EXPORT TrayDetailsView : public views::View { DISALLOW_COPY_AND_ASSIGN(TrayDetailsView); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_TRAY_TRAY_DETAILS_VIEW_H_ diff --git a/ash/system/tray/tray_details_view_unittest.cc b/ash/system/tray/tray_details_view_unittest.cc index c608120..50c89c0 100644 --- a/ash/system/tray/tray_details_view_unittest.cc +++ b/ash/system/tray/tray_details_view_unittest.cc @@ -29,11 +29,9 @@ SystemTray* GetSystemTray() { status_area_widget()->system_tray(); } -class TestDetailsView : public internal::TrayDetailsView, - public internal::ViewClickListener { +class TestDetailsView : public TrayDetailsView, public ViewClickListener { public: - explicit TestDetailsView(SystemTrayItem* owner) - : internal::TrayDetailsView(owner) {} + explicit TestDetailsView(SystemTrayItem* owner) : TrayDetailsView(owner) {} virtual ~TestDetailsView() {} @@ -44,7 +42,7 @@ class TestDetailsView : public internal::TrayDetailsView, footer()->content()->RequestFocus(); } - // Overridden from internal::ViewClickListener: + // Overridden from ViewClickListener: virtual void OnViewClicked(views::View* sender) OVERRIDE {} private: diff --git a/ash/system/tray/tray_empty.cc b/ash/system/tray/tray_empty.cc index 45ecb32..bd2b7a1 100644 --- a/ash/system/tray/tray_empty.cc +++ b/ash/system/tray/tray_empty.cc @@ -26,7 +26,6 @@ class EmptyBackground : public views::Background { } namespace ash { -namespace internal { TrayEmpty::TrayEmpty(SystemTray* system_tray) : SystemTrayItem(system_tray) { @@ -64,5 +63,4 @@ void TrayEmpty::DestroyDetailedView() {} void TrayEmpty::UpdateAfterLoginStatusChange(user::LoginStatus status) {} -} // namespace internal } // namespace ash diff --git a/ash/system/tray/tray_empty.h b/ash/system/tray/tray_empty.h index a7575cf..c4be08c 100644 --- a/ash/system/tray/tray_empty.h +++ b/ash/system/tray/tray_empty.h @@ -8,7 +8,6 @@ #include "ash/system/tray/system_tray_item.h" namespace ash { -namespace internal { class TrayEmpty : public SystemTrayItem { public: @@ -28,7 +27,6 @@ class TrayEmpty : public SystemTrayItem { DISALLOW_COPY_AND_ASSIGN(TrayEmpty); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_TRAY_TRAY_EMPTY_H_ diff --git a/ash/system/tray/tray_event_filter.cc b/ash/system/tray/tray_event_filter.cc index d15c83d..5ed0122 100644 --- a/ash/system/tray/tray_event_filter.cc +++ b/ash/system/tray/tray_event_filter.cc @@ -18,7 +18,6 @@ #include "ui/views/widget/widget.h" namespace ash { -namespace internal { TrayEventFilter::TrayEventFilter() { } @@ -56,10 +55,11 @@ bool TrayEventFilter::ProcessLocatedEvent(ui::LocatedEvent* event) { if (event->target()) { aura::Window* target = static_cast<aura::Window*>(event->target()); // Don't process events that occurred inside an embedded menu. - internal::RootWindowController* root_controller = - internal::GetRootWindowController(target->GetRootWindow()); - if (root_controller && root_controller->GetContainer( - internal::kShellWindowId_MenuContainer)->Contains(target)) { + RootWindowController* root_controller = + GetRootWindowController(target->GetRootWindow()); + if (root_controller && + root_controller->GetContainer(kShellWindowId_MenuContainer) + ->Contains(target)) { return false; } } @@ -109,5 +109,4 @@ bool TrayEventFilter::ProcessLocatedEvent(ui::LocatedEvent* event) { return handled; } -} // namespace internal } // namespace ash diff --git a/ash/system/tray/tray_event_filter.h b/ash/system/tray/tray_event_filter.h index 4059315..e77e00f 100644 --- a/ash/system/tray/tray_event_filter.h +++ b/ash/system/tray/tray_event_filter.h @@ -16,8 +16,6 @@ class Window; } namespace ash { -namespace internal { - class TrayBubbleWrapper; // Handles events for a tray bubble. @@ -43,7 +41,6 @@ class TrayEventFilter : public ui::EventHandler { DISALLOW_COPY_AND_ASSIGN(TrayEventFilter); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_TRAY_TRAY_EVENT_FILTER_H_ diff --git a/ash/system/tray/tray_image_item.cc b/ash/system/tray/tray_image_item.cc index 7c5e216..386897c 100644 --- a/ash/system/tray/tray_image_item.cc +++ b/ash/system/tray/tray_image_item.cc @@ -13,7 +13,6 @@ #include "ui/views/layout/box_layout.h" namespace ash { -namespace internal { TrayImageItem::TrayImageItem(SystemTray* system_tray, int resource_id) : SystemTrayItem(system_tray), @@ -89,5 +88,4 @@ void TrayImageItem::SetItemAlignment(ShelfAlignment alignment) { tray_view_->Layout(); } -} // namespace internal } // namespace ash diff --git a/ash/system/tray/tray_image_item.h b/ash/system/tray/tray_image_item.h index 6dea5c8..6fad95f 100644 --- a/ash/system/tray/tray_image_item.h +++ b/ash/system/tray/tray_image_item.h @@ -12,8 +12,6 @@ class ImageView; } namespace ash { -namespace internal { - class TrayItemView; class TrayImageItem : public SystemTrayItem { @@ -50,7 +48,6 @@ class TrayImageItem : public SystemTrayItem { DISALLOW_COPY_AND_ASSIGN(TrayImageItem); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_TRAY_TRAY_IMAGE_ITEM_H_ diff --git a/ash/system/tray/tray_item_more.cc b/ash/system/tray/tray_item_more.cc index 687e697..29799ea 100644 --- a/ash/system/tray/tray_item_more.cc +++ b/ash/system/tray/tray_item_more.cc @@ -16,7 +16,6 @@ #include "ui/views/layout/box_layout.h" namespace ash { -namespace internal { TrayItemMore::TrayItemMore(SystemTrayItem* owner, bool show_more) : owner_(owner), @@ -103,5 +102,4 @@ void TrayItemMore::GetAccessibleState(ui::AXViewState* state) { state->name = accessible_name_; } -} // namespace internal } // namespace ash diff --git a/ash/system/tray/tray_item_more.h b/ash/system/tray/tray_item_more.h index ae668c5..e61f5de 100644 --- a/ash/system/tray/tray_item_more.h +++ b/ash/system/tray/tray_item_more.h @@ -15,11 +15,8 @@ class View; } namespace ash { - class SystemTrayItem; -namespace internal { - // A view with a chevron ('>') on the right edge. Clicking on the view brings up // the detailed view of the tray-item that owns it. class TrayItemMore : public ActionableView { @@ -58,7 +55,6 @@ class TrayItemMore : public ActionableView { DISALLOW_COPY_AND_ASSIGN(TrayItemMore); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_TRAY_TRAY_ITEM_MORE_H_ diff --git a/ash/system/tray/tray_item_view.cc b/ash/system/tray/tray_item_view.cc index 9a7a75c4..b2177f9 100644 --- a/ash/system/tray/tray_item_view.cc +++ b/ash/system/tray/tray_item_view.cc @@ -24,7 +24,6 @@ bool animations_enabled = true; } namespace ash { -namespace internal { TrayItemView::TrayItemView(SystemTrayItem* owner) : owner_(owner), @@ -137,5 +136,4 @@ void TrayItemView::AnimationCanceled(const gfx::Animation* animation) { AnimationEnded(animation); } -} // namespace internal } // namespace ash diff --git a/ash/system/tray/tray_item_view.h b/ash/system/tray/tray_item_view.h index 761e918..854af3c 100644 --- a/ash/system/tray/tray_item_view.h +++ b/ash/system/tray/tray_item_view.h @@ -19,11 +19,8 @@ class Label; } namespace ash { - class SystemTrayItem; -namespace internal { - // Base-class for items in the tray. It makes sure the widget is updated // correctly when the visibility/size of the tray item changes. It also adds // animation when showing/hiding the item in the tray. @@ -79,7 +76,6 @@ class ASH_EXPORT TrayItemView : public views::View, DISALLOW_COPY_AND_ASSIGN(TrayItemView); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_TRAY_TRAY_ITEM_VIEW_H_ diff --git a/ash/system/tray/tray_notification_view.cc b/ash/system/tray/tray_notification_view.cc index c095892..d27296f 100644 --- a/ash/system/tray/tray_notification_view.cc +++ b/ash/system/tray/tray_notification_view.cc @@ -16,7 +16,6 @@ #include "ui/views/layout/grid_layout.h" namespace ash { -namespace internal { TrayNotificationView::TrayNotificationView(SystemTrayItem* owner, int icon_id) : owner_(owner), @@ -168,5 +167,4 @@ void TrayNotificationView::HandleClickAction() { OnClickAction(); } -} // namespace internal } // namespace ash diff --git a/ash/system/tray/tray_notification_view.h b/ash/system/tray/tray_notification_view.h index 314b8aa..28c2236 100644 --- a/ash/system/tray/tray_notification_view.h +++ b/ash/system/tray/tray_notification_view.h @@ -18,11 +18,8 @@ class ImageView; } namespace ash { - class SystemTrayItem; -namespace internal { - // A view for closable notification views, laid out like: // ------------------- // | icon contents x | @@ -92,7 +89,6 @@ class TrayNotificationView : public views::SlideOutView, DISALLOW_COPY_AND_ASSIGN(TrayNotificationView); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_TRAY_TRAY_NOTIFICATION_VIEW_H_ diff --git a/ash/system/tray/tray_popup_header_button.cc b/ash/system/tray/tray_popup_header_button.cc index d19cbc5..50c1356 100644 --- a/ash/system/tray/tray_popup_header_button.cc +++ b/ash/system/tray/tray_popup_header_button.cc @@ -11,7 +11,6 @@ #include "ui/views/painter.h" namespace ash { -namespace internal { // static const char TrayPopupHeaderButton::kViewClassName[] = @@ -66,5 +65,4 @@ void TrayPopupHeaderButton::StateChanged() { SchedulePaint(); } -} // namespace internal } // namespace ash diff --git a/ash/system/tray/tray_popup_header_button.h b/ash/system/tray/tray_popup_header_button.h index 37849bc..054530b 100644 --- a/ash/system/tray/tray_popup_header_button.h +++ b/ash/system/tray/tray_popup_header_button.h @@ -11,7 +11,6 @@ #include "ui/views/controls/button/image_button.h" namespace ash { -namespace internal { // A ToggleImageButton with fixed size, paddings and hover effects. These // buttons are used in the header. @@ -39,7 +38,6 @@ class ASH_EXPORT TrayPopupHeaderButton : public views::ToggleImageButton { DISALLOW_COPY_AND_ASSIGN(TrayPopupHeaderButton); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_TRAY_TRAY_POPUP_HEADER_BUTTON_H_ diff --git a/ash/system/tray/tray_popup_label_button.cc b/ash/system/tray/tray_popup_label_button.cc index 4f80288..cca2f9e 100644 --- a/ash/system/tray/tray_popup_label_button.cc +++ b/ash/system/tray/tray_popup_label_button.cc @@ -11,7 +11,6 @@ #include "ui/views/painter.h" namespace ash { -namespace internal { TrayPopupLabelButton::TrayPopupLabelButton(views::ButtonListener* listener, const base::string16& text) @@ -28,5 +27,4 @@ TrayPopupLabelButton::TrayPopupLabelButton(views::ButtonListener* listener, TrayPopupLabelButton::~TrayPopupLabelButton() {} -} // namespace internal } // namespace ash diff --git a/ash/system/tray/tray_popup_label_button.h b/ash/system/tray/tray_popup_label_button.h index a1f9db6..82d34f4 100644 --- a/ash/system/tray/tray_popup_label_button.h +++ b/ash/system/tray/tray_popup_label_button.h @@ -11,7 +11,6 @@ #include "ui/views/controls/button/label_button.h" namespace ash { -namespace internal { // A label button with custom alignment, border and focus border. class TrayPopupLabelButton : public views::LabelButton { @@ -24,7 +23,6 @@ class TrayPopupLabelButton : public views::LabelButton { DISALLOW_COPY_AND_ASSIGN(TrayPopupLabelButton); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_TRAY_TRAY_POPUP_LABEL_BUTTON_H_ diff --git a/ash/system/tray/tray_popup_label_button_border.cc b/ash/system/tray/tray_popup_label_button_border.cc index d5be6bc..ba50b53 100644 --- a/ash/system/tray/tray_popup_label_button_border.cc +++ b/ash/system/tray/tray_popup_label_button_border.cc @@ -13,7 +13,6 @@ #include "ui/views/native_theme_delegate.h" namespace ash { -namespace internal { TrayPopupLabelButtonBorder::TrayPopupLabelButtonBorder() : LabelButtonBorder(views::Button::STYLE_TEXTBUTTON) { @@ -97,5 +96,4 @@ void TrayPopupLabelButtonBorder::Paint(const views::View& view, } } -} // namespace internal } // namespace ash diff --git a/ash/system/tray/tray_popup_label_button_border.h b/ash/system/tray/tray_popup_label_button_border.h index 04e5c73..8207d89 100644 --- a/ash/system/tray/tray_popup_label_button_border.h +++ b/ash/system/tray/tray_popup_label_button_border.h @@ -10,7 +10,6 @@ #include "ui/views/controls/button/label_button_border.h" namespace ash { -namespace internal { // A border for label buttons that paints a vertical separator in normal state // and a custom hover effect in hovered or pressed state. @@ -26,7 +25,6 @@ class TrayPopupLabelButtonBorder : public views::LabelButtonBorder { DISALLOW_COPY_AND_ASSIGN(TrayPopupLabelButtonBorder); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_TRAY_TRAY_POPUP_LABEL_BUTTON_BORDER_H_ diff --git a/ash/system/tray/tray_utils.cc b/ash/system/tray/tray_utils.cc index 0145eae..2153117 100644 --- a/ash/system/tray/tray_utils.cc +++ b/ash/system/tray/tray_utils.cc @@ -11,7 +11,6 @@ #include "ui/views/controls/label.h" namespace ash { -namespace internal { void SetupLabelForTray(views::Label* label) { // Making label_font static to avoid the time penalty of Derive for all but @@ -67,5 +66,4 @@ void SetTrayLabelItemBorder(TrayItemView* tray_view, } } -} // namespace internal } // namespace ash diff --git a/ash/system/tray/tray_utils.h b/ash/system/tray/tray_utils.h index 412fb97..04dc0d6 100644 --- a/ash/system/tray/tray_utils.h +++ b/ash/system/tray/tray_utils.h @@ -13,7 +13,6 @@ class View; } namespace ash { -namespace internal { class TrayItemView; @@ -29,7 +28,6 @@ void SetTrayImageItemBorder(views::View* tray_view, ShelfAlignment alignment); void SetTrayLabelItemBorder(TrayItemView* tray_view, ShelfAlignment alignment); -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_TRAY_TRAY_UTILS_H_ diff --git a/ash/system/tray/view_click_listener.h b/ash/system/tray/view_click_listener.h index b5f4bb8..f1cc3d2 100644 --- a/ash/system/tray/view_click_listener.h +++ b/ash/system/tray/view_click_listener.h @@ -10,7 +10,6 @@ class View; } namespace ash { -namespace internal { class ViewClickListener { public: @@ -20,7 +19,6 @@ class ViewClickListener { virtual ~ViewClickListener() {} }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_TRAY_VIEW_CLICK_LISTENER_H_ diff --git a/ash/system/tray_accessibility.cc b/ash/system/tray_accessibility.cc index 073b8989..1c2fe22 100644 --- a/ash/system/tray_accessibility.cc +++ b/ash/system/tray_accessibility.cc @@ -27,8 +27,6 @@ #include "ui/views/widget/widget.h" namespace ash { -namespace internal { - namespace { enum AccessibilityState { @@ -92,7 +90,7 @@ class DefaultAccessibilityView : public TrayItemMore { }; //////////////////////////////////////////////////////////////////////////////// -// ash::internal::tray::AccessibilityPopupView +// ash::tray::AccessibilityPopupView AccessibilityPopupView::AccessibilityPopupView(SystemTrayItem* owner, uint32 enabled_state_bits) @@ -122,7 +120,7 @@ views::Label* AccessibilityPopupView::CreateLabel(uint32 enabled_state_bits) { } //////////////////////////////////////////////////////////////////////////////// -// ash::internal::tray::AccessibilityDetailedView +// ash::tray::AccessibilityDetailedView AccessibilityDetailedView::AccessibilityDetailedView( SystemTrayItem* owner, user::LoginStatus login) : @@ -308,7 +306,7 @@ void AccessibilityDetailedView::ButtonPressed(views::Button* sender, } // namespace tray //////////////////////////////////////////////////////////////////////////////// -// ash::internal::TrayAccessibility +// ash::TrayAccessibility TrayAccessibility::TrayAccessibility(SystemTray* system_tray) : TrayImageItem(system_tray, IDR_AURA_UBER_TRAY_ACCESSIBILITY), @@ -434,5 +432,4 @@ void TrayAccessibility::OnAccessibilityModeChanged( previous_accessibility_state_ = accessibility_state; } -} // namespace internal } // namespace ash diff --git a/ash/system/tray_accessibility.h b/ash/system/tray_accessibility.h index df0a186..b2bc648 100644 --- a/ash/system/tray_accessibility.h +++ b/ash/system/tray_accessibility.h @@ -27,7 +27,7 @@ class View; } namespace ash { - +class HoverHighlightView; class SystemTrayItem; class ASH_EXPORT AccessibilityObserver { @@ -39,9 +39,6 @@ class ASH_EXPORT AccessibilityObserver { AccessibilityNotificationVisibility notify) = 0; }; -namespace internal { - -class HoverHighlightView; namespace tray { @@ -150,7 +147,6 @@ class TrayAccessibility : public TrayImageItem, DISALLOW_COPY_AND_ASSIGN(TrayAccessibility); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_TRAY_ACCESSIBILITY_H_ diff --git a/ash/system/tray_update.cc b/ash/system/tray_update.cc index e01dd97..79a3ad6 100644 --- a/ash/system/tray_update.cc +++ b/ash/system/tray_update.cc @@ -60,7 +60,7 @@ int DecideResource(ash::UpdateObserver::UpdateSeverity severity, bool dark) { return 0; } -class UpdateView : public ash::internal::ActionableView { +class UpdateView : public ash::ActionableView { public: explicit UpdateView(ash::UpdateObserver::UpdateSeverity severity) { SetLayoutManager(new @@ -70,7 +70,7 @@ class UpdateView : public ash::internal::ActionableView { ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); views::ImageView* image = - new ash::internal::FixedSizedImageView(0, ash::kTrayPopupItemHeight); + new ash::FixedSizedImageView(0, ash::kTrayPopupItemHeight); image->SetImage(bundle.GetImageNamed(DecideResource(severity, true)). ToImageSkia()); @@ -96,8 +96,6 @@ class UpdateView : public ash::internal::ActionableView { } namespace ash { -namespace internal { - namespace tray { class UpdateNagger : public ui::LayerAnimationObserver { @@ -110,7 +108,7 @@ class UpdateNagger : public ui::LayerAnimationObserver { } virtual ~UpdateNagger() { - internal::StatusAreaWidget* status_area = + StatusAreaWidget* status_area = Shell::GetPrimaryRootWindowController()->shelf()->status_area_widget(); if (status_area) { status_area->system_tray()->GetWidget()->GetNativeView()->layer()-> @@ -201,5 +199,4 @@ void TrayUpdate::OnUpdateRecommended(UpdateObserver::UpdateSeverity severity) { } } -} // namespace internal } // namespace ash diff --git a/ash/system/tray_update.h b/ash/system/tray_update.h index 123cde1..d6212c0 100644 --- a/ash/system/tray_update.h +++ b/ash/system/tray_update.h @@ -14,7 +14,6 @@ class View; } namespace ash { -namespace internal { namespace tray { class UpdateNagger; @@ -45,7 +44,6 @@ class TrayUpdate : public TrayImageItem, DISALLOW_COPY_AND_ASSIGN(TrayUpdate); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_TRAY_UPDATE_H_ diff --git a/ash/system/user/tray_user.cc b/ash/system/user/tray_user.cc index adff775..e8ea56e 100644 --- a/ash/system/user/tray_user.cc +++ b/ash/system/user/tray_user.cc @@ -134,8 +134,6 @@ void SwitchUser(ash::MultiProfileIndex user_index) { } // namespace namespace ash { -namespace internal { - namespace tray { // A custom image view with rounded edges. @@ -1356,14 +1354,12 @@ MultiProfileIndex TrayUser::GetTrayIndex() { } void TrayUser::UpdateLayoutOfItem() { - internal::RootWindowController* controller = - internal::GetRootWindowController( - system_tray()->GetWidget()->GetNativeWindow()->GetRootWindow()); + RootWindowController* controller = GetRootWindowController( + system_tray()->GetWidget()->GetNativeWindow()->GetRootWindow()); if (controller && controller->shelf()) { UpdateAfterShelfAlignmentChange( controller->GetShelfLayoutManager()->GetAlignment()); } } -} // namespace internal } // namespace ash diff --git a/ash/system/user/tray_user.h b/ash/system/user/tray_user.h index 6ccad97..d956c31 100644 --- a/ash/system/user/tray_user.h +++ b/ash/system/user/tray_user.h @@ -22,8 +22,6 @@ class Label; } namespace ash { -namespace internal { - namespace tray { class UserView; class RoundedImageView; @@ -97,7 +95,6 @@ class ASH_EXPORT TrayUser : public SystemTrayItem, DISALLOW_COPY_AND_ASSIGN(TrayUser); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_USER_TRAY_USER_H_ diff --git a/ash/system/user/tray_user_separator.cc b/ash/system/user/tray_user_separator.cc index dc63bff..dd60f6b 100644 --- a/ash/system/user/tray_user_separator.cc +++ b/ash/system/user/tray_user_separator.cc @@ -9,7 +9,6 @@ #include "ui/views/view.h" namespace ash { -namespace internal { TrayUserSeparator::TrayUserSeparator(SystemTray* system_tray) : SystemTrayItem(system_tray), @@ -44,5 +43,4 @@ void TrayUserSeparator::DestroyDefaultView() { separator_shown_ = false; } -} // namespace internal } // namespace ash diff --git a/ash/system/user/tray_user_separator.h b/ash/system/user/tray_user_separator.h index 62e5209..003e4cd 100644 --- a/ash/system/user/tray_user_separator.h +++ b/ash/system/user/tray_user_separator.h @@ -9,7 +9,6 @@ #include "ash/system/tray/system_tray_item.h" namespace ash { -namespace internal { // This tray item is showing an additional separator line between the logged in // users and the rest of the system tray menu. The separator will only be shown @@ -41,7 +40,6 @@ class ASH_EXPORT TrayUserSeparator : public SystemTrayItem { DISALLOW_COPY_AND_ASSIGN(TrayUserSeparator); }; -} // namespace internal } // namespace ash #endif // ASH_SYSTEM_USER_TRAY_USER_SEPARATOR_H_ diff --git a/ash/system/user/tray_user_unittest.cc b/ash/system/user/tray_user_unittest.cc index 96f7fa6..b0d77c4 100644 --- a/ash/system/user/tray_user_unittest.cc +++ b/ash/system/user/tray_user_unittest.cc @@ -23,7 +23,6 @@ #include "ui/views/widget/widget.h" namespace ash { -namespace internal { class TrayUserTest : public ash::test::AshTestBase { public: @@ -48,10 +47,8 @@ class TrayUserTest : public ash::test::AshTestBase { ShelfLayoutManager* shelf() { return shelf_; } SystemTray* tray() { return tray_; } ash::test::TestSessionStateDelegate* delegate() { return delegate_; } - ash::internal::TrayUser* tray_user(int index) { return tray_user_[index]; } - ash::internal::TrayUserSeparator* tray_user_separator() { - return tray_user_separator_; - } + ash::TrayUser* tray_user(int index) { return tray_user_[index]; } + ash::TrayUserSeparator* tray_user_separator() { return tray_user_separator_; } private: ShelfLayoutManager* shelf_; @@ -59,7 +56,7 @@ class TrayUserTest : public ash::test::AshTestBase { ash::test::TestSessionStateDelegate* delegate_; // Note that the ownership of these items is on the shelf. - std::vector<ash::internal::TrayUser*> tray_user_; + std::vector<ash::TrayUser*> tray_user_; // The separator between the tray users and the rest of the menu. // Note: The item will get owned by the shelf. @@ -100,11 +97,11 @@ void TrayUserTest::InitializeParameters(int users_logged_in, // Instead of using the existing tray panels we create new ones which makes // the access easier. for (int i = 0; i < delegate_->GetMaximumNumberOfLoggedInUsers(); i++) { - tray_user_.push_back(new ash::internal::TrayUser(tray_, i)); + tray_user_.push_back(new ash::TrayUser(tray_, i)); tray_->AddTrayItem(tray_user_[i]); } // We then add also the separator. - tray_user_separator_ = new ash::internal::TrayUserSeparator(tray_); + tray_user_separator_ = new ash::TrayUserSeparator(tray_); tray_->AddTrayItem(tray_user_separator_); } @@ -152,8 +149,7 @@ TEST_F(TrayUserTest, SingleUserModeDoesNotAllowAddingUser) { EXPECT_FALSE(tray()->IsAnyBubbleVisible()); for (int i = 0; i < delegate()->GetMaximumNumberOfLoggedInUsers(); i++) - EXPECT_EQ(ash::internal::TrayUser::HIDDEN, - tray_user(i)->GetStateForTest()); + EXPECT_EQ(ash::TrayUser::HIDDEN, tray_user(i)->GetStateForTest()); EXPECT_FALSE(tray_user_separator()->separator_shown()); ShowTrayMenu(&generator); @@ -162,8 +158,7 @@ TEST_F(TrayUserTest, SingleUserModeDoesNotAllowAddingUser) { EXPECT_TRUE(tray()->IsAnyBubbleVisible()); for (int i = 0; i < delegate()->GetMaximumNumberOfLoggedInUsers(); i++) - EXPECT_EQ(i == 0 ? ash::internal::TrayUser::SHOWN : - ash::internal::TrayUser::HIDDEN, + EXPECT_EQ(i == 0 ? ash::TrayUser::SHOWN : ash::TrayUser::HIDDEN, tray_user(i)->GetStateForTest()); EXPECT_FALSE(tray_user_separator()->separator_shown()); tray()->CloseSystemBubble(); @@ -200,8 +195,7 @@ TEST_F(TrayUserTest, MutiUserModeDoesNotAllowToAddUser) { EXPECT_TRUE(tray()->HasSystemBubble()); EXPECT_TRUE(tray()->IsAnyBubbleVisible()); for (int i = 0; i < max_users; i++) { - EXPECT_EQ(i < j ? ash::internal::TrayUser::SHOWN : - ash::internal::TrayUser::HIDDEN, + EXPECT_EQ(i < j ? ash::TrayUser::SHOWN : ash::TrayUser::HIDDEN, tray_user(i)->GetStateForTest()); } @@ -210,33 +204,28 @@ TEST_F(TrayUserTest, MutiUserModeDoesNotAllowToAddUser) { // Move the mouse over the user item and it should hover. MoveOverUserItem(&generator, 0); - EXPECT_EQ(ash::internal::TrayUser::HOVERED, - tray_user(0)->GetStateForTest()); + EXPECT_EQ(ash::TrayUser::HOVERED, tray_user(0)->GetStateForTest()); for (int i = 1; i < max_users; i++) { - EXPECT_EQ(i < j ? ash::internal::TrayUser::SHOWN : - ash::internal::TrayUser::HIDDEN, + EXPECT_EQ(i < j ? ash::TrayUser::SHOWN : ash::TrayUser::HIDDEN, tray_user(i)->GetStateForTest()); } // Check that clicking the button allows to add item if we have still room // for one more user. ClickUserItem(&generator, 0); - EXPECT_EQ(j == max_users ? - ash::internal::TrayUser::ACTIVE_BUT_DISABLED : - ash::internal::TrayUser::ACTIVE, + EXPECT_EQ(j == max_users ? ash::TrayUser::ACTIVE_BUT_DISABLED + : ash::TrayUser::ACTIVE, tray_user(0)->GetStateForTest()); // Click the button again to see that the menu goes away. ClickUserItem(&generator, 0); - EXPECT_EQ(ash::internal::TrayUser::HOVERED, - tray_user(0)->GetStateForTest()); + EXPECT_EQ(ash::TrayUser::HOVERED, tray_user(0)->GetStateForTest()); // Close and check that everything is deleted. tray()->CloseSystemBubble(); EXPECT_FALSE(tray()->IsAnyBubbleVisible()); for (int i = 0; i < delegate()->GetMaximumNumberOfLoggedInUsers(); i++) - EXPECT_EQ(ash::internal::TrayUser::HIDDEN, - tray_user(i)->GetStateForTest()); + EXPECT_EQ(ash::TrayUser::HIDDEN, tray_user(i)->GetStateForTest()); } } @@ -258,5 +247,4 @@ TEST_F(TrayUserTest, MutiUserModeButtonClicks) { #endif -} // namespace internal } // namespace ash diff --git a/ash/system/web_notification/web_notification_tray.cc b/ash/system/web_notification/web_notification_tray.cc index e143143..40c2539 100644 --- a/ash/system/web_notification/web_notification_tray.cc +++ b/ash/system/web_notification/web_notification_tray.cc @@ -63,7 +63,6 @@ const int kEnableQuietModeDay = 2; } -namespace internal { namespace { const SkColor kWebNotificationColorNoUnread = SkColorSetA(SK_ColorWHITE, 128); @@ -233,7 +232,7 @@ class WebNotificationBubbleWrapper { private: scoped_ptr<message_center::MessageBubbleBase> bubble_; - scoped_ptr<internal::TrayBubbleWrapper> bubble_wrapper_; + scoped_ptr<TrayBubbleWrapper> bubble_wrapper_; DISALLOW_COPY_AND_ASSIGN(WebNotificationBubbleWrapper); }; @@ -297,16 +296,13 @@ class WebNotificationButton : public views::CustomButton { DISALLOW_COPY_AND_ASSIGN(WebNotificationButton); }; -} // namespace internal - -WebNotificationTray::WebNotificationTray( - internal::StatusAreaWidget* status_area_widget) +WebNotificationTray::WebNotificationTray(StatusAreaWidget* status_area_widget) : TrayBackgroundView(status_area_widget), button_(NULL), show_message_center_on_unlock_(false), should_update_tray_content_(false), should_block_shelf_auto_hide_(false) { - button_ = new internal::WebNotificationButton(this); + button_ = new WebNotificationButton(this); button_->set_triggerable_event_flags( ui::EF_LEFT_MOUSE_BUTTON | ui::EF_RIGHT_MOUSE_BUTTON); tray_container()->AddChildView(button_); @@ -319,11 +315,11 @@ WebNotificationTray::WebNotificationTray( popup_collection_.reset(new message_center::MessagePopupCollection( ash::Shell::GetContainer( status_area_widget->GetNativeView()->GetRootWindow(), - internal::kShellWindowId_StatusContainer), + kShellWindowId_StatusContainer), message_center(), message_center_tray_.get(), ash::switches::UseAlternateShelfLayout())); - work_area_observer_.reset(new internal::WorkAreaObserver()); + work_area_observer_.reset(new WorkAreaObserver()); work_area_observer_->StartObserving( popup_collection_.get(), status_area_widget->GetNativeView()->GetRootWindow()); @@ -380,7 +376,7 @@ bool WebNotificationTray::ShowMessageCenterInternal(bool show_settings) { if (show_settings) message_center_bubble->SetSettingsVisible(); message_center_bubble_.reset( - new internal::WebNotificationBubbleWrapper(this, message_center_bubble)); + new WebNotificationBubbleWrapper(this, message_center_bubble)); status_area_widget()->SetHideSystemNotifications(true); GetShelfLayoutManager()->UpdateAutoHideState(); @@ -456,7 +452,7 @@ void WebNotificationTray::UpdateAfterLoginStatusChange( void WebNotificationTray::SetShelfAlignment(ShelfAlignment alignment) { if (alignment == shelf_alignment()) return; - internal::TrayBackgroundView::SetShelfAlignment(alignment); + TrayBackgroundView::SetShelfAlignment(alignment); tray_container()->SetBorder(views::Border::NullBorder()); // Destroy any existing bubble so that it will be rebuilt correctly. message_center_tray_->HideMessageCenterBubble(); diff --git a/ash/system/web_notification/web_notification_tray.h b/ash/system/web_notification/web_notification_tray.h index fdaf4d0..88be4b2 100644 --- a/ash/system/web_notification/web_notification_tray.h +++ b/ash/system/web_notification/web_notification_tray.h @@ -38,23 +38,20 @@ class MessagePopupCollection; } namespace ash { -namespace internal { class StatusAreaWidget; class WebNotificationBubbleWrapper; class WebNotificationButton; class WorkAreaObserver; -} class ASH_EXPORT WebNotificationTray - : public internal::TrayBackgroundView, + : public TrayBackgroundView, public views::TrayBubbleView::Delegate, public message_center::MessageCenterTrayDelegate, public views::ButtonListener, public base::SupportsWeakPtr<WebNotificationTray>, public ui::SimpleMenuModel::Delegate { public: - explicit WebNotificationTray( - internal::StatusAreaWidget* status_area_widget); + explicit WebNotificationTray(StatusAreaWidget* status_area_widget); virtual ~WebNotificationTray(); // Sets the height of the system tray from the edge of the work area so that @@ -85,7 +82,7 @@ class ASH_EXPORT WebNotificationTray const views::TrayBubbleView* bubble_view) OVERRIDE; virtual bool ClickedOutsideBubble() OVERRIDE; - // Overridden from internal::ActionableView. + // Overridden from ActionableView. virtual bool PerformAction(const ui::Event& event) OVERRIDE; // Overridden from views::TrayBubbleView::Delegate. @@ -154,7 +151,7 @@ class ASH_EXPORT WebNotificationTray // Creates the menu model for quiet mode and returns it. ui::MenuModel* CreateQuietModeMenu(); - internal::WebNotificationBubbleWrapper* message_center_bubble() const { + WebNotificationBubbleWrapper* message_center_bubble() const { return message_center_bubble_.get(); } @@ -163,9 +160,9 @@ class ASH_EXPORT WebNotificationTray message_center::MessageCenterBubble* GetMessageCenterBubbleForTest(); scoped_ptr<message_center::MessageCenterTray> message_center_tray_; - scoped_ptr<internal::WebNotificationBubbleWrapper> message_center_bubble_; + scoped_ptr<WebNotificationBubbleWrapper> message_center_bubble_; scoped_ptr<message_center::MessagePopupCollection> popup_collection_; - internal::WebNotificationButton* button_; + WebNotificationButton* button_; bool show_message_center_on_unlock_; @@ -178,7 +175,7 @@ class ASH_EXPORT WebNotificationTray bool should_block_shelf_auto_hide_; // Observes the work area for |popup_collection_| and notifies to it. - scoped_ptr<internal::WorkAreaObserver> work_area_observer_; + scoped_ptr<WorkAreaObserver> work_area_observer_; DISALLOW_COPY_AND_ASSIGN(WebNotificationTray); }; diff --git a/ash/system/web_notification/web_notification_tray_unittest.cc b/ash/system/web_notification/web_notification_tray_unittest.cc index 34fe4a5..5a87d14 100644 --- a/ash/system/web_notification/web_notification_tray_unittest.cc +++ b/ash/system/web_notification/web_notification_tray_unittest.cc @@ -46,7 +46,7 @@ WebNotificationTray* GetTray() { } WebNotificationTray* GetSecondaryTray() { - internal::RootWindowController* primary_controller = + RootWindowController* primary_controller = Shell::GetPrimaryRootWindowController(); Shell::RootWindowControllerList controllers = Shell::GetAllRootWindowControllers(); @@ -293,15 +293,14 @@ TEST_F(WebNotificationTrayTest, MAYBE_PopupShownOnBothDisplays) { // root window controller and shelf with having notifications. This code // verifies it doesn't cause crash and popups are still visible. See // http://crbug.com/263664 - internal::DisplayManager* display_manager = - Shell::GetInstance()->display_manager(); + DisplayManager* display_manager = Shell::GetInstance()->display_manager(); - display_manager->SetSecondDisplayMode(internal::DisplayManager::MIRRORING); + display_manager->SetSecondDisplayMode(DisplayManager::MIRRORING); UpdateDisplay("400x400,200x200"); EXPECT_TRUE(GetTray()->IsPopupVisible()); EXPECT_FALSE(GetSecondaryTray()); - display_manager->SetSecondDisplayMode(internal::DisplayManager::EXTENDED); + display_manager->SetSecondDisplayMode(DisplayManager::EXTENDED); UpdateDisplay("400x400,200x200"); EXPECT_TRUE(GetTray()->IsPopupVisible()); secondary_tray = GetSecondaryTray(); @@ -370,7 +369,7 @@ TEST_F(WebNotificationTrayTest, MAYBE_PopupAndAutoHideShelf) { // Shelf's auto-hide state won't be HIDDEN unless window exists. scoped_ptr<aura::Window> window( CreateTestWindowInShellWithBounds(gfx::Rect(1, 2, 3, 4))); - internal::ShelfLayoutManager* shelf = + ShelfLayoutManager* shelf = Shell::GetPrimaryRootWindowController()->GetShelfLayoutManager(); shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS); @@ -432,7 +431,7 @@ TEST_F(WebNotificationTrayTest, MAYBE_PopupAndFullscreen) { // Checks the work area for normal auto-hidden state. scoped_ptr<aura::Window> window( CreateTestWindowInShellWithBounds(gfx::Rect(1, 2, 3, 4))); - internal::ShelfLayoutManager* shelf = + ShelfLayoutManager* shelf = Shell::GetPrimaryRootWindowController()->GetShelfLayoutManager(); shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS); EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state()); diff --git a/ash/system/win/audio/tray_audio_win.cc b/ash/system/win/audio/tray_audio_win.cc index 0d2226c..c320541 100644 --- a/ash/system/win/audio/tray_audio_win.cc +++ b/ash/system/win/audio/tray_audio_win.cc @@ -11,8 +11,6 @@ namespace ash { using system::TrayAudioDelegate; using system::TrayAudioDelegateWin; -namespace internal { - TrayAudioWin::TrayAudioWin(SystemTray* system_tray) : TrayAudio(system_tray, scoped_ptr<TrayAudioDelegate>(new TrayAudioDelegateWin())) { @@ -21,5 +19,4 @@ TrayAudioWin::TrayAudioWin(SystemTray* system_tray) TrayAudioWin::~TrayAudioWin() { } -} // namespace internal } // namespace ash diff --git a/ash/system/win/audio/tray_audio_win.h b/ash/system/win/audio/tray_audio_win.h index 33ca7cb..5df2269 100644 --- a/ash/system/win/audio/tray_audio_win.h +++ b/ash/system/win/audio/tray_audio_win.h @@ -11,8 +11,6 @@ namespace ash { -namespace internal { - class TrayAudioWin : public TrayAudio { public: explicit TrayAudioWin(SystemTray* system_tray); @@ -22,7 +20,6 @@ class TrayAudioWin : public TrayAudio { DISALLOW_COPY_AND_ASSIGN(TrayAudioWin); }; -} // namespace internal } // namespace ash -#endif // ASH_SYSTEM_WIN_AUDIO_TRAY_AUDIO_WIN_H_
\ No newline at end of file +#endif // ASH_SYSTEM_WIN_AUDIO_TRAY_AUDIO_WIN_H_ diff --git a/ash/test/app_list_controller_test_api.h b/ash/test/app_list_controller_test_api.h index 4064a77..733264b 100644 --- a/ash/test/app_list_controller_test_api.h +++ b/ash/test/app_list_controller_test_api.h @@ -13,10 +13,8 @@ class AppsGridView; } namespace ash { -class Shell; -namespace internal { class AppListController; -} +class Shell; namespace test { @@ -31,7 +29,7 @@ class AppListControllerTestApi { app_list::AppListView* view(); private: - internal::AppListController* app_list_controller_; // Not owned. + AppListController* app_list_controller_; // Not owned. DISALLOW_COPY_AND_ASSIGN(AppListControllerTestApi); }; diff --git a/ash/test/ash_test_base.h b/ash/test/ash_test_base.h index c7bdbbb..193e71a 100644 --- a/ash/test/ash_test_base.h +++ b/ash/test/ash_test_base.h @@ -31,9 +31,7 @@ class EventGenerator; } // namespace aura namespace ash { -namespace internal { class DisplayManager; -} // namespace internal namespace test { diff --git a/ash/test/display_manager_test_api.cc b/ash/test/display_manager_test_api.cc index 794916b..b7c6f40 100644 --- a/ash/test/display_manager_test_api.cc +++ b/ash/test/display_manager_test_api.cc @@ -16,14 +16,14 @@ namespace ash { namespace test { typedef std::vector<gfx::Display> DisplayList; -typedef internal::DisplayInfo DisplayInfo; +typedef DisplayInfo DisplayInfo; typedef std::vector<DisplayInfo> DisplayInfoList; namespace { std::vector<DisplayInfo> CreateDisplayInfoListFromString( const std::string specs, - internal::DisplayManager* display_manager) { + DisplayManager* display_manager) { std::vector<DisplayInfo> display_info_list; std::vector<std::string> parts; base::SplitString(specs, ',', &parts); @@ -41,10 +41,8 @@ std::vector<DisplayInfo> CreateDisplayInfoListFromString( } // namespace -DisplayManagerTestApi::DisplayManagerTestApi( - internal::DisplayManager* display_manager) - : display_manager_(display_manager) { -} +DisplayManagerTestApi::DisplayManagerTestApi(DisplayManager* display_manager) + : display_manager_(display_manager) {} DisplayManagerTestApi::~DisplayManagerTestApi() {} diff --git a/ash/test/display_manager_test_api.h b/ash/test/display_manager_test_api.h index db47ab3..6c5d565 100644 --- a/ash/test/display_manager_test_api.h +++ b/ash/test/display_manager_test_api.h @@ -12,15 +12,13 @@ #include "ui/display/display_constants.h" namespace ash { -namespace internal { class DisplayManager; -} // internal namespace test { class DisplayManagerTestApi { public: - explicit DisplayManagerTestApi(internal::DisplayManager* display_manager); + explicit DisplayManagerTestApi(DisplayManager* display_manager); virtual ~DisplayManagerTestApi(); // Update the display configuration as given in |display_specs|. The format of @@ -42,7 +40,7 @@ class DisplayManagerTestApi { const std::vector<ui::ColorCalibrationProfile>& profiles); private: - internal::DisplayManager* display_manager_; // not owned + DisplayManager* display_manager_; // not owned DISALLOW_COPY_AND_ASSIGN(DisplayManagerTestApi); }; diff --git a/ash/test/overflow_bubble_view_test_api.cc b/ash/test/overflow_bubble_view_test_api.cc index cfbfc73..59a1096 100644 --- a/ash/test/overflow_bubble_view_test_api.cc +++ b/ash/test/overflow_bubble_view_test_api.cc @@ -10,9 +10,8 @@ namespace ash { namespace test { OverflowBubbleViewTestAPI::OverflowBubbleViewTestAPI( - internal::OverflowBubbleView* bubble_view) - : bubble_view_(bubble_view) { -} + OverflowBubbleView* bubble_view) + : bubble_view_(bubble_view) {} OverflowBubbleViewTestAPI::~OverflowBubbleViewTestAPI() { } diff --git a/ash/test/overflow_bubble_view_test_api.h b/ash/test/overflow_bubble_view_test_api.h index b789b73..2bd5f27 100644 --- a/ash/test/overflow_bubble_view_test_api.h +++ b/ash/test/overflow_bubble_view_test_api.h @@ -12,16 +12,13 @@ class Size; } namespace ash { - -namespace internal { class OverflowBubbleView; -} namespace test { class OverflowBubbleViewTestAPI { public: - explicit OverflowBubbleViewTestAPI(internal::OverflowBubbleView* bubble_view); + explicit OverflowBubbleViewTestAPI(OverflowBubbleView* bubble_view); ~OverflowBubbleViewTestAPI(); // Returns the total width of items included in ShelfView. @@ -32,7 +29,7 @@ class OverflowBubbleViewTestAPI { void ScrollByXOffset(int x_offset); private: - internal::OverflowBubbleView* bubble_view_; + OverflowBubbleView* bubble_view_; DISALLOW_COPY_AND_ASSIGN(OverflowBubbleViewTestAPI); }; diff --git a/ash/test/shelf_test_api.cc b/ash/test/shelf_test_api.cc index 0ce27f7..d050f73 100644 --- a/ash/test/shelf_test_api.cc +++ b/ash/test/shelf_test_api.cc @@ -16,9 +16,7 @@ ShelfTestAPI::ShelfTestAPI(Shelf* shelf) ShelfTestAPI::~ShelfTestAPI() { } -internal::ShelfView* ShelfTestAPI::shelf_view() { - return shelf_->shelf_view_; -} +ShelfView* ShelfTestAPI::shelf_view() { return shelf_->shelf_view_; } void ShelfTestAPI::SetShelfDelegate(ShelfDelegate* delegate) { shelf_->delegate_ = delegate; diff --git a/ash/test/shelf_test_api.h b/ash/test/shelf_test_api.h index 48aafda..7c353ab 100644 --- a/ash/test/shelf_test_api.h +++ b/ash/test/shelf_test_api.h @@ -11,10 +11,7 @@ namespace ash { class Shelf; class ShelfDelegate; - -namespace internal { class ShelfView; -} namespace test { @@ -26,7 +23,7 @@ class ShelfTestAPI { ~ShelfTestAPI(); // An accessor for |shelf_view|. - internal::ShelfView* shelf_view(); + ShelfView* shelf_view(); // Set ShelfDelegate. void SetShelfDelegate(ShelfDelegate* delegate); diff --git a/ash/test/shelf_view_test_api.cc b/ash/test/shelf_view_test_api.cc index 2147ada..d3d545c 100644 --- a/ash/test/shelf_view_test_api.cc +++ b/ash/test/shelf_view_test_api.cc @@ -36,9 +36,8 @@ class TestAPIAnimationObserver : public views::BoundsAnimatorObserver { namespace ash { namespace test { -ShelfViewTestAPI::ShelfViewTestAPI(internal::ShelfView* shelf_view) - : shelf_view_(shelf_view) { -} +ShelfViewTestAPI::ShelfViewTestAPI(ShelfView* shelf_view) + : shelf_view_(shelf_view) {} ShelfViewTestAPI::~ShelfViewTestAPI() { } @@ -47,13 +46,12 @@ int ShelfViewTestAPI::GetButtonCount() { return shelf_view_->view_model_->view_size(); } -internal::ShelfButton* ShelfViewTestAPI::GetButton(int index) { +ShelfButton* ShelfViewTestAPI::GetButton(int index) { // App list button is not a ShelfButton. if (shelf_view_->model_->items()[index].type == ash::TYPE_APP_LIST) return NULL; - return static_cast<internal::ShelfButton*>( - shelf_view_->view_model_->view_at(index)); + return static_cast<ShelfButton*>(shelf_view_->view_model_->view_at(index)); } int ShelfViewTestAPI::GetFirstVisibleIndex() { @@ -99,7 +97,7 @@ void ShelfViewTestAPI::RunMessageLoopUntilAnimationsDone() { shelf_view_->bounds_animator_->RemoveObserver(observer.get()); } -internal::OverflowBubble* ShelfViewTestAPI::overflow_bubble() { +OverflowBubble* ShelfViewTestAPI::overflow_bubble() { return shelf_view_->overflow_bubble_.get(); } diff --git a/ash/test/shelf_view_test_api.h b/ash/test/shelf_view_test_api.h index cff21f4..71853fd 100644 --- a/ash/test/shelf_view_test_api.h +++ b/ash/test/shelf_view_test_api.h @@ -14,28 +14,24 @@ class Size; } namespace ash { - -class ShelfDelegate; - -namespace internal { class OverflowBubble; class ShelfButton; +class ShelfDelegate; class ShelfView; -} namespace test { // Use the api in this class to test ShelfView. class ShelfViewTestAPI { public: - explicit ShelfViewTestAPI(internal::ShelfView* shelf_view); + explicit ShelfViewTestAPI(ShelfView* shelf_view); ~ShelfViewTestAPI(); // Number of icons displayed. int GetButtonCount(); // Retrieve the button at |index|. - internal::ShelfButton* GetButton(int index); + ShelfButton* GetButton(int index); // First visible button index. int GetFirstVisibleIndex(); @@ -60,10 +56,10 @@ class ShelfViewTestAPI { void RunMessageLoopUntilAnimationsDone(); // An accessor for |shelf_view|. - internal::ShelfView* shelf_view() { return shelf_view_; } + ShelfView* shelf_view() { return shelf_view_; } // An accessor for overflow bubble. - internal::OverflowBubble* overflow_bubble(); + OverflowBubble* overflow_bubble(); // Returns the preferred size of |shelf_view_|. gfx::Size GetPreferredSize(); @@ -90,7 +86,7 @@ class ShelfViewTestAPI { bool DraggedItemFromOverflowToShelf(); private: - internal::ShelfView* shelf_view_; + ShelfView* shelf_view_; DISALLOW_COPY_AND_ASSIGN(ShelfViewTestAPI); }; diff --git a/ash/test/shell_test_api.cc b/ash/test/shell_test_api.cc index b343f60..b8c3e2d 100644 --- a/ash/test/shell_test_api.cc +++ b/ash/test/shell_test_api.cc @@ -18,7 +18,7 @@ namespace test { ShellTestApi::ShellTestApi(Shell* shell) : shell_(shell) {} -internal::RootWindowLayoutManager* ShellTestApi::root_window_layout() { +RootWindowLayoutManager* ShellTestApi::root_window_layout() { return shell_->GetPrimaryRootWindowController()->root_window_layout(); } @@ -27,17 +27,15 @@ ShellTestApi::input_method_event_filter() { return shell_->input_method_filter_.get(); } -internal::SystemGestureEventFilter* -ShellTestApi::system_gesture_event_filter() { +SystemGestureEventFilter* ShellTestApi::system_gesture_event_filter() { return shell_->system_gesture_filter_.get(); } -internal::WorkspaceController* ShellTestApi::workspace_controller() { +WorkspaceController* ShellTestApi::workspace_controller() { return shell_->GetPrimaryRootWindowController()->workspace_controller(); } -internal::ScreenPositionController* -ShellTestApi::screen_position_controller() { +ScreenPositionController* ShellTestApi::screen_position_controller() { return shell_->screen_position_controller_.get(); } @@ -49,16 +47,15 @@ ShelfModel* ShellTestApi::shelf_model() { return shell_->shelf_model_.get(); } -internal::DragDropController* ShellTestApi::drag_drop_controller() { +DragDropController* ShellTestApi::drag_drop_controller() { return shell_->drag_drop_controller_.get(); } -internal::AppListController* ShellTestApi::app_list_controller() { +AppListController* ShellTestApi::app_list_controller() { return shell_->app_list_controller_.get(); } -internal::MaximizeModeWindowManager* -ShellTestApi::maximize_mode_window_manager() { +MaximizeModeWindowManager* ShellTestApi::maximize_mode_window_manager() { return shell_->maximize_mode_window_manager_.get(); } diff --git a/ash/test/shell_test_api.h b/ash/test/shell_test_api.h index 12e40b7..68c3749 100644 --- a/ash/test/shell_test_api.h +++ b/ash/test/shell_test_api.h @@ -12,20 +12,17 @@ class InputMethodEventFilter; } // namespace wm namespace ash { -class AshNativeCursorManager; -class ShelfDelegate; -class ShelfModel; -class Shell; - -namespace internal { class AppListController; +class AshNativeCursorManager; class DragDropController; class MaximizeModeWindowManager; class RootWindowLayoutManager; class ScreenPositionController; +class ShelfDelegate; +class ShelfModel; +class Shell; class SystemGestureEventFilter; class WorkspaceController; -} // namespace internal namespace test { @@ -34,16 +31,16 @@ class ShellTestApi { public: explicit ShellTestApi(Shell* shell); - internal::RootWindowLayoutManager* root_window_layout(); + RootWindowLayoutManager* root_window_layout(); ::wm::InputMethodEventFilter* input_method_event_filter(); - internal::SystemGestureEventFilter* system_gesture_event_filter(); - internal::WorkspaceController* workspace_controller(); - internal::ScreenPositionController* screen_position_controller(); + SystemGestureEventFilter* system_gesture_event_filter(); + WorkspaceController* workspace_controller(); + ScreenPositionController* screen_position_controller(); AshNativeCursorManager* ash_native_cursor_manager(); ShelfModel* shelf_model(); - internal::DragDropController* drag_drop_controller(); - internal::AppListController* app_list_controller(); - internal::MaximizeModeWindowManager* maximize_mode_window_manager(); + DragDropController* drag_drop_controller(); + AppListController* app_list_controller(); + MaximizeModeWindowManager* maximize_mode_window_manager(); void DisableOutputConfiguratorAnimation(); // Set ShelfDelegate. diff --git a/ash/test/test_shell_delegate.cc b/ash/test/test_shell_delegate.cc index fe981d7..65545e7 100644 --- a/ash/test/test_shell_delegate.cc +++ b/ash/test/test_shell_delegate.cc @@ -120,7 +120,7 @@ SessionStateDelegate* TestShellDelegate::CreateSessionStateDelegate() { } AccessibilityDelegate* TestShellDelegate::CreateAccessibilityDelegate() { - return new internal::DefaultAccessibilityDelegate(); + return new DefaultAccessibilityDelegate(); } NewWindowDelegate* TestShellDelegate::CreateNewWindowDelegate() { diff --git a/ash/touch/touch_hud_debug.cc b/ash/touch/touch_hud_debug.cc index d2bee6d..983d86b 100644 --- a/ash/touch/touch_hud_debug.cc +++ b/ash/touch/touch_hud_debug.cc @@ -31,7 +31,6 @@ #endif namespace ash { -namespace internal { const int kPointRadius = 20; const SkColor kColors[] = { @@ -374,8 +373,8 @@ scoped_ptr<base::DictionaryValue> TouchHudDebug::GetAllAsDictionary() { aura::Window::Windows roots = Shell::GetInstance()->GetAllRootWindows(); for (aura::Window::Windows::iterator iter = roots.begin(); iter != roots.end(); ++iter) { - internal::RootWindowController* controller = GetRootWindowController(*iter); - internal::TouchHudDebug* hud = controller->touch_hud_debug(); + RootWindowController* controller = GetRootWindowController(*iter); + TouchHudDebug* hud = controller->touch_hud_debug(); if (hud) { scoped_ptr<base::ListValue> list = hud->GetLogAsList(); if (!list->empty()) @@ -486,5 +485,4 @@ void TouchHudDebug::UnsetHudForRootWindowController( controller->set_touch_hud_debug(NULL); } -} // namespace internal } // namespace ash diff --git a/ash/touch/touch_hud_debug.h b/ash/touch/touch_hud_debug.h index 8449c20..2cac294 100644 --- a/ash/touch/touch_hud_debug.h +++ b/ash/touch/touch_hud_debug.h @@ -18,8 +18,6 @@ class View; } namespace ash { -namespace internal { - class TouchHudCanvas; class TouchLog; @@ -81,7 +79,6 @@ class ASH_EXPORT TouchHudDebug : public TouchObserverHUD { DISALLOW_COPY_AND_ASSIGN(TouchHudDebug); }; -} // namespace internal } // namespace ash #endif // ASH_TOUCH_TOUCH_HUD_DEBUG_H_ diff --git a/ash/touch/touch_hud_projection.cc b/ash/touch/touch_hud_projection.cc index 615a372..3178559 100644 --- a/ash/touch/touch_hud_projection.cc +++ b/ash/touch/touch_hud_projection.cc @@ -15,7 +15,6 @@ #include "ui/views/widget/widget.h" namespace ash { -namespace internal { const int kPointRadius = 20; const SkColor kProjectionFillColor = SkColorSetRGB(0xF5, 0xF5, 0xDC); @@ -185,5 +184,4 @@ void TouchHudProjection::UnsetHudForRootWindowController( controller->set_touch_hud_projection(NULL); } -} // namespace internal } // namespace ash diff --git a/ash/touch/touch_hud_projection.h b/ash/touch/touch_hud_projection.h index 59e86c8..8e30749 100644 --- a/ash/touch/touch_hud_projection.h +++ b/ash/touch/touch_hud_projection.h @@ -10,8 +10,6 @@ #include "ash/touch/touch_observer_hud.h" namespace ash { -namespace internal { - class TouchPointView; // A heads-up display to show active touch points on the screen. As a derivative @@ -40,7 +38,6 @@ class TouchHudProjection : public TouchObserverHUD { DISALLOW_COPY_AND_ASSIGN(TouchHudProjection); }; -} // namespace internal } // namespace ash #endif // ASH_TOUCH_TOUCH_HUD_PROJECTION_H_ diff --git a/ash/touch/touch_observer_hud.cc b/ash/touch/touch_observer_hud.cc index 923c34c..81908ab 100644 --- a/ash/touch/touch_observer_hud.cc +++ b/ash/touch/touch_observer_hud.cc @@ -16,7 +16,6 @@ #include "ui/views/widget/widget.h" namespace ash { -namespace internal { TouchObserverHUD::TouchObserverHUD(aura::Window* initial_root) : display_id_(GetRootWindowSettings(initial_root)->display_id), @@ -37,9 +36,8 @@ TouchObserverHUD::TouchObserverHUD(aura::Window* initial_root) params.can_activate = false; params.accept_events = false; params.bounds = display.bounds(); - params.parent = Shell::GetContainer( - root_window_, - internal::kShellWindowId_OverlayContainer); + params.parent = + Shell::GetContainer(root_window_, kShellWindowId_OverlayContainer); widget_->Init(params); widget_->SetContentsView(content); widget_->StackAtTop(); @@ -127,7 +125,7 @@ void TouchObserverHUD::OnDisplayConfigurationChanging() { views::Widget::ReparentNativeView( widget_->GetNativeView(), Shell::GetContainer(root_window_, - internal::kShellWindowId_UnparentedControlContainer)); + kShellWindowId_UnparentedControlContainer)); root_window_ = NULL; } @@ -141,8 +139,7 @@ void TouchObserverHUD::OnDisplayConfigurationChanged() { views::Widget::ReparentNativeView( widget_->GetNativeView(), - Shell::GetContainer(root_window_, - internal::kShellWindowId_OverlayContainer)); + Shell::GetContainer(root_window_, kShellWindowId_OverlayContainer)); RootWindowController* controller = GetRootWindowController(root_window_); SetHudForRootWindowController(controller); @@ -150,5 +147,4 @@ void TouchObserverHUD::OnDisplayConfigurationChanged() { root_window_->AddPreTargetHandler(this); } -} // namespace internal } // namespace ash diff --git a/ash/touch/touch_observer_hud.h b/ash/touch/touch_observer_hud.h index 4e77390..b3a237b 100644 --- a/ash/touch/touch_observer_hud.h +++ b/ash/touch/touch_observer_hud.h @@ -20,7 +20,6 @@ class Widget; } namespace ash { -namespace internal { // An event filter which handles system level gesture events. Objects of this // class manage their own lifetime. @@ -86,7 +85,6 @@ class ASH_EXPORT TouchObserverHUD : public ui::EventHandler, DISALLOW_COPY_AND_ASSIGN(TouchObserverHUD); }; -} // namespace internal } // namespace ash #endif // ASH_TOUCH_TOUCH_OBSERVER_HUD_H_ diff --git a/ash/touch/touch_observer_hud_unittest.cc b/ash/touch/touch_observer_hud_unittest.cc index 98fb385..e0e133f 100644 --- a/ash/touch/touch_observer_hud_unittest.cc +++ b/ash/touch/touch_observer_hud_unittest.cc @@ -19,7 +19,6 @@ #include "ui/aura/window.h" namespace ash { -namespace internal { class TouchHudTestBase : public test::AshTestBase { public: @@ -163,22 +162,22 @@ class TouchHudTestBase : public test::AshTestBase { return GetDisplayController()->GetRootWindowForDisplayId(display.id()); } - internal::RootWindowController* GetInternalRootController() { + RootWindowController* GetInternalRootController() { aura::Window* root = GetInternalRootWindow(); return GetRootWindowController(root); } - internal::RootWindowController* GetExternalRootController() { + RootWindowController* GetExternalRootController() { aura::Window* root = GetExternalRootWindow(); return GetRootWindowController(root); } - internal::RootWindowController* GetPrimaryRootController() { + RootWindowController* GetPrimaryRootController() { aura::Window* root = GetPrimaryRootWindow(); return GetRootWindowController(root); } - internal::RootWindowController* GetSecondaryRootController() { + RootWindowController* GetSecondaryRootController() { aura::Window* root = GetSecondaryRootWindow(); return GetRootWindowController(root); } @@ -189,11 +188,11 @@ class TouchHudTestBase : public test::AshTestBase { return info; } - aura::Window* GetRootWindowForTouchHud(internal::TouchObserverHUD* hud) { + aura::Window* GetRootWindowForTouchHud(TouchObserverHUD* hud) { return hud->root_window_; } - views::Widget* GetWidgetForTouchHud(internal::TouchObserverHUD* hud) { + views::Widget* GetWidgetForTouchHud(TouchObserverHUD* hud) { return hud->widget_; } @@ -224,8 +223,7 @@ class TouchHudDebugTest : public TouchHudTestBase { } void CheckInternalDisplay() { - EXPECT_NE(static_cast<internal::TouchObserverHUD*>(NULL), - GetInternalTouchHudDebug()); + EXPECT_NE(static_cast<TouchObserverHUD*>(NULL), GetInternalTouchHudDebug()); EXPECT_EQ(internal_display_id(), GetInternalTouchHudDebug()->display_id()); EXPECT_EQ(GetInternalRootWindow(), GetRootWindowForTouchHud(GetInternalTouchHudDebug())); @@ -238,8 +236,7 @@ class TouchHudDebugTest : public TouchHudTestBase { } void CheckExternalDisplay() { - EXPECT_NE(static_cast<internal::TouchHudDebug*>(NULL), - GetExternalTouchHudDebug()); + EXPECT_NE(static_cast<TouchHudDebug*>(NULL), GetExternalTouchHudDebug()); EXPECT_EQ(external_display_id(), GetExternalTouchHudDebug()->display_id()); EXPECT_EQ(GetExternalRootWindow(), GetRootWindowForTouchHud(GetExternalTouchHudDebug())); @@ -252,19 +249,19 @@ class TouchHudDebugTest : public TouchHudTestBase { } private: - internal::TouchHudDebug* GetInternalTouchHudDebug() { + TouchHudDebug* GetInternalTouchHudDebug() { return GetInternalRootController()->touch_hud_debug(); } - internal::TouchHudDebug* GetExternalTouchHudDebug() { + TouchHudDebug* GetExternalTouchHudDebug() { return GetExternalRootController()->touch_hud_debug(); } - internal::TouchHudDebug* GetPrimaryTouchHudDebug() { + TouchHudDebug* GetPrimaryTouchHudDebug() { return GetPrimaryRootController()->touch_hud_debug(); } - internal::TouchHudDebug* GetSecondaryTouchHudDebug() { + TouchHudDebug* GetSecondaryTouchHudDebug() { return GetSecondaryRootController()->touch_hud_debug(); } @@ -284,7 +281,7 @@ class TouchHudProjectionTest : public TouchHudTestBase { Shell::GetInstance()->SetTouchHudProjectionEnabled(false); } - internal::TouchHudProjection* GetInternalTouchHudProjection() { + TouchHudProjection* GetInternalTouchHudProjection() { return GetInternalRootController()->touch_hud_projection(); } @@ -498,7 +495,7 @@ TEST_F(TouchHudProjectionTest, TouchMoveRelease) { EXPECT_EQ(NULL, GetInternalTouchHudProjection()); EnableTouchHudProjection(); - EXPECT_NE(static_cast<internal::TouchHudProjection*>(NULL), + EXPECT_NE(static_cast<TouchHudProjection*>(NULL), GetInternalTouchHudProjection()); EXPECT_EQ(0, GetInternalTouchPointsCount()); @@ -523,7 +520,7 @@ TEST_F(TouchHudProjectionTest, TouchMoveCancel) { EXPECT_EQ(NULL, GetInternalTouchHudProjection()); EnableTouchHudProjection(); - EXPECT_NE(static_cast<internal::TouchHudProjection*>(NULL), + EXPECT_NE(static_cast<TouchHudProjection*>(NULL), GetInternalTouchHudProjection()); EXPECT_EQ(0, GetInternalTouchPointsCount()); @@ -547,7 +544,7 @@ TEST_F(TouchHudProjectionTest, DoubleTouch) { EXPECT_EQ(NULL, GetInternalTouchHudProjection()); EnableTouchHudProjection(); - EXPECT_NE(static_cast<internal::TouchHudProjection*>(NULL), + EXPECT_NE(static_cast<TouchHudProjection*>(NULL), GetInternalTouchHudProjection()); EXPECT_EQ(0, GetInternalTouchPointsCount()); @@ -581,7 +578,7 @@ TEST_F(TouchHudProjectionTest, DisableWhileTouching) { EXPECT_EQ(NULL, GetInternalTouchHudProjection()); EnableTouchHudProjection(); - EXPECT_NE(static_cast<internal::TouchHudProjection*>(NULL), + EXPECT_NE(static_cast<TouchHudProjection*>(NULL), GetInternalTouchHudProjection()); EXPECT_EQ(0, GetInternalTouchPointsCount()); @@ -593,5 +590,4 @@ TEST_F(TouchHudProjectionTest, DisableWhileTouching) { EXPECT_EQ(NULL, GetInternalTouchHudProjection()); } -} // namespace internal } // namespace ash diff --git a/ash/wm/always_on_top_controller.cc b/ash/wm/always_on_top_controller.cc index c0f7356..ab397c9 100644 --- a/ash/wm/always_on_top_controller.cc +++ b/ash/wm/always_on_top_controller.cc @@ -10,7 +10,6 @@ #include "ui/aura/window.h" namespace ash { -namespace internal { AlwaysOnTopController::AlwaysOnTopController() : always_on_top_container_(NULL) { @@ -68,5 +67,4 @@ void AlwaysOnTopController::OnWindowDestroyed(aura::Window* window) { always_on_top_container_ = NULL; } -} // namespace internal } // namespace ash diff --git a/ash/wm/always_on_top_controller.h b/ash/wm/always_on_top_controller.h index 57fbf99..fda496a 100644 --- a/ash/wm/always_on_top_controller.h +++ b/ash/wm/always_on_top_controller.h @@ -14,7 +14,6 @@ class Window; } namespace ash { -namespace internal { // AlwaysOnTopController puts window into proper containers based on its // 'AlwaysOnTop' property. That is, putting a window into the worskpace @@ -45,7 +44,6 @@ class AlwaysOnTopController : public aura::WindowObserver { DISALLOW_COPY_AND_ASSIGN(AlwaysOnTopController); }; -} // namepsace internal } // namepsace ash #endif // ASH_WM_ALWAYS_ON_TOP_CONTROLLER_H_ diff --git a/ash/wm/app_list_controller.cc b/ash/wm/app_list_controller.cc index b00319c..cf5e04d 100644 --- a/ash/wm/app_list_controller.cc +++ b/ash/wm/app_list_controller.cc @@ -27,8 +27,6 @@ #include "ui/views/widget/widget.h" namespace ash { -namespace internal { - namespace { // Duration for show/hide animation in milliseconds. @@ -295,12 +293,12 @@ void AppListController::ProcessLocatedEvent(ui::LocatedEvent* event) { RootWindowController* root_controller = GetRootWindowController(target->GetRootWindow()); if (root_controller) { - aura::Window* menu_container = root_controller->GetContainer( - internal::kShellWindowId_MenuContainer); + aura::Window* menu_container = + root_controller->GetContainer(kShellWindowId_MenuContainer); if (menu_container->Contains(target)) return; aura::Window* keyboard_container = root_controller->GetContainer( - internal::kShellWindowId_VirtualKeyboardContainer); + kShellWindowId_VirtualKeyboardContainer); if (keyboard_container->Contains(target)) return; } @@ -437,5 +435,4 @@ void AppListController::TransitionChanged() { } } -} // namespace internal } // namespace ash diff --git a/ash/wm/app_list_controller.h b/ash/wm/app_list_controller.h index 2e41758..c2eb0ad 100644 --- a/ash/wm/app_list_controller.h +++ b/ash/wm/app_list_controller.h @@ -33,8 +33,6 @@ namespace test { class AppListControllerTestApi; } -namespace internal { - // AppListController is a controller that manages app list UI for shell. // It creates AppListView and schedules showing/hiding animation. // While the UI is visible, it monitors things such as app list widget's @@ -139,7 +137,6 @@ class AppListController : public ui::EventHandler, DISALLOW_COPY_AND_ASSIGN(AppListController); }; -} // namespace internal } // namespace ash #endif // ASH_WM_APP_LIST_CONTROLLER_H_ diff --git a/ash/wm/app_list_controller_unittest.cc b/ash/wm/app_list_controller_unittest.cc index 7295c67..9808d8b 100644 --- a/ash/wm/app_list_controller_unittest.cc +++ b/ash/wm/app_list_controller_unittest.cc @@ -34,8 +34,7 @@ TEST_F(AppListControllerTest, RemainVisibleWhenFocusingToApplistContainer) { EXPECT_TRUE(Shell::GetInstance()->GetAppListTargetVisibility()); aura::Window* applist_container = Shell::GetContainer( - Shell::GetPrimaryRootWindow(), - internal::kShellWindowId_AppListContainer); + Shell::GetPrimaryRootWindow(), kShellWindowId_AppListContainer); scoped_ptr<aura::Window> window( aura::test::CreateTestWindowWithId(0, applist_container)); wm::ActivateWindow(window.get()); diff --git a/ash/wm/ash_focus_rules.cc b/ash/wm/ash_focus_rules.cc index efeaaca..c38c7d3 100644 --- a/ash/wm/ash_focus_rules.cc +++ b/ash/wm/ash_focus_rules.cc @@ -16,23 +16,22 @@ namespace { // These are the list of container ids of containers which may contain windows // that need to be activated in the order that they should be activated. const int kWindowContainerIds[] = { - internal::kShellWindowId_OverlayContainer, - internal::kShellWindowId_LockSystemModalContainer, - internal::kShellWindowId_SettingBubbleContainer, - internal::kShellWindowId_LockScreenContainer, - internal::kShellWindowId_SystemModalContainer, - internal::kShellWindowId_AlwaysOnTopContainer, - internal::kShellWindowId_AppListContainer, - internal::kShellWindowId_DefaultContainer, + kShellWindowId_OverlayContainer, + kShellWindowId_LockSystemModalContainer, + kShellWindowId_SettingBubbleContainer, + kShellWindowId_LockScreenContainer, + kShellWindowId_SystemModalContainer, + kShellWindowId_AlwaysOnTopContainer, + kShellWindowId_AppListContainer, + kShellWindowId_DefaultContainer, // Docked, panel, launcher and status are intentionally checked after other // containers even though these layers are higher. The user expects their // windows to be focused before these elements. - internal::kShellWindowId_DockedContainer, - internal::kShellWindowId_PanelContainer, - internal::kShellWindowId_ShelfContainer, - internal::kShellWindowId_StatusContainer, -}; + kShellWindowId_DockedContainer, + kShellWindowId_PanelContainer, + kShellWindowId_ShelfContainer, + kShellWindowId_StatusContainer, }; bool BelongsToContainerWithEqualOrGreaterId(const aura::Window* window, int container_id) { @@ -58,7 +57,7 @@ AshFocusRules::~AshFocusRules() { // AshFocusRules, ::wm::FocusRules: bool AshFocusRules::SupportsChildActivation(aura::Window* window) const { - if (window->id() == internal::kShellWindowId_DefaultContainer) + if (window->id() == kShellWindowId_DefaultContainer) return true; for (size_t i = 0; i < arraysize(kWindowContainerIds); i++) { @@ -78,9 +77,9 @@ bool AshFocusRules::IsWindowConsideredVisibleForActivation( if (wm::GetWindowState(window)->IsMinimized()) return true; - return window->TargetVisibility() && (window->parent()->id() == - internal::kShellWindowId_DefaultContainer || window->parent()->id() == - internal::kShellWindowId_LockScreenContainer); + return window->TargetVisibility() && + (window->parent()->id() == kShellWindowId_DefaultContainer || + window->parent()->id() == kShellWindowId_LockScreenContainer); } bool AshFocusRules::CanActivateWindow(aura::Window* window) const { @@ -93,7 +92,7 @@ bool AshFocusRules::CanActivateWindow(aura::Window* window) const { if (Shell::GetInstance()->IsSystemModalWindowOpen()) { return BelongsToContainerWithEqualOrGreaterId( - window, internal::kShellWindowId_SystemModalContainer); + window, kShellWindowId_SystemModalContainer); } return true; diff --git a/ash/wm/ash_native_cursor_manager_interactive_uitest.cc b/ash/wm/ash_native_cursor_manager_interactive_uitest.cc index 771b725..48d2af5 100644 --- a/ash/wm/ash_native_cursor_manager_interactive_uitest.cc +++ b/ash/wm/ash_native_cursor_manager_interactive_uitest.cc @@ -50,10 +50,10 @@ class AshNativeCursorManagerTest : public test::AshTestBase { namespace { -internal::DisplayInfo CreateDisplayInfo(int64 id, - const gfx::Rect& bounds, - float device_scale_factor) { - internal::DisplayInfo info(id, "", false); +DisplayInfo CreateDisplayInfo(int64 id, + const gfx::Rect& bounds, + float device_scale_factor) { + DisplayInfo info(id, "", false); info.SetBounds(bounds); info.set_device_scale_factor(device_scale_factor); return info; @@ -93,13 +93,12 @@ TEST_F(AshNativeCursorManagerTest, MAYBE_CursorChangeOnEnterNotify) { CursorManager* cursor_manager = Shell::GetInstance()->cursor_manager(); test::CursorManagerTestApi test_api(cursor_manager); - internal::DisplayManager* display_manager = - Shell::GetInstance()->display_manager(); - internal::DisplayInfo display_info1 = + DisplayManager* display_manager = Shell::GetInstance()->display_manager(); + DisplayInfo display_info1 = CreateDisplayInfo(10, gfx::Rect(0, 0, 500, 300), 1.0f); - internal::DisplayInfo display_info2 = + DisplayInfo display_info2 = CreateDisplayInfo(20, gfx::Rect(500, 0, 500, 300), 2.0f); - std::vector<internal::DisplayInfo> display_info_list; + std::vector<DisplayInfo> display_info_list; display_info_list.push_back(display_info1); display_info_list.push_back(display_info2); display_manager->OnNativeDisplaysChanged(display_info_list); diff --git a/ash/wm/boot_splash_screen_chromeos.cc b/ash/wm/boot_splash_screen_chromeos.cc index df57654..c9516d7 100644 --- a/ash/wm/boot_splash_screen_chromeos.cc +++ b/ash/wm/boot_splash_screen_chromeos.cc @@ -14,7 +14,6 @@ #include "ui/gfx/canvas.h" namespace ash { -namespace internal { // ui::LayerDelegate that copies the aura host window's content to a ui::Layer. class BootSplashScreen::CopyHostContentLayerDelegate @@ -72,5 +71,4 @@ void BootSplashScreen::StartHideAnimation(base::TimeDelta duration) { layer_->SetOpacity(0.0f); } -} // namespace internal } // namespace ash diff --git a/ash/wm/boot_splash_screen_chromeos.h b/ash/wm/boot_splash_screen_chromeos.h index 7ba2809..a127a51 100644 --- a/ash/wm/boot_splash_screen_chromeos.h +++ b/ash/wm/boot_splash_screen_chromeos.h @@ -21,7 +21,6 @@ class LayerDelegate; } namespace ash { -namespace internal { // BootSplashScreen manages a ui::Layer, stacked at the top of the root layer's // children, that displays a copy of the initial contents of the host window. @@ -47,7 +46,6 @@ class BootSplashScreen { DISALLOW_COPY_AND_ASSIGN(BootSplashScreen); }; -} // namespace internal } // namespace ash #endif // ASH_WM_BOOT_SPLASH_SCREEN_CHROMEOS_H_ diff --git a/ash/wm/default_state.cc b/ash/wm/default_state.cc index 354e99e..b5aec38 100644 --- a/ash/wm/default_state.cc +++ b/ash/wm/default_state.cc @@ -31,7 +31,7 @@ const float kMinimumPercentOnScreenArea = 0.3f; bool IsPanel(aura::Window* window) { return window->parent() && - window->parent()->id() == internal::kShellWindowId_PanelContainer; + window->parent()->id() == kShellWindowId_PanelContainer; } void MoveToDisplayForRestore(WindowState* window_state) { diff --git a/ash/wm/dock/dock_types.h b/ash/wm/dock/dock_types.h index e2ebaab..c203a67 100644 --- a/ash/wm/dock/dock_types.h +++ b/ash/wm/dock/dock_types.h @@ -7,8 +7,6 @@ namespace ash { -namespace internal { - // Possible values of which side of the screen the windows are docked at. // This is used by DockedwindowLayoutManager and DockedWindowResizer to // implement docking behavior including magnetism while dragging windows into @@ -49,7 +47,6 @@ enum DockedActionSource { DOCKED_ACTION_SOURCE_COUNT, }; -} // namespace internal } // namespace ash #endif // ASH_WM_DOCK_DOCK_TYPES_H_ diff --git a/ash/wm/dock/docked_window_layout_manager.cc b/ash/wm/dock/docked_window_layout_manager.cc index 04273e1b..add93f4 100644 --- a/ash/wm/dock/docked_window_layout_manager.cc +++ b/ash/wm/dock/docked_window_layout_manager.cc @@ -41,7 +41,6 @@ #include "ui/wm/public/activation_client.h" namespace ash { -namespace internal { // Minimum, maximum width of the dock area and a width of the gap // static @@ -58,7 +57,7 @@ const int kFadeDurationMs = 60; const int kMinimizeDurationMs = 720; class DockedBackgroundWidget : public views::Widget, - public internal::BackgroundAnimatorDelegate { + public BackgroundAnimatorDelegate { public: explicit DockedBackgroundWidget(aura::Window* container) : alignment_(DOCKED_ALIGNMENT_NONE), @@ -147,7 +146,7 @@ class DockedBackgroundWidget : public views::Widget, set_focus_on_creation(false); Init(params); SetVisibilityChangedAnimationsEnabled(false); - GetNativeWindow()->SetProperty(internal::kStayInSameRootWindowKey, true); + GetNativeWindow()->SetProperty(kStayInSameRootWindowKey, true); opaque_background_.SetColor(SK_ColorBLACK); opaque_background_.SetBounds(gfx::Rect(GetWindowBoundsInScreen().size())); opaque_background_.SetOpacity(0.0f); @@ -194,7 +193,7 @@ class DockedBackgroundWidget : public views::Widget, DockedAlignment alignment_; // The animator for the background transitions. - internal::BackgroundAnimator background_animator_; + BackgroundAnimator background_animator_; // The alpha to use for drawing image assets covering the docked background. int alpha_; @@ -712,8 +711,8 @@ void DockedWindowLayoutManager::SetChildBounds( SetChildBoundsDirect(child, requested_bounds); if (IsPopupOrTransient(child)) return; - ShelfLayoutManager* shelf_layout = internal::ShelfLayoutManager::ForShelf( - dock_container_); + ShelfLayoutManager* shelf_layout = + ShelfLayoutManager::ForShelf(dock_container_); if (shelf_layout) shelf_layout->UpdateVisibilityState(); } @@ -1316,5 +1315,4 @@ void DockedWindowLayoutManager::OnKeyboardBoundsChanging( UpdateDockBounds(DockedWindowLayoutManagerObserver::KEYBOARD_BOUNDS_CHANGING); } -} // namespace internal } // namespace ash diff --git a/ash/wm/dock/docked_window_layout_manager.h b/ash/wm/dock/docked_window_layout_manager.h index 18569d8..030d888 100644 --- a/ash/wm/dock/docked_window_layout_manager.h +++ b/ash/wm/dock/docked_window_layout_manager.h @@ -38,12 +38,10 @@ class Widget; } namespace ash { -class Shelf; - -namespace internal { class DockedBackgroundWidget; class DockedWindowLayoutManagerObserver; class DockedWindowResizerTest; +class Shelf; class ShelfLayoutManager; class WorkspaceController; @@ -310,7 +308,6 @@ class ASH_EXPORT DockedWindowLayoutManager DISALLOW_COPY_AND_ASSIGN(DockedWindowLayoutManager); }; -} // namespace internal } // namespace ash #endif // ASH_WM_DOCK_DOCKED_WINDOW_LAYOUT_MANAGER_H_ diff --git a/ash/wm/dock/docked_window_layout_manager_observer.h b/ash/wm/dock/docked_window_layout_manager_observer.h index f529753..69839d1 100644 --- a/ash/wm/dock/docked_window_layout_manager_observer.h +++ b/ash/wm/dock/docked_window_layout_manager_observer.h @@ -12,7 +12,6 @@ class Rect; } namespace ash { -namespace internal { // Observers to the DockedWindowLayoutManager are notified of significant // events that occur with the docked windows, such as the bounds change. @@ -35,7 +34,6 @@ class ASH_EXPORT DockedWindowLayoutManagerObserver { virtual ~DockedWindowLayoutManagerObserver() {} }; -} // namespace internal } // namespace ash #endif // UI_DOCK_DOCKED_WINDOW_LAYOUT_MANAGER_OBSERVER_H_ diff --git a/ash/wm/dock/docked_window_layout_manager_unittest.cc b/ash/wm/dock/docked_window_layout_manager_unittest.cc index 0d74301..48db154 100644 --- a/ash/wm/dock/docked_window_layout_manager_unittest.cc +++ b/ash/wm/dock/docked_window_layout_manager_unittest.cc @@ -35,7 +35,6 @@ #include "ui/views/widget/widget.h" namespace ash { -namespace internal { class DockedWindowLayoutManagerTest : public test::AshTestBase, @@ -101,7 +100,7 @@ class DockedWindowLayoutManagerTest aura::Window* GetPanelContainer(aura::Window* panel) { return Shell::GetContainer(panel->GetRootWindow(), - internal::kShellWindowId_PanelContainer); + kShellWindowId_PanelContainer); } static WindowResizer* CreateSomeWindowResizer( @@ -149,8 +148,8 @@ class DockedWindowLayoutManagerTest // parent. int CorrectContainerIdDuringDrag() { if (window_type_ == ui::wm::WINDOW_TYPE_PANEL) - return internal::kShellWindowId_PanelContainer; - return internal::kShellWindowId_DockedContainer; + return kShellWindowId_PanelContainer; + return kShellWindowId_DockedContainer; } // Test dragging the window vertically (to detach if it is a panel) and then @@ -202,7 +201,7 @@ class DockedWindowLayoutManagerTest // x-coordinate can get adjusted by snapping or sticking. // y-coordinate could be changed by possible automatic layout if docked. - if (window->parent()->id() != internal::kShellWindowId_DockedContainer && + if (window->parent()->id() != kShellWindowId_DockedContainer && !wm::GetWindowState(window)->HasRestoreBounds()) { EXPECT_EQ(initial_bounds.y() + dy, window->GetBoundsInScreen().y()); } @@ -234,7 +233,7 @@ TEST_P(DockedWindowLayoutManagerTest, AddOneWindow) { EXPECT_EQ(window->GetRootWindow()->bounds().right(), window->GetBoundsInScreen().right()); EXPECT_EQ(ideal_width(), window->bounds().width()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, window->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, window->parent()->id()); } // Tests that with a window docked on the left the auto-placing logic in @@ -250,7 +249,7 @@ TEST_P(DockedWindowLayoutManagerTest, AutoPlacingLeft) { // The window should be attached and snapped to the right side of the screen. EXPECT_EQ(window->GetRootWindow()->bounds().x(), window->GetBoundsInScreen().x()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, window->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, window->parent()->id()); DockedWindowLayoutManager* manager = static_cast<DockedWindowLayoutManager*>( window->parent()->layout_manager()); @@ -300,7 +299,7 @@ TEST_P(DockedWindowLayoutManagerTest, AutoPlacingRight) { // The window should be attached and snapped to the right side of the screen. EXPECT_EQ(window->GetRootWindow()->bounds().right(), window->GetBoundsInScreen().right()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, window->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, window->parent()->id()); DockedWindowLayoutManager* manager = static_cast<DockedWindowLayoutManager*>( window->parent()->layout_manager()); @@ -354,7 +353,7 @@ TEST_P(DockedWindowLayoutManagerTest, AutoPlacingRightSecondScreen) { // The window should be attached and snapped to the right side of the screen. EXPECT_EQ(window->GetRootWindow()->GetBoundsInScreen().right(), window->GetBoundsInScreen().right()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, window->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, window->parent()->id()); DockedWindowLayoutManager* manager = static_cast<DockedWindowLayoutManager*>( window->parent()->layout_manager()); @@ -405,10 +404,10 @@ TEST_P(DockedWindowLayoutManagerTest, AddTwoWindows) { // The windows should be attached and snapped to the right side of the screen. EXPECT_EQ(w1->GetRootWindow()->bounds().right(), w1->GetBoundsInScreen().right()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w1->parent()->id()); EXPECT_EQ(w2->GetRootWindow()->bounds().right(), w2->GetBoundsInScreen().right()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w2->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w2->parent()->id()); // Test that the gaps differ at most by a single pixel. gfx::Rect work_area = @@ -434,10 +433,10 @@ TEST_P(DockedWindowLayoutManagerTest, TwoWindowsDragging) { // The windows should be attached and snapped to the right side of the screen. EXPECT_EQ(w1->GetRootWindow()->bounds().right(), w1->GetBoundsInScreen().right()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w1->parent()->id()); EXPECT_EQ(w2->GetRootWindow()->bounds().right(), w2->GetBoundsInScreen().right()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w2->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w2->parent()->id()); // Drag w2 above w1. ASSERT_NO_FATAL_FAILURE(DragStartAtOffsetFromwindowOrigin(w2.get(), 0, 20)); @@ -471,13 +470,13 @@ TEST_P(DockedWindowLayoutManagerTest, ThreeWindowsDragging) { // All windows should be attached and snapped to the right side of the screen. EXPECT_EQ(w1->GetRootWindow()->bounds().right(), w1->GetBoundsInScreen().right()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w1->parent()->id()); EXPECT_EQ(w2->GetRootWindow()->bounds().right(), w2->GetBoundsInScreen().right()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w2->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w2->parent()->id()); EXPECT_EQ(w3->GetRootWindow()->bounds().right(), w3->GetBoundsInScreen().right()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w3->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w3->parent()->id()); // Test that the top and bottom windows are clamped in work area and // that the gaps between the windows differ at most by a pixel. @@ -540,13 +539,13 @@ TEST_P(DockedWindowLayoutManagerTest, ThreeWindowsDraggingSecondScreen) { // All windows should be attached and snapped to the right side of the screen. EXPECT_EQ(w1->GetRootWindow()->bounds().right(), w1->GetBoundsInScreen().right()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w1->parent()->id()); EXPECT_EQ(w2->GetRootWindow()->bounds().right(), w2->GetBoundsInScreen().right()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w2->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w2->parent()->id()); EXPECT_EQ(w3->GetRootWindow()->bounds().right(), w3->GetBoundsInScreen().right()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w3->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w3->parent()->id()); gfx::Rect work_area = Shell::GetScreen()->GetDisplayNearestWindow(w1.get()).work_area(); @@ -685,7 +684,7 @@ TEST_P(DockedWindowLayoutManagerTest, WidthMoreThanMax) { // The window should not get docked even though it is dragged past the edge. EXPECT_NE(window->GetRootWindow()->bounds().right(), window->GetBoundsInScreen().right()); - EXPECT_NE(internal::kShellWindowId_DockedContainer, window->parent()->id()); + EXPECT_NE(kShellWindowId_DockedContainer, window->parent()->id()); } // Docks three windows and tests that the very first window gets minimized. @@ -703,16 +702,16 @@ TEST_P(DockedWindowLayoutManagerTest, ThreeWindowsMinimize) { // The last two windows should be attached and snapped to the right edge. EXPECT_EQ(w2->GetRootWindow()->bounds().right(), w2->GetBoundsInScreen().right()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w2->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w2->parent()->id()); EXPECT_EQ(w3->GetRootWindow()->bounds().right(), w3->GetBoundsInScreen().right()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w3->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w3->parent()->id()); // The first window should get minimized but parented by the dock container. EXPECT_TRUE(wm::GetWindowState(w1.get())->IsMinimized()); EXPECT_TRUE(wm::GetWindowState(w2.get())->IsNormalStateType()); EXPECT_TRUE(wm::GetWindowState(w3.get())->IsNormalStateType()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w1->parent()->id()); } // Docks up to three windows and tests that they split vertical space. @@ -729,10 +728,10 @@ TEST_P(DockedWindowLayoutManagerTest, ThreeWindowsSplitHeightEvenly) { // The two windows should be attached and snapped to the right edge. EXPECT_EQ(w1->GetRootWindow()->bounds().right(), w1->GetBoundsInScreen().right()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w1->parent()->id()); EXPECT_EQ(w2->GetRootWindow()->bounds().right(), w2->GetBoundsInScreen().right()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w2->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w2->parent()->id()); // The two windows should be same size vertically and almost 1/2 of work area. gfx::Rect work_area = @@ -748,9 +747,9 @@ TEST_P(DockedWindowLayoutManagerTest, ThreeWindowsSplitHeightEvenly) { DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w3.get(), 300); // All three windows should be docked and snapped to the right edge. - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w2->parent()->id()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w3->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w1->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w2->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w3->parent()->id()); // All windows should be near same size vertically and about 1/3 of work area. EXPECT_NEAR(w1->GetBoundsInScreen().height(), @@ -786,10 +785,10 @@ TEST_P(DockedWindowLayoutManagerTest, TwoWindowsHeightRestrictions) { // The two windows should be attached and snapped to the right edge. EXPECT_EQ(w1->GetRootWindow()->bounds().right(), w1->GetBoundsInScreen().right()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w1->parent()->id()); EXPECT_EQ(w2->GetRootWindow()->bounds().right(), w2->GetBoundsInScreen().right()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w2->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w2->parent()->id()); // The two windows should have their heights restricted. EXPECT_EQ(300, w1->GetBoundsInScreen().height()); @@ -824,7 +823,7 @@ TEST_P(DockedWindowLayoutManagerTest, DisplayDisconnectionMovesDocked) { // Its height should grow to match the new work area. EXPECT_EQ(window->GetRootWindow()->bounds().right(), window->GetBoundsInScreen().right()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, window->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, window->parent()->id()); EXPECT_EQ(ideal_width(), window->bounds().width()); gfx::Rect work_area = Shell::GetScreen()->GetDisplayNearestWindow(window.get()).work_area(); @@ -836,5 +835,5 @@ INSTANTIATE_TEST_CASE_P(NormalOrPanel, DockedWindowLayoutManagerTest, testing::Values(ui::wm::WINDOW_TYPE_NORMAL, ui::wm::WINDOW_TYPE_PANEL)); -} // namespace internal + } // namespace ash diff --git a/ash/wm/dock/docked_window_resizer.cc b/ash/wm/dock/docked_window_resizer.cc index 9f3efae..d6f04d0 100644 --- a/ash/wm/dock/docked_window_resizer.cc +++ b/ash/wm/dock/docked_window_resizer.cc @@ -32,8 +32,6 @@ #include "ui/views/widget/widget.h" namespace ash { -namespace internal { - namespace { DockedWindowLayoutManager* GetDockedLayoutManagerAtPoint( @@ -320,5 +318,4 @@ DockedAction DockedWindowResizer::MaybeReparentWindowOnDragCompletion( return action; } -} // namespace internal } // namespace ash diff --git a/ash/wm/dock/docked_window_resizer.h b/ash/wm/dock/docked_window_resizer.h index 7797424..da62e2a 100644 --- a/ash/wm/dock/docked_window_resizer.h +++ b/ash/wm/dock/docked_window_resizer.h @@ -21,8 +21,6 @@ class RootWindow; } namespace ash { -namespace internal { - class DockedWindowLayoutManager; // DockWindowResizer is used by ToplevelWindowEventFilter to handle dragging, @@ -77,8 +75,8 @@ class ASH_EXPORT DockedWindowResizer : public WindowResizer { scoped_ptr<WindowResizer> next_window_resizer_; // Dock container window. - internal::DockedWindowLayoutManager* dock_layout_; - internal::DockedWindowLayoutManager* initial_dock_layout_; + DockedWindowLayoutManager* dock_layout_; + DockedWindowLayoutManager* initial_dock_layout_; // Set to true once Drag() is invoked and the bounds of the window change. bool did_move_or_resize_; @@ -98,7 +96,6 @@ class ASH_EXPORT DockedWindowResizer : public WindowResizer { DISALLOW_COPY_AND_ASSIGN(DockedWindowResizer); }; -} // namespace internal } // namespace ash #endif // ASH_WM_DOCK_DOCK_WINDOW_RESIZER_H_ diff --git a/ash/wm/dock/docked_window_resizer_unittest.cc b/ash/wm/dock/docked_window_resizer_unittest.cc index 65f7658..82489dc 100644 --- a/ash/wm/dock/docked_window_resizer_unittest.cc +++ b/ash/wm/dock/docked_window_resizer_unittest.cc @@ -37,7 +37,6 @@ #include "ui/wm/core/window_util.h" namespace ash { -namespace internal { class DockedWindowResizerTest : public test::AshTestBase, @@ -83,11 +82,9 @@ class DockedWindowResizerTest test::TestShelfDelegate* shelf_delegate = test::TestShelfDelegate::instance(); shelf_delegate->AddShelfItem(window); - PanelLayoutManager* manager = - static_cast<PanelLayoutManager*>( - Shell::GetContainer(window->GetRootWindow(), - internal::kShellWindowId_PanelContainer)-> - layout_manager()); + PanelLayoutManager* manager = static_cast<PanelLayoutManager*>( + Shell::GetContainer(window->GetRootWindow(), + kShellWindowId_PanelContainer)->layout_manager()); manager->Relayout(); } return window; @@ -170,8 +167,8 @@ class DockedWindowResizerTest // during drags. int CorrectContainerIdDuringDrag() { if (window_type_ == ui::wm::WINDOW_TYPE_PANEL) - return internal::kShellWindowId_PanelContainer; - return internal::kShellWindowId_DockedContainer; + return kShellWindowId_PanelContainer; + return kShellWindowId_DockedContainer; } // Test dragging the window vertically (to detach if it is a panel) and then @@ -232,7 +229,7 @@ class DockedWindowResizerTest // x-coordinate can get adjusted by snapping or sticking. // y-coordinate could be changed by possible automatic layout if docked. - if (window->parent()->id() != internal::kShellWindowId_DockedContainer && + if (window->parent()->id() != kShellWindowId_DockedContainer && !wm::GetWindowState(window)->HasRestoreBounds()) { EXPECT_EQ(initial_bounds.y() + dy, window->GetBoundsInScreen().y()); } @@ -271,7 +268,7 @@ TEST_P(DockedWindowResizerTest, AttachRightPrecise) { // The window should be docked at the right edge. EXPECT_EQ(window->GetRootWindow()->GetBoundsInScreen().right(), window->GetBoundsInScreen().right()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, window->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, window->parent()->id()); } // Verifies a window can be dragged and attached to the dock @@ -286,7 +283,7 @@ TEST_P(DockedWindowResizerTest, AttachRightOvershoot) { // The window should be docked at the right edge. EXPECT_EQ(window->GetRootWindow()->GetBoundsInScreen().right(), window->GetBoundsInScreen().right()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, window->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, window->parent()->id()); } // Verifies a window can be dragged and then if a pointer is not quite reaching @@ -312,8 +309,7 @@ TEST_P(DockedWindowResizerTest, AttachRightUndershoot) { EXPECT_EQ(window->GetRootWindow()->GetBoundsInScreen().right() + window->bounds().width() - kGrabOffsetX - kUndershootBy - 1, window->GetBoundsInScreen().right()); - EXPECT_EQ(internal::kShellWindowId_DefaultContainer, - window->parent()->id()); + EXPECT_EQ(kShellWindowId_DefaultContainer, window->parent()->id()); } // Verifies a window can be dragged and attached to the dock. @@ -327,7 +323,7 @@ TEST_P(DockedWindowResizerTest, AttachLeftPrecise) { // The window should be docked at the left edge. EXPECT_EQ(window->GetRootWindow()->GetBoundsInScreen().x(), window->GetBoundsInScreen().x()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, window->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, window->parent()->id()); } // Verifies a window can be dragged and attached to the dock @@ -342,7 +338,7 @@ TEST_P(DockedWindowResizerTest, AttachLeftOvershoot) { // The window should be docked at the left edge. EXPECT_EQ(window->GetRootWindow()->GetBoundsInScreen().x(), window->GetBoundsInScreen().x()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, window->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, window->parent()->id()); } // Verifies a window can be dragged and then if a pointer is not quite reaching @@ -358,8 +354,7 @@ TEST_P(DockedWindowResizerTest, AttachLeftUndershoot) { // The window should be crossing the screen edge but not docked. int expected_x = initial_bounds.x() - initial_location_in_parent().x() + 1; EXPECT_EQ(expected_x, window->GetBoundsInScreen().x()); - EXPECT_EQ(internal::kShellWindowId_DefaultContainer, - window->parent()->id()); + EXPECT_EQ(kShellWindowId_DefaultContainer, window->parent()->id()); } // Dock on the right side, change shelf alignment, check that windows move to @@ -374,7 +369,7 @@ TEST_P(DockedWindowResizerTest, AttachRightChangeShelf) { // The window should be docked at the right edge. EXPECT_EQ(window->GetRootWindow()->GetBoundsInScreen().right(), window->GetBoundsInScreen().right()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, window->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, window->parent()->id()); // set launcher shelf to be aligned on the right ash::Shell* shell = ash::Shell::GetInstance(); @@ -383,7 +378,7 @@ TEST_P(DockedWindowResizerTest, AttachRightChangeShelf) { // The window should have moved and get attached to the left dock. EXPECT_EQ(window->GetRootWindow()->GetBoundsInScreen().x(), window->GetBoundsInScreen().x()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, window->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, window->parent()->id()); // set launcher shelf to be aligned on the left shell->SetShelfAlignment(SHELF_ALIGNMENT_LEFT, @@ -391,7 +386,7 @@ TEST_P(DockedWindowResizerTest, AttachRightChangeShelf) { // The window should have moved and get attached to the right edge. EXPECT_EQ(window->GetRootWindow()->GetBoundsInScreen().right(), window->GetBoundsInScreen().right()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, window->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, window->parent()->id()); // set launcher shelf to be aligned at the bottom shell->SetShelfAlignment(SHELF_ALIGNMENT_BOTTOM, @@ -399,7 +394,7 @@ TEST_P(DockedWindowResizerTest, AttachRightChangeShelf) { // The window should stay in the right edge. EXPECT_EQ(window->GetRootWindow()->GetBoundsInScreen().right(), window->GetBoundsInScreen().right()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, window->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, window->parent()->id()); } // Dock on the right side, try to undock, then drag more to really undock @@ -416,7 +411,7 @@ TEST_P(DockedWindowResizerTest, AttachTryDetach) { EXPECT_EQ(window->GetRootWindow()->GetBoundsInScreen().right(), window->GetBoundsInScreen().right()); EXPECT_EQ(ideal_width(), window->GetBoundsInScreen().width()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, window->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, window->parent()->id()); // Try to detach by dragging left less than kSnapToDockDistance. // The window should stay docked. @@ -429,7 +424,7 @@ TEST_P(DockedWindowResizerTest, AttachTryDetach) { // The window should be still attached to the right edge. EXPECT_EQ(window->GetRootWindow()->GetBoundsInScreen().right(), window->GetBoundsInScreen().right()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, window->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, window->parent()->id()); // Try to detach by dragging left by kSnapToDockDistance or more. // The window should get undocked. @@ -442,8 +437,7 @@ TEST_P(DockedWindowResizerTest, AttachTryDetach) { // The window should be floating on the desktop again and moved to the left. EXPECT_EQ(left_edge - 32, window->GetBoundsInScreen().x()); - EXPECT_EQ(internal::kShellWindowId_DefaultContainer, - window->parent()->id()); + EXPECT_EQ(kShellWindowId_DefaultContainer, window->parent()->id()); } // Dock on the right side, and undock by dragging the right edge of the window @@ -463,7 +457,7 @@ TEST_P(DockedWindowResizerTest, AttachTryDetachDragRightEdgeOfHeader) { EXPECT_EQ(window->GetRootWindow()->GetBoundsInScreen().right(), window->GetBoundsInScreen().right()); EXPECT_EQ(ideal_width(), window->GetBoundsInScreen().width()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, window->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, window->parent()->id()); // Try to detach by dragging left less than kSnapToDockDistance. // The window should stay docked. @@ -476,7 +470,7 @@ TEST_P(DockedWindowResizerTest, AttachTryDetachDragRightEdgeOfHeader) { // The window should be still attached to the right edge. EXPECT_EQ(window->GetRootWindow()->GetBoundsInScreen().right(), window->GetBoundsInScreen().right()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, window->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, window->parent()->id()); // Try to detach by dragging left by kSnapToDockDistance or more. // The window should get undocked. @@ -489,8 +483,7 @@ TEST_P(DockedWindowResizerTest, AttachTryDetachDragRightEdgeOfHeader) { // The window should be floating on the desktop again and moved to the left. EXPECT_EQ(left_edge - 32, window->GetBoundsInScreen().x()); - EXPECT_EQ(internal::kShellWindowId_DefaultContainer, - window->parent()->id()); + EXPECT_EQ(kShellWindowId_DefaultContainer, window->parent()->id()); } // Minimize a docked window, then restore it and check that it is still docked. @@ -504,7 +497,7 @@ TEST_P(DockedWindowResizerTest, AttachMinimizeRestore) { // The window should be docked at the right edge. EXPECT_EQ(window->GetRootWindow()->GetBoundsInScreen().right(), window->GetBoundsInScreen().right()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, window->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, window->parent()->id()); wm::WindowState* window_state = wm::GetWindowState(window.get()); // Minimize the window, it should be hidden. @@ -530,7 +523,7 @@ TEST_P(DockedWindowResizerTest, AttachMaximize) { // The window should be docked at the right edge. EXPECT_EQ(window->GetRootWindow()->GetBoundsInScreen().right(), window->GetBoundsInScreen().right()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, window->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, window->parent()->id()); wm::WindowState* window_state = wm::GetWindowState(window.get()); // Maximize the window, it should get undocked and maximized in a desktop. @@ -538,7 +531,7 @@ TEST_P(DockedWindowResizerTest, AttachMaximize) { RunAllPendingInMessageLoop(); EXPECT_TRUE(window->IsVisible()); EXPECT_TRUE(window_state->IsMaximized()); - EXPECT_EQ(internal::kShellWindowId_DefaultContainer, window->parent()->id()); + EXPECT_EQ(kShellWindowId_DefaultContainer, window->parent()->id()); } // Dock two windows, undock one, check that the other one is still docked. @@ -559,11 +552,11 @@ TEST_P(DockedWindowResizerTest, AttachTwoWindows) { // Both windows should be docked at the right edge. EXPECT_EQ(w1->GetRootWindow()->GetBoundsInScreen().right(), w1->GetBoundsInScreen().right()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w1->parent()->id()); EXPECT_EQ(w2->GetRootWindow()->GetBoundsInScreen().right(), w2->GetBoundsInScreen().right()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w2->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w2->parent()->id()); // Detach by dragging left (should get undocked). const int left_edge = w2->bounds().x(); @@ -577,12 +570,11 @@ TEST_P(DockedWindowResizerTest, AttachTwoWindows) { EXPECT_FALSE(window_state1->IsMinimized()); EXPECT_EQ(w1->GetRootWindow()->GetBoundsInScreen().right(), w1->GetBoundsInScreen().right()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w1->parent()->id()); // The window should be floating on the desktop again and moved to the left. EXPECT_EQ(left_edge - 32, w2->GetBoundsInScreen().x()); - EXPECT_EQ(internal::kShellWindowId_DefaultContainer, - w2->parent()->id()); + EXPECT_EQ(kShellWindowId_DefaultContainer, w2->parent()->id()); } // Create two windows, dock one and change shelf to auto-hide. @@ -596,12 +588,12 @@ TEST_P(DockedWindowResizerTest, AttachOneAutoHideShelf) { // w1 should be docked at the right edge. EXPECT_EQ(w1->GetRootWindow()->GetBoundsInScreen().right(), w1->GetBoundsInScreen().right()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w1->parent()->id()); scoped_ptr<aura::Window> w2(CreateTestWindowInShellWithDelegateAndType( NULL, ui::wm::WINDOW_TYPE_NORMAL, 0, gfx::Rect(20, 20, 150, 20))); wm::GetWindowState(w2.get())->Maximize(); - EXPECT_EQ(internal::kShellWindowId_DefaultContainer, w2->parent()->id()); + EXPECT_EQ(kShellWindowId_DefaultContainer, w2->parent()->id()); EXPECT_TRUE(wm::GetWindowState(w2.get())->IsMaximized()); gfx::Rect work_area = @@ -641,14 +633,14 @@ TEST_P(DockedWindowResizerTest, AttachOnTwoSides) { // The first window should be docked at the right edge. EXPECT_EQ(w1->GetRootWindow()->GetBoundsInScreen().right(), w1->GetBoundsInScreen().right()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w1->parent()->id()); // The second window should be near the left edge but not snapped. // Normal window will get side-maximized while panels will not. int expected_x = test_panels() ? (initial_bounds.x() - initial_location_in_parent().x()) : 0; EXPECT_EQ(expected_x, w2->GetBoundsInScreen().x()); - EXPECT_EQ(internal::kShellWindowId_DefaultContainer, w2->parent()->id()); + EXPECT_EQ(kShellWindowId_DefaultContainer, w2->parent()->id()); } // Tests that reverting a drag restores docked state if a window was docked. @@ -662,20 +654,19 @@ TEST_P(DockedWindowResizerTest, RevertDragRestoresAttachment) { // The window should be docked at the right edge. EXPECT_EQ(window->GetRootWindow()->GetBoundsInScreen().right(), window->GetBoundsInScreen().right()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, window->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, window->parent()->id()); // Drag the window out but revert the drag ASSERT_NO_FATAL_FAILURE(DragStart(window.get())); DragMove(-50, 0); DragRevert(); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, window->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, window->parent()->id()); // Detach window. ASSERT_NO_FATAL_FAILURE(DragStart(window.get())); DragMove(-50, 0); DragEnd(); - EXPECT_EQ(internal::kShellWindowId_DefaultContainer, - window->parent()->id()); + EXPECT_EQ(kShellWindowId_DefaultContainer, window->parent()->id()); } // Tests that reverting drag restores undocked state if a window was not docked. @@ -739,7 +730,7 @@ TEST_P(DockedWindowResizerTest, DragAcrossDisplays) { // The window should be docked at the right edge. EXPECT_EQ(window->GetRootWindow()->GetBoundsInScreen().right(), window->GetBoundsInScreen().right()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, window->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, window->parent()->id()); // Try dragging to the right - enough to get it peeking at the other screen // but not enough to land in the other screen. @@ -750,8 +741,7 @@ TEST_P(DockedWindowResizerTest, DragAcrossDisplays) { DragEnd(); EXPECT_EQ(window->GetRootWindow()->GetBoundsInScreen().right(), window->GetBoundsInScreen().right()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, - window->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, window->parent()->id()); EXPECT_EQ(root_windows[0], window->GetRootWindow()); // Undock and move to the right - enough to get the mouse pointer past the @@ -766,8 +756,7 @@ TEST_P(DockedWindowResizerTest, DragAcrossDisplays) { DragEnd(); EXPECT_NE(window->GetRootWindow()->GetBoundsInScreen().right(), window->GetBoundsInScreen().right()); - EXPECT_EQ(internal::kShellWindowId_DefaultContainer, - window->parent()->id()); + EXPECT_EQ(kShellWindowId_DefaultContainer, window->parent()->id()); EXPECT_EQ(root_windows[1], window->GetRootWindow()); // Keep dragging it to the right until its left edge touches the screen edge. @@ -783,7 +772,7 @@ TEST_P(DockedWindowResizerTest, DragAcrossDisplays) { DragEnd(); EXPECT_EQ(window->GetRootWindow()->GetBoundsInScreen().x(), window->GetBoundsInScreen().x()); - EXPECT_EQ(internal::kShellWindowId_DefaultContainer, window->parent()->id()); + EXPECT_EQ(kShellWindowId_DefaultContainer, window->parent()->id()); EXPECT_EQ(root_windows[1], window->GetRootWindow()); } @@ -804,7 +793,7 @@ TEST_P(DockedWindowResizerTest, AttachTwoWindowsDetachOne) { // A window should be docked at the right edge. EXPECT_EQ(w1->GetRootWindow()->GetBoundsInScreen().right(), w1->GetBoundsInScreen().right()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w1->parent()->id()); DockedWindowLayoutManager* manager = static_cast<DockedWindowLayoutManager*>(w1->parent()->layout_manager()); EXPECT_EQ(DOCKED_ALIGNMENT_RIGHT, docked_alignment(manager)); @@ -814,7 +803,7 @@ TEST_P(DockedWindowResizerTest, AttachTwoWindowsDetachOne) { // Both windows should now be docked at the right edge. EXPECT_EQ(w2->GetRootWindow()->GetBoundsInScreen().right(), w2->GetBoundsInScreen().right()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w2->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w2->parent()->id()); // Dock width should be set to a wider window. EXPECT_EQ(DOCKED_ALIGNMENT_RIGHT, docked_alignment(manager)); EXPECT_EQ(std::max(w1->bounds().width(), w2->bounds().width()), @@ -833,12 +822,12 @@ TEST_P(DockedWindowResizerTest, AttachTwoWindowsDetachOne) { // The first window should be still docked. EXPECT_EQ(w1->GetRootWindow()->GetBoundsInScreen().right(), w1->GetBoundsInScreen().right()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w1->parent()->id()); // The second window should be still docked. EXPECT_EQ(w2->GetRootWindow()->GetBoundsInScreen().right(), w2->GetBoundsInScreen().right()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w2->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w2->parent()->id()); // Detach by dragging left more (should get undocked). const int left_edge = w2->bounds().x(); @@ -854,9 +843,9 @@ TEST_P(DockedWindowResizerTest, AttachTwoWindowsDetachOne) { // The second window should be floating on the desktop again. EXPECT_EQ(left_edge + drag_x, w2->bounds().x()); - EXPECT_EQ(internal::kShellWindowId_DefaultContainer, w2->parent()->id()); + EXPECT_EQ(kShellWindowId_DefaultContainer, w2->parent()->id()); // Dock width should be set to remaining single docked window. - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w1->parent()->id()); EXPECT_EQ(DOCKED_ALIGNMENT_RIGHT, docked_alignment(manager)); EXPECT_EQ(w1->bounds().width(), docked_width(manager)); } @@ -876,7 +865,7 @@ TEST_P(DockedWindowResizerTest, AttachWindowMaximizeOther) { // A window should be docked at the right edge. EXPECT_EQ(w1->GetRootWindow()->GetBoundsInScreen().right(), w1->GetBoundsInScreen().right()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w1->parent()->id()); DockedWindowLayoutManager* manager = static_cast<DockedWindowLayoutManager*>(w1->parent()->layout_manager()); EXPECT_EQ(DOCKED_ALIGNMENT_RIGHT, docked_alignment(manager)); @@ -892,15 +881,15 @@ TEST_P(DockedWindowResizerTest, AttachWindowMaximizeOther) { // The first window should be still docked. EXPECT_EQ(w1->GetRootWindow()->GetBoundsInScreen().right(), w1->GetBoundsInScreen().right()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w1->parent()->id()); // The second window should be floating on the desktop. EXPECT_EQ(w2->GetRootWindow()->GetBoundsInScreen().right() - (w2->bounds().width()/2 + 20), w2->GetBoundsInScreen().right()); - EXPECT_EQ(internal::kShellWindowId_DefaultContainer, w2->parent()->id()); + EXPECT_EQ(kShellWindowId_DefaultContainer, w2->parent()->id()); // Dock width should be set to remaining single docked window. - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w1->parent()->id()); EXPECT_EQ(DOCKED_ALIGNMENT_RIGHT, docked_alignment(manager)); EXPECT_EQ(w1->bounds().width(), docked_width(manager)); // Desktop work area should now shrink. @@ -926,8 +915,8 @@ TEST_P(DockedWindowResizerTest, AttachWindowMaximizeOther) { DragEnd(); EXPECT_EQ(DOCKED_ALIGNMENT_NONE, docked_alignment(manager)); // Dock should get shrunk and desktop should get expanded. - EXPECT_EQ(internal::kShellWindowId_DefaultContainer, w1->parent()->id()); - EXPECT_EQ(internal::kShellWindowId_DefaultContainer, w2->parent()->id()); + EXPECT_EQ(kShellWindowId_DefaultContainer, w1->parent()->id()); + EXPECT_EQ(kShellWindowId_DefaultContainer, w2->parent()->id()); EXPECT_EQ(DOCKED_ALIGNMENT_NONE, docked_alignment(manager)); EXPECT_EQ(0, docked_width(manager)); // The second window should now get resized and take up the whole screen. @@ -944,11 +933,11 @@ TEST_P(DockedWindowResizerTest, AttachWindowMaximizeOther) { // Release the mouse and the window should be now attached to the edge. DragEnd(); // Dock should get expanded and desktop should get shrunk. - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w1->parent()->id()); EXPECT_EQ(DOCKED_ALIGNMENT_LEFT, docked_alignment(manager)); EXPECT_EQ(w1->bounds().width(), docked_width(manager)); // Second window should still be in the desktop. - EXPECT_EQ(internal::kShellWindowId_DefaultContainer, w2->parent()->id()); + EXPECT_EQ(kShellWindowId_DefaultContainer, w2->parent()->id()); // Maximized window should be shrunk. EXPECT_EQ(ScreenUtil::GetDisplayBoundsInParent(w2.get()).width() - docked_width(manager) - min_dock_gap(), @@ -975,14 +964,14 @@ TEST_P(DockedWindowResizerTest, AttachOneTestSticky) { // A window should be docked at the left edge. EXPECT_EQ(w1->GetRootWindow()->GetBoundsInScreen().x(), w1->GetBoundsInScreen().x()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w1->parent()->id()); DockedWindowLayoutManager* manager = static_cast<DockedWindowLayoutManager*>(w1->parent()->layout_manager()); // The first window should be docked. EXPECT_EQ(w1->GetRootWindow()->GetBoundsInScreen().x(), w1->GetBoundsInScreen().x()); // Dock width should be set to that of a single docked window. - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w1->parent()->id()); EXPECT_EQ(DOCKED_ALIGNMENT_LEFT, docked_alignment(manager)); EXPECT_EQ(w1->bounds().width(), docked_width(manager)); @@ -996,9 +985,9 @@ TEST_P(DockedWindowResizerTest, AttachOneTestSticky) { EXPECT_EQ(w2->GetRootWindow()->GetBoundsInScreen().x() + (w1->bounds().right() + 20), w2->GetBoundsInScreen().x()); - EXPECT_EQ(internal::kShellWindowId_DefaultContainer, w2->parent()->id()); + EXPECT_EQ(kShellWindowId_DefaultContainer, w2->parent()->id()); // Dock width should be set to that of a single docked window. - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w1->parent()->id()); EXPECT_EQ(DOCKED_ALIGNMENT_LEFT, docked_alignment(manager)); EXPECT_EQ(w1->bounds().width(), docked_width(manager)); @@ -1013,8 +1002,8 @@ TEST_P(DockedWindowResizerTest, AttachOneTestSticky) { EXPECT_EQ(DOCKED_ALIGNMENT_LEFT, docked_alignment(manager)); EXPECT_EQ(w1->bounds().width(), docked_width(manager)); // The second window should still be in the desktop. - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id()); - EXPECT_EQ(internal::kShellWindowId_DefaultContainer, w2->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w1->parent()->id()); + EXPECT_EQ(kShellWindowId_DefaultContainer, w2->parent()->id()); // Drag w2 by a bit more - it should resist the drag (stuck edges) int start_x = w2->bounds().x(); @@ -1032,8 +1021,8 @@ TEST_P(DockedWindowResizerTest, AttachOneTestSticky) { EXPECT_EQ(DOCKED_ALIGNMENT_LEFT, docked_alignment(manager)); EXPECT_EQ(w1->bounds().width(), docked_width(manager)); // The second window should still be in the desktop - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id()); - EXPECT_EQ(internal::kShellWindowId_DefaultContainer, w2->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w1->parent()->id()); + EXPECT_EQ(kShellWindowId_DefaultContainer, w2->parent()->id()); // Drag w2 by more than the stuck threshold and drop it into the dock. ASSERT_NO_FATAL_FAILURE(DragStart(w2.get())); @@ -1045,8 +1034,8 @@ TEST_P(DockedWindowResizerTest, AttachOneTestSticky) { // Release the mouse and the window should be attached to the edge. DragEnd(); // Both windows are docked now. - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w2->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w1->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w2->parent()->id()); // Dock should get expanded and desktop should get shrunk. EXPECT_EQ(DOCKED_ALIGNMENT_LEFT, docked_alignment(manager)); EXPECT_EQ(std::max(w1->bounds().width(), w2->bounds().width()), @@ -1075,7 +1064,7 @@ TEST_P(DockedWindowResizerTest, ResizeOneOfTwoWindows) { // A window should be docked at the right edge. EXPECT_EQ(w1->GetRootWindow()->GetBoundsInScreen().right(), w1->GetBoundsInScreen().right()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w1->parent()->id()); DockedWindowLayoutManager* manager = static_cast<DockedWindowLayoutManager*>(w1->parent()->layout_manager()); EXPECT_EQ(DOCKED_ALIGNMENT_RIGHT, docked_alignment(manager)); @@ -1085,7 +1074,7 @@ TEST_P(DockedWindowResizerTest, ResizeOneOfTwoWindows) { // Both windows should now be docked at the right edge. EXPECT_EQ(w2->GetRootWindow()->GetBoundsInScreen().right(), w2->GetBoundsInScreen().right()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w2->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w2->parent()->id()); // Dock width should be set to a wider window. EXPECT_EQ(DOCKED_ALIGNMENT_RIGHT, docked_alignment(manager)); EXPECT_EQ(std::max(w1->bounds().width(), w2->bounds().width()), @@ -1103,8 +1092,8 @@ TEST_P(DockedWindowResizerTest, ResizeOneOfTwoWindows) { // Release the mouse and the window should be attached to the edge. DragEnd(); // Dock should still have both windows in it. - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w2->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w1->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w2->parent()->id()); EXPECT_EQ(DOCKED_ALIGNMENT_RIGHT, docked_alignment(manager)); // w1 is now wider than before. The dock should expand and be as wide as w1. EXPECT_EQ(previous_width + kResizeSpan1, w1->bounds().width()); @@ -1129,8 +1118,8 @@ TEST_P(DockedWindowResizerTest, ResizeOneOfTwoWindows) { // Release the mouse and the window should be attached to the edge. DragEnd(); // Dock should still have both windows in it. - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w2->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w1->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w2->parent()->id()); EXPECT_EQ(DOCKED_ALIGNMENT_RIGHT, docked_alignment(manager)); // w1 is now as wide as the maximum dock width and the dock should get // resized to the maximum width. @@ -1155,8 +1144,8 @@ TEST_P(DockedWindowResizerTest, ResizeOneOfTwoWindows) { // Release the mouse and the window should be docked. DragEnd(); // Dock should still have both windows in it. - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w2->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w1->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w2->parent()->id()); EXPECT_EQ(DOCKED_ALIGNMENT_RIGHT, docked_alignment(manager)); // w1 should be narrower than before by the length of the drag. EXPECT_EQ(previous_width - kResizeSpan3, w1->bounds().width()); @@ -1177,7 +1166,7 @@ TEST_P(DockedWindowResizerTest, ResizeOneOfTwoWindows) { DragMove(-kResizeSpan3, 0); DragEnd(); EXPECT_EQ(previous_width + kResizeSpan3, w1->bounds().width()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w1->parent()->id()); // Docked area should be as wide as possible (maximum) and same as w1. EXPECT_EQ(max_width(), docked_width(manager)); EXPECT_EQ(w1->bounds().width(), docked_width(manager)); @@ -1190,13 +1179,13 @@ TEST_P(DockedWindowResizerTest, ResizeOneOfTwoWindows) { EXPECT_EQ(DOCKED_ALIGNMENT_RIGHT, docked_alignment(manager)); // Release the mouse and the window should be no longer attached to the edge. DragEnd(); - EXPECT_EQ(internal::kShellWindowId_DefaultContainer, w1->parent()->id()); + EXPECT_EQ(kShellWindowId_DefaultContainer, w1->parent()->id()); // Dock should be as wide as w2 (and same as ideal width). EXPECT_EQ(DOCKED_ALIGNMENT_RIGHT, docked_alignment(manager)); EXPECT_EQ(ideal_width(), docked_width(manager)); EXPECT_EQ(w2->bounds().width(), docked_width(manager)); // The second window should be still docked. - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w2->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w2->parent()->id()); // Desktop work area should be inset. EXPECT_EQ(ScreenUtil::GetDisplayBoundsInParent(w1.get()).width() - docked_width(manager) - min_dock_gap(), @@ -1216,7 +1205,7 @@ TEST_P(DockedWindowResizerTest, ResizingKeepsWidth) { // Window should be docked at the right edge. EXPECT_EQ(w1->GetRootWindow()->GetBoundsInScreen().right(), w1->GetBoundsInScreen().right()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w1->parent()->id()); DockedWindowLayoutManager* manager = static_cast<DockedWindowLayoutManager*>(w1->parent()->layout_manager()); EXPECT_EQ(DOCKED_ALIGNMENT_RIGHT, docked_alignment(manager)); @@ -1235,7 +1224,7 @@ TEST_P(DockedWindowResizerTest, ResizingKeepsWidth) { // Release the mouse and the window should be attached to the edge. DragEnd(); // The window should get docked. - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w1->parent()->id()); EXPECT_EQ(DOCKED_ALIGNMENT_RIGHT, docked_alignment(manager)); // w1 is now wider and the dock should expand to be as wide as w1. EXPECT_EQ(previous_width + kResizeSpan1, w1->bounds().width()); @@ -1274,7 +1263,7 @@ TEST_P(DockedWindowResizerTest, ResizingKeepsDockedState) { // Window should be docked at the right edge. EXPECT_EQ(w1->GetRootWindow()->GetBoundsInScreen().right(), w1->GetBoundsInScreen().right()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w1->parent()->id()); DockedWindowLayoutManager* manager = static_cast<DockedWindowLayoutManager*>(w1->parent()->layout_manager()); EXPECT_EQ(DOCKED_ALIGNMENT_RIGHT, docked_alignment(manager)); @@ -1293,7 +1282,7 @@ TEST_P(DockedWindowResizerTest, ResizingKeepsDockedState) { // Release the mouse and the window should be attached to the edge. DragEnd(); // The window should stay docked. - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w1->parent()->id()); EXPECT_EQ(DOCKED_ALIGNMENT_RIGHT, docked_alignment(manager)); // w1 is now wider and the dock should expand to be as wide as w1. EXPECT_EQ(previous_width + kResizeSpan1, w1->bounds().width()); @@ -1312,7 +1301,7 @@ TEST_P(DockedWindowResizerTest, ResizingKeepsDockedState) { // Release the mouse and the window should be attached to the edge. DragEnd(); // The window should stay docked. - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w1->parent()->id()); EXPECT_EQ(DOCKED_ALIGNMENT_RIGHT, docked_alignment(manager)); // The dock should stay as wide as w1 is now (a bit less than before). EXPECT_EQ(previous_width - kResizeSpan2, w1->bounds().width()); @@ -1332,8 +1321,8 @@ TEST_P(DockedWindowResizerTest, ResizeTwoWindows) { DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w1.get(), 20); DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w2.get(), 100); // Both windows should now be docked at the right edge. - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w2->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w1->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w2->parent()->id()); // Dock width should be set to ideal width. DockedWindowLayoutManager* manager = static_cast<DockedWindowLayoutManager*>(w1->parent()->layout_manager()); @@ -1369,9 +1358,9 @@ TEST_P(DockedWindowResizerTest, ResizeTwoWindows) { // Undock w2 and then dock it back. DragToVerticalPositionRelativeToEdge(DOCKED_EDGE_RIGHT, w2.get(), -400, 100); - EXPECT_EQ(internal::kShellWindowId_DefaultContainer, w2->parent()->id()); + EXPECT_EQ(kShellWindowId_DefaultContainer, w2->parent()->id()); DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w2.get(), 100); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w2->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w2->parent()->id()); // w2 should become same width as w1. EXPECT_EQ(w1->bounds().width(), w2->bounds().width()); EXPECT_EQ(w1->bounds().width(), docked_width(manager)); @@ -1403,7 +1392,7 @@ TEST_P(DockedWindowResizerTest, DragToShelf) { // A window should be docked at the right edge. EXPECT_EQ(w1->GetRootWindow()->GetBoundsInScreen().right(), w1->GetBoundsInScreen().right()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w1->parent()->id()); DockedWindowLayoutManager* manager = static_cast<DockedWindowLayoutManager*>(w1->parent()->layout_manager()); EXPECT_EQ(DOCKED_ALIGNMENT_RIGHT, docked_alignment(manager)); @@ -1453,8 +1442,8 @@ TEST_P(DockedWindowResizerTest, DragWindowWithTransientChild) { DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, window.get(), 20); // A window should be docked at the right edge. - EXPECT_EQ(internal::kShellWindowId_DockedContainer, window->parent()->id()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, child->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, window->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, child->parent()->id()); // Drag the child - it should move freely and stay where it is dragged. ASSERT_NO_FATAL_FAILURE(DragStart(child.get())); @@ -1469,8 +1458,8 @@ TEST_P(DockedWindowResizerTest, DragWindowWithTransientChild) { DragEnd(); // The window should be undocked and the transient child should be reparented. - EXPECT_EQ(internal::kShellWindowId_DefaultContainer, window->parent()->id()); - EXPECT_EQ(internal::kShellWindowId_DefaultContainer, child->parent()->id()); + EXPECT_EQ(kShellWindowId_DefaultContainer, window->parent()->id()); + EXPECT_EQ(kShellWindowId_DefaultContainer, child->parent()->id()); // The child should not have moved. EXPECT_EQ(gfx::Point(20 + 500, 20 + 20).ToString(), child->GetBoundsInScreen().origin().ToString()); @@ -1497,8 +1486,7 @@ TEST_P(DockedWindowResizerTest, DragWindowWithModalTransientChild) { 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())); - EXPECT_EQ(internal::kShellWindowId_SystemModalContainer, - child->parent()->id()); + EXPECT_EQ(kShellWindowId_SystemModalContainer, child->parent()->id()); // End the drag, the |window| should have moved (if it is a panel it will // no longer be attached to the shelf since we dragged it above). @@ -1508,10 +1496,9 @@ TEST_P(DockedWindowResizerTest, DragWindowWithModalTransientChild) { // The original |window| should be in the default container (not docked or // attached). - EXPECT_EQ(internal::kShellWindowId_DefaultContainer, window->parent()->id()); + EXPECT_EQ(kShellWindowId_DefaultContainer, window->parent()->id()); // The transient |child| should still be in system modal container. - EXPECT_EQ(internal::kShellWindowId_SystemModalContainer, - child->parent()->id()); + EXPECT_EQ(kShellWindowId_SystemModalContainer, child->parent()->id()); // The |child| should not have moved. EXPECT_EQ(gfx::Point(20, 20).ToString(), child->GetBoundsInScreen().origin().ToString()); @@ -1530,7 +1517,7 @@ TEST_P(DockedWindowResizerTest, SideSnapDocked) { // A window should be docked at the right edge. EXPECT_EQ(w1->GetRootWindow()->GetBoundsInScreen().right(), w1->GetBoundsInScreen().right()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w1->parent()->id()); DockedWindowLayoutManager* manager = static_cast<DockedWindowLayoutManager*>(w1->parent()->layout_manager()); EXPECT_EQ(DOCKED_ALIGNMENT_RIGHT, docked_alignment(manager)); @@ -1546,7 +1533,7 @@ TEST_P(DockedWindowResizerTest, SideSnapDocked) { EXPECT_EQ(0, docked_width(manager)); EXPECT_EQ(work_area.height(), w1->bounds().height()); EXPECT_EQ(work_area.right(), w1->bounds().right()); - EXPECT_EQ(internal::kShellWindowId_DefaultContainer, w1->parent()->id()); + EXPECT_EQ(kShellWindowId_DefaultContainer, w1->parent()->id()); EXPECT_FALSE(window_state->IsDocked()); EXPECT_TRUE(window_state->IsSnapped()); @@ -1555,7 +1542,7 @@ TEST_P(DockedWindowResizerTest, SideSnapDocked) { // A window should be docked at the right edge. EXPECT_EQ(w1->GetRootWindow()->GetBoundsInScreen().right(), w1->GetBoundsInScreen().right()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, w1->parent()->id()); EXPECT_EQ(DOCKED_ALIGNMENT_RIGHT, docked_alignment(manager)); EXPECT_EQ(w1->bounds().width(), docked_width(manager)); EXPECT_TRUE(window_state->IsDocked()); @@ -1570,7 +1557,7 @@ TEST_P(DockedWindowResizerTest, SideSnapDocked) { EXPECT_EQ(0, docked_width(manager)); EXPECT_EQ(work_area.height(), w1->bounds().height()); EXPECT_EQ(work_area.x(), w1->bounds().x()); - EXPECT_EQ(internal::kShellWindowId_DefaultContainer, w1->parent()->id()); + EXPECT_EQ(kShellWindowId_DefaultContainer, w1->parent()->id()); EXPECT_FALSE(window_state->IsDocked()); EXPECT_TRUE(window_state->IsSnapped()); } @@ -1589,7 +1576,7 @@ TEST_P(DockedWindowResizerTest, MaximizedDuringDrag) { DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, window.get(), 20); EXPECT_EQ(window->GetRootWindow()->GetBoundsInScreen().right(), window->GetBoundsInScreen().right()); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, window->parent()->id()); + EXPECT_EQ(kShellWindowId_DockedContainer, window->parent()->id()); DockedWindowLayoutManager* manager = static_cast<DockedWindowLayoutManager*>( window->parent()->layout_manager()); @@ -1609,7 +1596,7 @@ TEST_P(DockedWindowResizerTest, MaximizedDuringDrag) { generator.ReleaseLeftButton(); // |window| should get undocked. - EXPECT_EQ(internal::kShellWindowId_DefaultContainer, window->parent()->id()); + EXPECT_EQ(kShellWindowId_DefaultContainer, window->parent()->id()); EXPECT_EQ(0, docked_width(manager)); EXPECT_EQ( ScreenUtil::GetMaximizedWindowBoundsInParent(window.get()).ToString(), @@ -1622,5 +1609,5 @@ INSTANTIATE_TEST_CASE_P(NormalOrPanel, DockedWindowResizerTest, testing::Values(ui::wm::WINDOW_TYPE_NORMAL, ui::wm::WINDOW_TYPE_PANEL)); -} // namespace internal + } // namespace ash diff --git a/ash/wm/drag_window_controller.cc b/ash/wm/drag_window_controller.cc index 516d59f..eee66e4 100644 --- a/ash/wm/drag_window_controller.cc +++ b/ash/wm/drag_window_controller.cc @@ -18,7 +18,6 @@ #include "ui/wm/core/window_util.h" namespace ash { -namespace internal { DragWindowController::DragWindowController(aura::Window* window) : window_(window), @@ -119,5 +118,4 @@ void DragWindowController::RecreateWindowLayers() { layer_owner_->root()->parent()->Remove(layer_owner_->root()); } -} // namespace internal } // namespace ash diff --git a/ash/wm/drag_window_controller.h b/ash/wm/drag_window_controller.h index 50020a1d..c5d8b4b 100644 --- a/ash/wm/drag_window_controller.h +++ b/ash/wm/drag_window_controller.h @@ -26,7 +26,6 @@ class Widget; } namespace ash { -namespace internal { // DragWindowController is responsible for showing a semi-transparent window // while dragging a window across displays. @@ -91,7 +90,6 @@ class ASH_EXPORT DragWindowController { DISALLOW_COPY_AND_ASSIGN(DragWindowController); }; -} // namespace internal } // namespace ash #endif // ASH_WM_DRAG_WINDOW_CONTROLLER_H_ diff --git a/ash/wm/drag_window_resizer.cc b/ash/wm/drag_window_resizer.cc index 2b91f85..15b0584 100644 --- a/ash/wm/drag_window_resizer.cc +++ b/ash/wm/drag_window_resizer.cc @@ -23,8 +23,6 @@ #include "ui/wm/core/window_util.h" namespace ash { -namespace internal { - namespace { // The maximum opacity of the drag phantom window. @@ -211,5 +209,4 @@ bool DragWindowResizer::ShouldAllowMouseWarp() { GetTarget()->type() == ui::wm::WINDOW_TYPE_PANEL); } -} // namespace internal } // namespace ash diff --git a/ash/wm/drag_window_resizer.h b/ash/wm/drag_window_resizer.h index 67f4702..a837b81 100644 --- a/ash/wm/drag_window_resizer.h +++ b/ash/wm/drag_window_resizer.h @@ -12,7 +12,6 @@ #include "ui/gfx/point.h" namespace ash { -namespace internal { class DragWindowController; @@ -64,7 +63,6 @@ class ASH_EXPORT DragWindowResizer : public WindowResizer { DISALLOW_COPY_AND_ASSIGN(DragWindowResizer); }; -} // namespace internal } // namespace ash #endif // ASH_WM_DRAG_WINDOW_RESIZER_H_ diff --git a/ash/wm/drag_window_resizer_unittest.cc b/ash/wm/drag_window_resizer_unittest.cc index 3ea9c3c..dbb4da0 100644 --- a/ash/wm/drag_window_resizer_unittest.cc +++ b/ash/wm/drag_window_resizer_unittest.cc @@ -27,7 +27,6 @@ #include "ui/wm/core/window_util.h" namespace ash { -namespace internal { namespace { const int kRootHeight = 600; @@ -107,7 +106,7 @@ class DragWindowResizerTest : public test::AshTestBase { return location; } - internal::ShelfLayoutManager* shelf_layout_manager() { + ShelfLayoutManager* shelf_layout_manager() { return Shell::GetPrimaryRootWindowController()->GetShelfLayoutManager(); } @@ -356,7 +355,7 @@ TEST_F(DragWindowResizerTest, DragWindowController) { scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer( window_.get(), gfx::Point(), HTCAPTION)); ASSERT_TRUE(resizer.get()); - internal::DragWindowResizer* drag_resizer = DragWindowResizer::instance_; + DragWindowResizer* drag_resizer = DragWindowResizer::instance_; ASSERT_TRUE(drag_resizer); EXPECT_FALSE(drag_resizer->drag_window_controller_.get()); @@ -408,7 +407,7 @@ TEST_F(DragWindowResizerTest, DragWindowController) { scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer( window_.get(), gfx::Point(), HTCAPTION)); ASSERT_TRUE(resizer.get()); - internal::DragWindowResizer* drag_resizer = DragWindowResizer::instance_; + DragWindowResizer* drag_resizer = DragWindowResizer::instance_; ASSERT_TRUE(drag_resizer); EXPECT_FALSE(drag_resizer->drag_window_controller_.get()); @@ -509,8 +508,8 @@ TEST_F(DragWindowResizerTest, CursorDeviceScaleFactor) { { // Make sure the window is on the default container first. aura::Window* default_container = - GetRootWindowController(root_windows[1])->GetContainer( - internal::kShellWindowId_DefaultContainer); + GetRootWindowController(root_windows[1]) + ->GetContainer(kShellWindowId_DefaultContainer); default_container->AddChild(window_.get()); window_->SetBoundsInScreen( gfx::Rect(600, 0, 50, 60), @@ -633,5 +632,4 @@ TEST_F(DragWindowResizerTest, MoveWindowAcrossDisplays) { } } -} // namespace internal } // namespace ash diff --git a/ash/wm/event_client_impl.cc b/ash/wm/event_client_impl.cc index fbf5f86..b54e622 100644 --- a/ash/wm/event_client_impl.cc +++ b/ash/wm/event_client_impl.cc @@ -11,7 +11,6 @@ #include "ui/keyboard/keyboard_util.h" namespace ash { -namespace internal { EventClientImpl::EventClientImpl() { } @@ -56,5 +55,4 @@ ui::EventTarget* EventClientImpl::GetToplevelEventTarget() { return Shell::GetInstance(); } -} // namespace internal } // namespace ash diff --git a/ash/wm/event_client_impl.h b/ash/wm/event_client_impl.h index b38228b..da243f9 100644 --- a/ash/wm/event_client_impl.h +++ b/ash/wm/event_client_impl.h @@ -11,7 +11,6 @@ #include "ui/aura/client/event_client.h" namespace ash { -namespace internal { class EventClientImpl : public aura::client::EventClient { public: @@ -27,7 +26,6 @@ class EventClientImpl : public aura::client::EventClient { DISALLOW_COPY_AND_ASSIGN(EventClientImpl); }; -} // namespace internal } // namespace ash #endif // ASH_WM_EVENT_CLIENT_IMPL_H_ diff --git a/ash/wm/gestures/long_press_affordance_handler.cc b/ash/wm/gestures/long_press_affordance_handler.cc index 54e819777..961b864 100644 --- a/ash/wm/gestures/long_press_affordance_handler.cc +++ b/ash/wm/gestures/long_press_affordance_handler.cc @@ -25,7 +25,6 @@ #include "ui/views/widget/widget.h" namespace ash { -namespace internal { namespace { const int kAffordanceOuterRadius = 60; @@ -365,5 +364,4 @@ void LongPressAffordanceHandler::OnWindowDestroying(aura::Window* window) { StopAffordance(); } -} // namespace internal } // namespace ash diff --git a/ash/wm/gestures/long_press_affordance_handler.h b/ash/wm/gestures/long_press_affordance_handler.h index fa0337a..3826588 100644 --- a/ash/wm/gestures/long_press_affordance_handler.h +++ b/ash/wm/gestures/long_press_affordance_handler.h @@ -20,8 +20,6 @@ namespace test { class SystemGestureEventFilterTest; } -namespace internal { - // LongPressAffordanceHandler displays an animated affordance that is shown // on a TAP_DOWN gesture. The animation sequence consists of two parts: // The first part is a grow animation that starts at semi-long-press and @@ -69,7 +67,6 @@ class LongPressAffordanceHandler : public gfx::LinearAnimation, DISALLOW_COPY_AND_ASSIGN(LongPressAffordanceHandler); }; -} // namespace internal } // namespace ash #endif // ASH_WM_GESTURES_LONG_PRESS_AFFORDANCE_HANDLER_H_ diff --git a/ash/wm/gestures/overview_gesture_handler.cc b/ash/wm/gestures/overview_gesture_handler.cc index ebff8e6..381941d 100644 --- a/ash/wm/gestures/overview_gesture_handler.cc +++ b/ash/wm/gestures/overview_gesture_handler.cc @@ -15,8 +15,6 @@ #include "ui/gfx/screen.h" namespace ash { -namespace internal { - namespace { // The number of pixels from the top of the screen (a virtual bezel) to allow @@ -106,5 +104,4 @@ bool OverviewGestureHandler::ProcessGestureEvent( return true; } -} // namespace internal } // namespace ash diff --git a/ash/wm/gestures/overview_gesture_handler.h b/ash/wm/gestures/overview_gesture_handler.h index 8b9fde5..76f5fb8 100644 --- a/ash/wm/gestures/overview_gesture_handler.h +++ b/ash/wm/gestures/overview_gesture_handler.h @@ -17,7 +17,6 @@ class ScrollEvent; } namespace ash { -namespace internal { // This handles a 3-finger swipe down gesture from the top of the screen to // enter overview mode. @@ -45,7 +44,6 @@ class OverviewGestureHandler { DISALLOW_COPY_AND_ASSIGN(OverviewGestureHandler); }; -} // namespace internal } // namespace ash #endif // ASH_WM_GESTURES_OVERVIEW_GESTURE_HANDLER_H_ diff --git a/ash/wm/gestures/overview_gesture_handler_unittest.cc b/ash/wm/gestures/overview_gesture_handler_unittest.cc index 8406586..01eb012 100644 --- a/ash/wm/gestures/overview_gesture_handler_unittest.cc +++ b/ash/wm/gestures/overview_gesture_handler_unittest.cc @@ -13,7 +13,6 @@ #include "ui/aura/window_event_dispatcher.h" namespace ash { -namespace internal { class OverviewGestureHandlerTest : public test::AshTestBase { public: @@ -170,5 +169,4 @@ TEST_F(OverviewGestureHandlerTest, GestureSwipeTopOfWindow) { EXPECT_FALSE(IsSelecting()); } -} // namespace internal } // namespace ash diff --git a/ash/wm/gestures/shelf_gesture_handler.cc b/ash/wm/gestures/shelf_gesture_handler.cc index 5e89737..42b12c5 100644 --- a/ash/wm/gestures/shelf_gesture_handler.cc +++ b/ash/wm/gestures/shelf_gesture_handler.cc @@ -21,7 +21,6 @@ #include "ui/views/widget/widget.h" namespace ash { -namespace internal { ShelfGestureHandler::ShelfGestureHandler() : drag_in_progress_(false) { @@ -93,5 +92,4 @@ bool ShelfGestureHandler::ProcessGestureEvent(const ui::GestureEvent& event) { return false; } -} // namespace internal } // namespace ash diff --git a/ash/wm/gestures/shelf_gesture_handler.h b/ash/wm/gestures/shelf_gesture_handler.h index 90dfd7c..974bf2b 100644 --- a/ash/wm/gestures/shelf_gesture_handler.h +++ b/ash/wm/gestures/shelf_gesture_handler.h @@ -13,8 +13,6 @@ class GestureEvent; } namespace ash { -namespace internal { - class TrayGestureHandler; // This manages gestures on the shelf (e.g. launcher, status tray) that affects @@ -37,7 +35,6 @@ class ShelfGestureHandler { DISALLOW_COPY_AND_ASSIGN(ShelfGestureHandler); }; -} // namespace internal } // namespace ash #endif // ASH_WM_GESTURES_SHELF_GESTURE_HANDLER_H_ diff --git a/ash/wm/gestures/tray_gesture_handler.cc b/ash/wm/gestures/tray_gesture_handler.cc index 0d2e8cf..ac72929 100644 --- a/ash/wm/gestures/tray_gesture_handler.cc +++ b/ash/wm/gestures/tray_gesture_handler.cc @@ -16,7 +16,6 @@ const int kMinBubbleHeight = 13; namespace ash { -namespace internal { TrayGestureHandler::TrayGestureHandler() : widget_(NULL), @@ -105,5 +104,4 @@ void TrayGestureHandler::OnWidgetDestroying(views::Widget* widget) { widget_ = NULL; } -} // namespace internal } // namespace ash diff --git a/ash/wm/gestures/tray_gesture_handler.h b/ash/wm/gestures/tray_gesture_handler.h index 34f033b..424fc57 100644 --- a/ash/wm/gestures/tray_gesture_handler.h +++ b/ash/wm/gestures/tray_gesture_handler.h @@ -14,7 +14,6 @@ class GestureEvent; } namespace ash { -namespace internal { // Handles gesture events on the shelf to show the system tray bubble. class TrayGestureHandler : public views::WidgetObserver { @@ -42,7 +41,6 @@ class TrayGestureHandler : public views::WidgetObserver { DISALLOW_COPY_AND_ASSIGN(TrayGestureHandler); }; -} // namespace internal } // namespace ash #endif // ASH_WM_GESTURES_TRAY_GESTURE_HANDLER_H_ diff --git a/ash/wm/immersive_fullscreen_controller_unittest.cc b/ash/wm/immersive_fullscreen_controller_unittest.cc index 4693ef5..214ee92 100644 --- a/ash/wm/immersive_fullscreen_controller_unittest.cc +++ b/ash/wm/immersive_fullscreen_controller_unittest.cc @@ -1018,7 +1018,7 @@ TEST_F(ImmersiveFullscreenControllerTest, Bubbles) { // immersive fullscreen and that the shelf's state before entering immersive // fullscreen is restored upon exiting immersive fullscreen. TEST_F(ImmersiveFullscreenControllerTest, Shelf) { - ash::internal::ShelfLayoutManager* shelf = + ash::ShelfLayoutManager* shelf = ash::Shell::GetPrimaryRootWindowController()->GetShelfLayoutManager(); // Shelf is visible by default. diff --git a/ash/wm/lock_state_controller.cc b/ash/wm/lock_state_controller.cc index 31031c1..09a46af 100644 --- a/ash/wm/lock_state_controller.cc +++ b/ash/wm/lock_state_controller.cc @@ -43,7 +43,7 @@ const int kMaxShutdownSoundDurationMs = 1500; aura::Window* GetBackground() { aura::Window* root_window = Shell::GetPrimaryRootWindow(); return Shell::GetContainer(root_window, - internal::kShellWindowId_DesktopBackgroundContainer); + kShellWindowId_DesktopBackgroundContainer); } bool IsBackgroundHidden() { @@ -163,7 +163,7 @@ LockStateController::TestApi::~TestApi() { } LockStateController::LockStateController() - : animator_(new internal::SessionStateAnimator()), + : animator_(new SessionStateAnimator()), login_status_(user::LOGGED_IN_NONE), system_is_locked_(false), shutting_down_(false), @@ -253,8 +253,8 @@ void LockStateController::CancelShutdownAnimation() { } animator_->StartGlobalAnimation( - internal::SessionStateAnimator::ANIMATION_UNDO_GRAYSCALE_BRIGHTNESS, - internal::SessionStateAnimator::ANIMATION_SPEED_REVERT_SHUTDOWN); + SessionStateAnimator::ANIMATION_UNDO_GRAYSCALE_BRIGHTNESS, + SessionStateAnimator::ANIMATION_SPEED_REVERT_SHUTDOWN); pre_shutdown_timer_.Stop(); } @@ -277,8 +277,8 @@ void LockStateController::RequestShutdown() { shell->cursor_manager()->LockCursor(); animator_->StartGlobalAnimation( - internal::SessionStateAnimator::ANIMATION_GRAYSCALE_BRIGHTNESS, - internal::SessionStateAnimator::ANIMATION_SPEED_SHUTDOWN); + SessionStateAnimator::ANIMATION_GRAYSCALE_BRIGHTNESS, + SessionStateAnimator::ANIMATION_SPEED_SHUTDOWN); StartRealShutdownTimer(true); } @@ -313,10 +313,9 @@ void LockStateController::OnAppTerminating() { Shell* shell = ash::Shell::GetInstance(); shell->cursor_manager()->HideCursor(); shell->cursor_manager()->LockCursor(); - animator_->StartAnimation( - internal::SessionStateAnimator::kAllContainersMask, - internal::SessionStateAnimator::ANIMATION_HIDE_IMMEDIATELY, - internal::SessionStateAnimator::ANIMATION_SPEED_IMMEDIATE); + animator_->StartAnimation(SessionStateAnimator::kAllContainersMask, + SessionStateAnimator::ANIMATION_HIDE_IMMEDIATELY, + SessionStateAnimator::ANIMATION_SPEED_IMMEDIATE); } } @@ -359,8 +358,7 @@ void LockStateController::StartPreShutdownAnimationTimer() { pre_shutdown_timer_.Stop(); pre_shutdown_timer_.Start( FROM_HERE, - animator_-> - GetDuration(internal::SessionStateAnimator::ANIMATION_SPEED_SHUTDOWN), + animator_->GetDuration(SessionStateAnimator::ANIMATION_SPEED_SHUTDOWN), this, &LockStateController::OnPreShutdownAnimationTimeout); } @@ -379,8 +377,8 @@ void LockStateController::StartRealShutdownTimer(bool with_animation_time) { base::TimeDelta duration = base::TimeDelta::FromMilliseconds(kShutdownRequestDelayMs); if (with_animation_time) { - duration += animator_->GetDuration( - internal::SessionStateAnimator::ANIMATION_SPEED_SHUTDOWN); + duration += + animator_->GetDuration(SessionStateAnimator::ANIMATION_SPEED_SHUTDOWN); } #if defined(OS_CHROMEOS) @@ -420,8 +418,8 @@ void LockStateController::StartCancellableShutdownAnimation() { shell->cursor_manager()->HideCursor(); animator_->StartGlobalAnimation( - internal::SessionStateAnimator::ANIMATION_GRAYSCALE_BRIGHTNESS, - internal::SessionStateAnimator::ANIMATION_SPEED_SHUTDOWN); + SessionStateAnimator::ANIMATION_GRAYSCALE_BRIGHTNESS, + SessionStateAnimator::ANIMATION_SPEED_SHUTDOWN); StartPreShutdownAnimationTimer(); } @@ -441,23 +439,21 @@ void LockStateController::StartImmediatePreLockAnimation( observer->Pause(); animator_->StartAnimationWithObserver( - internal::SessionStateAnimator::NON_LOCK_SCREEN_CONTAINERS, - internal::SessionStateAnimator::ANIMATION_LIFT, - internal::SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS, + SessionStateAnimator::NON_LOCK_SCREEN_CONTAINERS, + SessionStateAnimator::ANIMATION_LIFT, + SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS, observer); animator_->StartAnimationWithObserver( - internal::SessionStateAnimator::LAUNCHER, - internal::SessionStateAnimator::ANIMATION_FADE_OUT, - internal::SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS, + SessionStateAnimator::LAUNCHER, + SessionStateAnimator::ANIMATION_FADE_OUT, + SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS, observer); // Hide the screen locker containers so we can raise them later. - animator_->StartAnimation( - internal::SessionStateAnimator::LOCK_SCREEN_CONTAINERS, - internal::SessionStateAnimator::ANIMATION_HIDE_IMMEDIATELY, - internal::SessionStateAnimator::ANIMATION_SPEED_IMMEDIATE); + animator_->StartAnimation(SessionStateAnimator::LOCK_SCREEN_CONTAINERS, + SessionStateAnimator::ANIMATION_HIDE_IMMEDIATELY, + SessionStateAnimator::ANIMATION_SPEED_IMMEDIATE); AnimateBackgroundAppearanceIfNecessary( - internal::SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS, - observer); + SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS, observer); observer->Unpause(); @@ -480,23 +476,21 @@ void LockStateController::StartCancellablePreLockAnimation() { observer->Pause(); animator_->StartAnimationWithObserver( - internal::SessionStateAnimator::NON_LOCK_SCREEN_CONTAINERS, - internal::SessionStateAnimator::ANIMATION_LIFT, - internal::SessionStateAnimator::ANIMATION_SPEED_UNDOABLE, + SessionStateAnimator::NON_LOCK_SCREEN_CONTAINERS, + SessionStateAnimator::ANIMATION_LIFT, + SessionStateAnimator::ANIMATION_SPEED_UNDOABLE, observer); animator_->StartAnimationWithObserver( - internal::SessionStateAnimator::LAUNCHER, - internal::SessionStateAnimator::ANIMATION_FADE_OUT, - internal::SessionStateAnimator::ANIMATION_SPEED_UNDOABLE, + SessionStateAnimator::LAUNCHER, + SessionStateAnimator::ANIMATION_FADE_OUT, + SessionStateAnimator::ANIMATION_SPEED_UNDOABLE, observer); // Hide the screen locker containers so we can raise them later. - animator_->StartAnimation( - internal::SessionStateAnimator::LOCK_SCREEN_CONTAINERS, - internal::SessionStateAnimator::ANIMATION_HIDE_IMMEDIATELY, - internal::SessionStateAnimator::ANIMATION_SPEED_IMMEDIATE); + animator_->StartAnimation(SessionStateAnimator::LOCK_SCREEN_CONTAINERS, + SessionStateAnimator::ANIMATION_HIDE_IMMEDIATELY, + SessionStateAnimator::ANIMATION_SPEED_IMMEDIATE); AnimateBackgroundAppearanceIfNecessary( - internal::SessionStateAnimator::ANIMATION_SPEED_UNDOABLE, - observer); + SessionStateAnimator::ANIMATION_SPEED_UNDOABLE, observer); DispatchCancelMode(); FOR_EACH_OBSERVER(LockStateObserver, observers_, @@ -515,18 +509,17 @@ void LockStateController::CancelPreLockAnimation() { observer->Pause(); animator_->StartAnimationWithObserver( - internal::SessionStateAnimator::NON_LOCK_SCREEN_CONTAINERS, - internal::SessionStateAnimator::ANIMATION_UNDO_LIFT, - internal::SessionStateAnimator::ANIMATION_SPEED_UNDO_MOVE_WINDOWS, + SessionStateAnimator::NON_LOCK_SCREEN_CONTAINERS, + SessionStateAnimator::ANIMATION_UNDO_LIFT, + SessionStateAnimator::ANIMATION_SPEED_UNDO_MOVE_WINDOWS, observer); animator_->StartAnimationWithObserver( - internal::SessionStateAnimator::LAUNCHER, - internal::SessionStateAnimator::ANIMATION_FADE_IN, - internal::SessionStateAnimator::ANIMATION_SPEED_UNDO_MOVE_WINDOWS, + SessionStateAnimator::LAUNCHER, + SessionStateAnimator::ANIMATION_FADE_IN, + SessionStateAnimator::ANIMATION_SPEED_UNDO_MOVE_WINDOWS, observer); AnimateBackgroundHidingIfNecessary( - internal::SessionStateAnimator::ANIMATION_SPEED_UNDO_MOVE_WINDOWS, - observer); + SessionStateAnimator::ANIMATION_SPEED_UNDO_MOVE_WINDOWS, observer); observer->Unpause(); } @@ -542,9 +535,9 @@ void LockStateController::StartPostLockAnimation() { observer->Pause(); animator_->StartAnimationWithObserver( - internal::SessionStateAnimator::LOCK_SCREEN_CONTAINERS, - internal::SessionStateAnimator::ANIMATION_RAISE_TO_SCREEN, - internal::SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS, + SessionStateAnimator::LOCK_SCREEN_CONTAINERS, + SessionStateAnimator::ANIMATION_RAISE_TO_SCREEN, + SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS, observer); observer->Unpause(); } @@ -553,9 +546,9 @@ void LockStateController::StartUnlockAnimationBeforeUIDestroyed( base::Closure& callback) { VLOG(1) << "StartUnlockAnimationBeforeUIDestroyed"; animator_->StartAnimationWithCallback( - internal::SessionStateAnimator::LOCK_SCREEN_CONTAINERS, - internal::SessionStateAnimator::ANIMATION_LIFT, - internal::SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS, + SessionStateAnimator::LOCK_SCREEN_CONTAINERS, + SessionStateAnimator::ANIMATION_LIFT, + SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS, callback); } @@ -571,18 +564,17 @@ void LockStateController::StartUnlockAnimationAfterUIDestroyed() { observer->Pause(); animator_->StartAnimationWithObserver( - internal::SessionStateAnimator::NON_LOCK_SCREEN_CONTAINERS, - internal::SessionStateAnimator::ANIMATION_DROP, - internal::SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS, + SessionStateAnimator::NON_LOCK_SCREEN_CONTAINERS, + SessionStateAnimator::ANIMATION_DROP, + SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS, observer); animator_->StartAnimationWithObserver( - internal::SessionStateAnimator::LAUNCHER, - internal::SessionStateAnimator::ANIMATION_FADE_IN, - internal::SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS, + SessionStateAnimator::LAUNCHER, + SessionStateAnimator::ANIMATION_FADE_IN, + SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS, observer); AnimateBackgroundHidingIfNecessary( - internal::SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS, - observer); + SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS, observer); observer->Unpause(); } @@ -649,10 +641,9 @@ void LockStateController::StoreUnlockedProperties() { } if (unlocked_properties_->background_is_hidden) { // Hide background so that it can be animated later. - animator_->StartAnimation( - internal::SessionStateAnimator::DESKTOP_BACKGROUND, - internal::SessionStateAnimator::ANIMATION_HIDE_IMMEDIATELY, - internal::SessionStateAnimator::ANIMATION_SPEED_IMMEDIATE); + animator_->StartAnimation(SessionStateAnimator::DESKTOP_BACKGROUND, + SessionStateAnimator::ANIMATION_HIDE_IMMEDIATELY, + SessionStateAnimator::ANIMATION_SPEED_IMMEDIATE); ShowBackground(); } } @@ -663,35 +654,34 @@ void LockStateController::RestoreUnlockedProperties() { if (unlocked_properties_->background_is_hidden) { HideBackground(); // Restore background visibility. - animator_->StartAnimation( - internal::SessionStateAnimator::DESKTOP_BACKGROUND, - internal::SessionStateAnimator::ANIMATION_FADE_IN, - internal::SessionStateAnimator::ANIMATION_SPEED_IMMEDIATE); + animator_->StartAnimation(SessionStateAnimator::DESKTOP_BACKGROUND, + SessionStateAnimator::ANIMATION_FADE_IN, + SessionStateAnimator::ANIMATION_SPEED_IMMEDIATE); } unlocked_properties_.reset(); } void LockStateController::AnimateBackgroundAppearanceIfNecessary( - internal::SessionStateAnimator::AnimationSpeed speed, + SessionStateAnimator::AnimationSpeed speed, ui::LayerAnimationObserver* observer) { if (unlocked_properties_.get() && unlocked_properties_->background_is_hidden) { animator_->StartAnimationWithObserver( - internal::SessionStateAnimator::DESKTOP_BACKGROUND, - internal::SessionStateAnimator::ANIMATION_FADE_IN, + SessionStateAnimator::DESKTOP_BACKGROUND, + SessionStateAnimator::ANIMATION_FADE_IN, speed, observer); } } void LockStateController::AnimateBackgroundHidingIfNecessary( - internal::SessionStateAnimator::AnimationSpeed speed, + SessionStateAnimator::AnimationSpeed speed, ui::LayerAnimationObserver* observer) { if (unlocked_properties_.get() && unlocked_properties_->background_is_hidden) { animator_->StartAnimationWithObserver( - internal::SessionStateAnimator::DESKTOP_BACKGROUND, - internal::SessionStateAnimator::ANIMATION_FADE_OUT, + SessionStateAnimator::DESKTOP_BACKGROUND, + SessionStateAnimator::ANIMATION_FADE_OUT, speed, observer); } diff --git a/ash/wm/lock_state_controller.h b/ash/wm/lock_state_controller.h index 7109e73..b6d134f 100644 --- a/ash/wm/lock_state_controller.h +++ b/ash/wm/lock_state_controller.h @@ -265,15 +265,15 @@ class ASH_EXPORT LockStateController : public aura::WindowTreeHostObserver, // Fades in background layer with |speed| if it was hidden in unlocked state. void AnimateBackgroundAppearanceIfNecessary( - ash::internal::SessionStateAnimator::AnimationSpeed speed, + ash::SessionStateAnimator::AnimationSpeed speed, ui::LayerAnimationObserver* observer); // Fades out background layer with |speed| if it was hidden in unlocked state. void AnimateBackgroundHidingIfNecessary( - ash::internal::SessionStateAnimator::AnimationSpeed speed, + ash::SessionStateAnimator::AnimationSpeed speed, ui::LayerAnimationObserver* observer); - scoped_ptr<internal::SessionStateAnimator> animator_; + scoped_ptr<SessionStateAnimator> animator_; scoped_ptr<LockStateControllerDelegate> delegate_; diff --git a/ash/wm/lock_state_controller_unittest.cc b/ash/wm/lock_state_controller_unittest.cc index b950fe1..8b683b3 100644 --- a/ash/wm/lock_state_controller_unittest.cc +++ b/ash/wm/lock_state_controller_unittest.cc @@ -36,11 +36,7 @@ #endif namespace ash { - -using internal::SessionStateAnimator; - namespace test { - namespace { bool cursor_visible() { @@ -58,16 +54,16 @@ aura::Window* GetContainer(int container ) { } bool IsBackgroundHidden() { - return !GetContainer(internal::kShellWindowId_DesktopBackgroundContainer)-> - IsVisible(); + return !GetContainer(kShellWindowId_DesktopBackgroundContainer)->IsVisible(); } void HideBackground() { ui::ScopedLayerAnimationSettings settings( - GetContainer(internal::kShellWindowId_DesktopBackgroundContainer)-> - layer()->GetAnimator()); + GetContainer(kShellWindowId_DesktopBackgroundContainer) + ->layer() + ->GetAnimator()); settings.SetTransitionDuration(base::TimeDelta()); - GetContainer(internal::kShellWindowId_DesktopBackgroundContainer)->Hide(); + GetContainer(kShellWindowId_DesktopBackgroundContainer)->Hide(); } } // namespace @@ -396,8 +392,8 @@ class LockStateControllerTest : public AshTestBase { window_->SetType(ui::wm::WINDOW_TYPE_NORMAL); window_->Init(aura::WINDOW_LAYER_TEXTURED); window_->SetName("WINDOW"); - aura::Window* container = Shell::GetContainer(Shell::GetPrimaryRootWindow(), - internal::kShellWindowId_LockScreenContainer); + aura::Window* container = Shell::GetContainer( + Shell::GetPrimaryRootWindow(), kShellWindowId_LockScreenContainer); ASSERT_TRUE(container); container->AddChild(window_.get()); window_->Show(); @@ -617,8 +613,7 @@ TEST_F(LockStateControllerTest, DISABLED_LockAndCancel) { AdvancePartially(SessionStateAnimator::ANIMATION_SPEED_UNDOABLE, 0.5f); gfx::Transform transform_before_button_released = - GetContainer(internal::kShellWindowId_DefaultContainer)-> - layer()->transform(); + GetContainer(kShellWindowId_DefaultContainer)->layer()->transform(); // Release the button before the lock timer fires. ReleasePowerButton(); @@ -626,8 +621,7 @@ TEST_F(LockStateControllerTest, DISABLED_LockAndCancel) { ExpectPreLockAnimationCancel(); gfx::Transform transform_after_button_released = - GetContainer(internal::kShellWindowId_DefaultContainer)-> - layer()->transform(); + GetContainer(kShellWindowId_DefaultContainer)->layer()->transform(); // Expect no flickering, animation should proceed from mid-state. EXPECT_EQ(transform_before_button_released, transform_after_button_released); diff --git a/ash/wm/maximize_mode/maximize_mode_window_manager.cc b/ash/wm/maximize_mode/maximize_mode_window_manager.cc index a97030e..eb133f7 100644 --- a/ash/wm/maximize_mode/maximize_mode_window_manager.cc +++ b/ash/wm/maximize_mode/maximize_mode_window_manager.cc @@ -16,7 +16,6 @@ #include "ui/gfx/screen.h" namespace ash { -namespace internal { MaximizeModeWindowManager::~MaximizeModeWindowManager() { Shell::GetInstance()->RemoveShellObserver(this); @@ -170,8 +169,8 @@ void MaximizeModeWindowManager::AddWindowCreationObservers() { aura::Window::Windows root_windows = Shell::GetAllRootWindows(); for (aura::Window::Windows::const_iterator iter = root_windows.begin(); iter != root_windows.end(); ++iter) { - aura::Window* container = Shell::GetContainer(*iter, - internal::kShellWindowId_DefaultContainer); + aura::Window* container = + Shell::GetContainer(*iter, kShellWindowId_DefaultContainer); DCHECK(observed_container_windows_.find(container) == observed_container_windows_.end()); container->AddObserver(this); @@ -212,13 +211,11 @@ void MaximizeModeWindowManager::EnableBackdropBehindTopWindowOnEachDisplay( iter != controllers.end(); ++iter) { RootWindowController* controller = *iter; aura::Window* container = Shell::GetContainer( - controller->root_window(), - internal::kShellWindowId_DefaultContainer); + controller->root_window(), kShellWindowId_DefaultContainer); controller->workspace_controller()->SetMaximizeBackdropDelegate( scoped_ptr<WorkspaceLayoutManagerDelegate>( enable ? new WorkspaceBackdropDelegate(container) : NULL)); } } -} // namespace internal } // namespace ash diff --git a/ash/wm/maximize_mode/maximize_mode_window_manager.h b/ash/wm/maximize_mode/maximize_mode_window_manager.h index 0c51cb3..fb1e693 100644 --- a/ash/wm/maximize_mode/maximize_mode_window_manager.h +++ b/ash/wm/maximize_mode/maximize_mode_window_manager.h @@ -17,10 +17,8 @@ #include "ui/gfx/display_observer.h" namespace ash { -class Shell; - -namespace internal{ class MaximizeModeWindowState; +class Shell; // A window manager which - when created - will force all windows into maximized // mode. Exception are panels and windows which cannot be maximized. @@ -114,7 +112,6 @@ class ASH_EXPORT MaximizeModeWindowManager : public aura::WindowObserver, DISALLOW_COPY_AND_ASSIGN(MaximizeModeWindowManager); }; -} // namespace internal } // namespace ash #endif // ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_WINDOW_MANAGER_H_ diff --git a/ash/wm/maximize_mode/maximize_mode_window_manager_unittest.cc b/ash/wm/maximize_mode/maximize_mode_window_manager_unittest.cc index 82b07d7..8e93bb1 100644 --- a/ash/wm/maximize_mode/maximize_mode_window_manager_unittest.cc +++ b/ash/wm/maximize_mode/maximize_mode_window_manager_unittest.cc @@ -45,7 +45,7 @@ class MaximizeModeWindowManagerTest : public test::AshTestBase { } // Create the Maximized mode window manager. - ash::internal::MaximizeModeWindowManager* CreateMaximizeModeWindowManager() { + ash::MaximizeModeWindowManager* CreateMaximizeModeWindowManager() { EXPECT_FALSE(maximize_mode_window_manager()); Shell::GetInstance()->EnableMaximizeModeWindowManager(true); return maximize_mode_window_manager(); @@ -58,7 +58,7 @@ class MaximizeModeWindowManagerTest : public test::AshTestBase { } // Get the maximze window manager. - ash::internal::MaximizeModeWindowManager* maximize_mode_window_manager() { + ash::MaximizeModeWindowManager* maximize_mode_window_manager() { test::ShellTestApi test_api(Shell::GetInstance()); return test_api.maximize_mode_window_manager(); } @@ -98,8 +98,7 @@ class MaximizeModeWindowManagerTest : public test::AshTestBase { // Test that creating the object and destroying it without any windows should // not cause any problems. TEST_F(MaximizeModeWindowManagerTest, SimpleStart) { - ash::internal::MaximizeModeWindowManager* manager = - CreateMaximizeModeWindowManager(); + ash::MaximizeModeWindowManager* manager = CreateMaximizeModeWindowManager(); ASSERT_TRUE(manager); EXPECT_EQ(0, manager->GetNumberOfManagedWindows()); DestroyMaximizeModeWindowManager(); @@ -132,8 +131,7 @@ TEST_F(MaximizeModeWindowManagerTest, PreCreateWindows) { // Create the manager and make sure that all qualifying windows were detected // and changed. - ash::internal::MaximizeModeWindowManager* manager = - CreateMaximizeModeWindowManager(); + ash::MaximizeModeWindowManager* manager = CreateMaximizeModeWindowManager(); ASSERT_TRUE(manager); EXPECT_EQ(3, manager->GetNumberOfManagedWindows()); EXPECT_TRUE(wm::GetWindowState(w1.get())->IsMaximized()); @@ -172,8 +170,7 @@ TEST_F(MaximizeModeWindowManagerTest, PreCreateWindows) { // Test that creating windows while a maximizer exists picks them properly up. TEST_F(MaximizeModeWindowManagerTest, CreateWindows) { - ash::internal::MaximizeModeWindowManager* manager = - CreateMaximizeModeWindowManager(); + ash::MaximizeModeWindowManager* manager = CreateMaximizeModeWindowManager(); ASSERT_TRUE(manager); EXPECT_EQ(0, manager->GetNumberOfManagedWindows()); @@ -230,7 +227,7 @@ TEST_F(MaximizeModeWindowManagerTest, CreateWindows) { // Test that windows which got created before the maximizer was created can be // destroyed while the maximizer is still running. TEST_F(MaximizeModeWindowManagerTest, PreCreateWindowsDeleteWhileActive) { - ash::internal::MaximizeModeWindowManager* manager = NULL; + ash::MaximizeModeWindowManager* manager = NULL; { // Bounds for windows we know can be controlled. gfx::Rect rect1(10, 10, 200, 50); @@ -258,8 +255,7 @@ TEST_F(MaximizeModeWindowManagerTest, PreCreateWindowsDeleteWhileActive) { // Test that windows which got created while the maximizer was running can get // destroyed before the maximizer gets destroyed. TEST_F(MaximizeModeWindowManagerTest, CreateWindowsAndDeleteWhileActive) { - ash::internal::MaximizeModeWindowManager* manager = - CreateMaximizeModeWindowManager(); + ash::MaximizeModeWindowManager* manager = CreateMaximizeModeWindowManager(); ASSERT_TRUE(manager); EXPECT_EQ(0, manager->GetNumberOfManagedWindows()); { @@ -293,8 +289,7 @@ TEST_F(MaximizeModeWindowManagerTest, MaximizedShouldRemainMaximized) { wm::GetWindowState(window.get())->Maximize(); // Create the manager and make sure that the window gets detected. - ash::internal::MaximizeModeWindowManager* manager = - CreateMaximizeModeWindowManager(); + ash::MaximizeModeWindowManager* manager = CreateMaximizeModeWindowManager(); ASSERT_TRUE(manager); EXPECT_EQ(1, manager->GetNumberOfManagedWindows()); EXPECT_TRUE(wm::GetWindowState(window.get())->IsMaximized()); @@ -322,8 +317,7 @@ TEST_F(MaximizeModeWindowManagerTest, MinimizedWindowBehavior) { wm::GetWindowState(initially_maximized_window.get())->Maximize(); // Create the manager and make sure that the window gets detected. - ash::internal::MaximizeModeWindowManager* manager = - CreateMaximizeModeWindowManager(); + ash::MaximizeModeWindowManager* manager = CreateMaximizeModeWindowManager(); ASSERT_TRUE(manager); EXPECT_EQ(3, manager->GetNumberOfManagedWindows()); EXPECT_TRUE(wm::GetWindowState( @@ -368,8 +362,7 @@ TEST_F(MaximizeModeWindowManagerTest, DesktopSizeChangeMovesUnmaximizable) { CreateNonMaximizableWindow(ui::wm::WINDOW_TYPE_NORMAL, rect2)); // Turning on the manager will reposition (but not resize) the window. - ash::internal::MaximizeModeWindowManager* manager = - CreateMaximizeModeWindowManager(); + ash::MaximizeModeWindowManager* manager = CreateMaximizeModeWindowManager(); ASSERT_TRUE(manager); EXPECT_EQ(2, manager->GetNumberOfManagedWindows()); gfx::Rect moved_bounds(window1->bounds()); @@ -398,8 +391,7 @@ TEST_F(MaximizeModeWindowManagerTest, SizeChangeReturnWindowToOriginalPos) { CreateNonMaximizableWindow(ui::wm::WINDOW_TYPE_NORMAL, rect)); // Turning on the manager will reposition (but not resize) the window. - ash::internal::MaximizeModeWindowManager* manager = - CreateMaximizeModeWindowManager(); + ash::MaximizeModeWindowManager* manager = CreateMaximizeModeWindowManager(); ASSERT_TRUE(manager); EXPECT_EQ(1, manager->GetNumberOfManagedWindows()); gfx::Rect moved_bounds(window->bounds()); @@ -444,8 +436,7 @@ TEST_F(MaximizeModeWindowManagerTest, ModeChangeKeepsMRUOrder) { } // Activating the window manager should keep the order. - ash::internal::MaximizeModeWindowManager* manager = - CreateMaximizeModeWindowManager(); + ash::MaximizeModeWindowManager* manager = CreateMaximizeModeWindowManager(); ASSERT_TRUE(manager); EXPECT_EQ(5, manager->GetNumberOfManagedWindows()); { diff --git a/ash/wm/maximize_mode/maximize_mode_window_state.cc b/ash/wm/maximize_mode/maximize_mode_window_state.cc index 9f7c3d0..bfb1322 100644 --- a/ash/wm/maximize_mode/maximize_mode_window_state.cc +++ b/ash/wm/maximize_mode/maximize_mode_window_state.cc @@ -23,7 +23,6 @@ #include "ui/gfx/rect.h" namespace ash { -namespace internal { namespace { // Returns the biggest possible size for a window which is about to be @@ -223,5 +222,4 @@ void MaximizeModeWindowState::MaximizeOrCenterWindow( } } -} // namespace internal } // namespace ash diff --git a/ash/wm/maximize_mode/maximize_mode_window_state.h b/ash/wm/maximize_mode/maximize_mode_window_state.h index 0129960..5868ea3 100644 --- a/ash/wm/maximize_mode/maximize_mode_window_state.h +++ b/ash/wm/maximize_mode/maximize_mode_window_state.h @@ -8,7 +8,6 @@ #include "ash/wm/window_state.h" namespace ash { -namespace internal { class MaximizeModeWindowManager; // The MaximizeModeWindowState implementation which reduces all possible window @@ -62,7 +61,6 @@ class MaximizeModeWindowState : public wm::WindowState::State { DISALLOW_COPY_AND_ASSIGN(MaximizeModeWindowState); }; -} // namespace internal } // namespace ash #endif // ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_WINDOW_STATE_H_ diff --git a/ash/wm/maximize_mode/workspace_backdrop_delegate.cc b/ash/wm/maximize_mode/workspace_backdrop_delegate.cc index 455f362..0b7fc01 100644 --- a/ash/wm/maximize_mode/workspace_backdrop_delegate.cc +++ b/ash/wm/maximize_mode/workspace_backdrop_delegate.cc @@ -16,9 +16,6 @@ #include "ui/wm/core/window_util.h" namespace ash { - -namespace internal { - namespace { // The opacity of the backdrop. @@ -149,5 +146,4 @@ void WorkspaceBackdropDelegate::Show() { background_->GetNativeView()->layer()->SetOpacity(kBackdropOpacity); } -} // namespace internal } // namespace ash diff --git a/ash/wm/maximize_mode/workspace_backdrop_delegate.h b/ash/wm/maximize_mode/workspace_backdrop_delegate.h index 02ba3a3..27768ac 100644 --- a/ash/wm/maximize_mode/workspace_backdrop_delegate.h +++ b/ash/wm/maximize_mode/workspace_backdrop_delegate.h @@ -22,8 +22,6 @@ class Widget; namespace ash { -namespace internal { - // A background which gets created for a container |window| and which gets // stacked behind the topmost window (within that container) covering the // entire container. @@ -73,8 +71,6 @@ class WorkspaceBackdropDelegate : public aura::WindowObserver, DISALLOW_COPY_AND_ASSIGN(WorkspaceBackdropDelegate); }; -} // namespace internal - } // namespace ash #endif // ASH_WM_MAXIMIZE_MODE_WORKSPACE_BACKDROP_DELEGATE_H_ diff --git a/ash/wm/mru_window_tracker.cc b/ash/wm/mru_window_tracker.cc index 419fed5..83a805a 100644 --- a/ash/wm/mru_window_tracker.cc +++ b/ash/wm/mru_window_tracker.cc @@ -35,8 +35,8 @@ void AddTrackedWindows(aura::Window* root, // Adds windows being dragged in the docked container to |windows| list. void AddDraggedWindows(aura::Window* root, MruWindowTracker::WindowList* windows) { - aura::Window* container = Shell::GetContainer( - root, internal::kShellWindowId_DockedContainer); + aura::Window* container = + Shell::GetContainer(root, kShellWindowId_DockedContainer); const MruWindowTracker::WindowList& children = container->children(); for (MruWindowTracker::WindowList::const_iterator iter = children.begin(); iter != children.end(); ++iter) { diff --git a/ash/wm/mru_window_tracker_unittest.cc b/ash/wm/mru_window_tracker_unittest.cc index 924060d..8c507e1 100644 --- a/ash/wm/mru_window_tracker_unittest.cc +++ b/ash/wm/mru_window_tracker_unittest.cc @@ -13,7 +13,6 @@ #include "ui/aura/window.h" namespace ash { -namespace internal { class MruWindowTrackerTest : public test::AshTestBase { public: @@ -80,5 +79,4 @@ TEST_F(MruWindowTrackerTest, MinimizedWindowsAreLru) { EXPECT_EQ(w5.get(), window_list[5]); } -} // namespace internal } // namespace ash diff --git a/ash/wm/overlay_event_filter.cc b/ash/wm/overlay_event_filter.cc index ed4f316..6221e5e 100644 --- a/ash/wm/overlay_event_filter.cc +++ b/ash/wm/overlay_event_filter.cc @@ -11,7 +11,6 @@ #include "ui/views/widget/widget.h" namespace ash { -namespace internal { OverlayEventFilter::OverlayEventFilter() : delegate_(NULL) { @@ -70,5 +69,5 @@ void OverlayEventFilter::Cancel() { if (delegate_) delegate_->Cancel(); } -} // namespace internal + } // namespace ash diff --git a/ash/wm/overlay_event_filter.h b/ash/wm/overlay_event_filter.h index 252097c..7787c45 100644 --- a/ash/wm/overlay_event_filter.h +++ b/ash/wm/overlay_event_filter.h @@ -12,7 +12,6 @@ #include "ui/events/event_handler.h" namespace ash { -namespace internal { // EventFilter for the "overlay window", which intercepts events before they are // processed by the usual path (e.g. the partial screenshot UI, the keyboard @@ -66,7 +65,6 @@ class ASH_EXPORT OverlayEventFilter : public ui::EventHandler, DISALLOW_COPY_AND_ASSIGN(OverlayEventFilter); }; -} // namespace internal } // namespace ash #endif // ASH_WM_OVERLAY_EVENT_FILTER_H_ diff --git a/ash/wm/overview/window_overview.cc b/ash/wm/overview/window_overview.cc index 34d4dc4..8c7af63 100644 --- a/ash/wm/overview/window_overview.cc +++ b/ash/wm/overview/window_overview.cc @@ -389,10 +389,10 @@ void WindowOverview::PositionWindowsOnRoot( return; gfx::Size window_size; - gfx::Rect total_bounds = ScreenUtil::ConvertRectToScreen(root_window, + gfx::Rect total_bounds = ScreenUtil::ConvertRectToScreen( + root_window, ScreenUtil::GetDisplayWorkAreaBoundsInParent( - Shell::GetContainer(root_window, - internal::kShellWindowId_DefaultContainer))); + Shell::GetContainer(root_window, kShellWindowId_DefaultContainer))); // Find the minimum number of windows per row that will fit all of the // windows on screen. @@ -433,10 +433,10 @@ void WindowOverview::InitializeSelectionWidget() { params.keep_on_top = false; params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; params.opacity = views::Widget::InitParams::OPAQUE_WINDOW; - params.parent = Shell::GetContainer( - single_root_window_ ? single_root_window_ : - windows_->front()->GetRootWindow(), - internal::kShellWindowId_DefaultContainer); + params.parent = Shell::GetContainer(single_root_window_ + ? single_root_window_ + : windows_->front()->GetRootWindow(), + kShellWindowId_DefaultContainer); params.accept_events = false; selection_widget_->set_focus_on_creation(false); selection_widget_->Init(params); diff --git a/ash/wm/overview/window_selector.h b/ash/wm/overview/window_selector.h index d34c901..2139a17 100644 --- a/ash/wm/overview/window_selector.h +++ b/ash/wm/overview/window_selector.h @@ -25,15 +25,11 @@ class EventHandler; } namespace ash { - -namespace internal { -class WindowSelectorTest; -} - class ScopedShowWindow; class WindowOverview; class WindowSelectorDelegate; class WindowSelectorItem; +class WindowSelectorTest; // The WindowSelector allows selecting a window by alt-tabbing (CYCLE mode) or // by clicking or tapping on it (OVERVIEW mode). A WindowOverview will be shown @@ -87,7 +83,7 @@ class ASH_EXPORT WindowSelector aura::Window* actual_active) OVERRIDE; private: - friend class internal::WindowSelectorTest; + friend class WindowSelectorTest; // Begins positioning windows such that all windows are visible on the screen. void StartOverview(); diff --git a/ash/wm/overview/window_selector_controller.h b/ash/wm/overview/window_selector_controller.h index 2bd9697..18104f8 100644 --- a/ash/wm/overview/window_selector_controller.h +++ b/ash/wm/overview/window_selector_controller.h @@ -21,12 +21,8 @@ class Window; } namespace ash { - -namespace internal { -class WindowSelectorTest; -} - class WindowSelector; +class WindowSelectorTest; // Manages a window selector which displays an overview of all windows and // allows selecting a window to activate it. @@ -58,7 +54,7 @@ class ASH_EXPORT WindowSelectorController virtual void OnSelectionCanceled() OVERRIDE; private: - friend class internal::WindowSelectorTest; + friend class WindowSelectorTest; // Dispatched when window selection begins. void OnSelectionStarted(); diff --git a/ash/wm/overview/window_selector_panels.cc b/ash/wm/overview/window_selector_panels.cc index 37d6687..bd165b2 100644 --- a/ash/wm/overview/window_selector_panels.cc +++ b/ash/wm/overview/window_selector_panels.cc @@ -62,10 +62,9 @@ void ScopedTransformPanelWindow::PrepareForOverview() { } views::Widget* ScopedTransformPanelWindow::GetCalloutWidget() { - DCHECK(window()->parent()->id() == internal::kShellWindowId_PanelContainer); - internal::PanelLayoutManager* panel_layout_manager = - static_cast<internal::PanelLayoutManager*>( - window()->parent()->layout_manager()); + DCHECK(window()->parent()->id() == kShellWindowId_PanelContainer); + PanelLayoutManager* panel_layout_manager = + static_cast<PanelLayoutManager*>(window()->parent()->layout_manager()); return panel_layout_manager->GetCalloutWidgetForPanel(window()); } diff --git a/ash/wm/overview/window_selector_unittest.cc b/ash/wm/overview/window_selector_unittest.cc index f78bcbf..20184aa 100644 --- a/ash/wm/overview/window_selector_unittest.cc +++ b/ash/wm/overview/window_selector_unittest.cc @@ -39,8 +39,6 @@ #include "ui/wm/public/activation_delegate.h" namespace ash { -namespace internal { - namespace { class NonActivatableActivationDelegate @@ -1038,7 +1036,7 @@ TEST_F(WindowSelectorTest, DISABLED_DragDropInProgress) { gfx::Rect bounds(0, 0, 400, 400); scoped_ptr<aura::Window> window(CreateWindow(bounds)); test::ShellTestApi shell_test_api(Shell::GetInstance()); - ash::internal::DragDropController* drag_drop_controller = + ash::DragDropController* drag_drop_controller = shell_test_api.drag_drop_controller(); ui::OSExchangeData data; base::MessageLoopForUI::current()->PostTask(FROM_HERE, @@ -1089,5 +1087,4 @@ TEST_F(WindowSelectorTest, HitTestingInOverview) { } } -} // namespace internal } // namespace ash diff --git a/ash/wm/overview/window_selector_window.cc b/ash/wm/overview/window_selector_window.cc index 40b53d4..942edf4 100644 --- a/ash/wm/overview/window_selector_window.cc +++ b/ash/wm/overview/window_selector_window.cc @@ -28,8 +28,8 @@ views::Widget* CreateCloseWindowButton(aura::Window* root_window, params.can_activate = false; params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; - params.parent = Shell::GetContainer(root_window, - ash::internal::kShellWindowId_OverlayContainer); + params.parent = + Shell::GetContainer(root_window, ash::kShellWindowId_OverlayContainer); widget->set_focus_on_creation(false); widget->Init(params); views::ImageButton* button = new views::ImageButton(listener); diff --git a/ash/wm/panels/panel_layout_manager.cc b/ash/wm/panels/panel_layout_manager.cc index 95db257..9266f94 100644 --- a/ash/wm/panels/panel_layout_manager.cc +++ b/ash/wm/panels/panel_layout_manager.cc @@ -37,9 +37,8 @@ #include "ui/wm/public/activation_client.h" namespace ash { -namespace internal { - namespace { + const int kPanelIdealSpacing = 4; const float kMaxHeightFactor = .80f; @@ -310,7 +309,7 @@ void PanelLayoutManager::SetShelf(Shelf* shelf) { shelf_ = shelf; shelf_->AddIconObserver(this); if (shelf_->shelf_widget()) { - shelf_layout_manager_ = ash::internal::ShelfLayoutManager::ForShelf( + shelf_layout_manager_ = ash::ShelfLayoutManager::ForShelf( shelf_->shelf_widget()->GetNativeWindow()); WillChangeVisibilityState(shelf_layout_manager_->visibility_state()); shelf_layout_manager_->AddObserver(this); @@ -885,5 +884,4 @@ void PanelLayoutManager::OnKeyboardBoundsChanging( OnWindowResized(); } -} // namespace internal } // namespace ash diff --git a/ash/wm/panels/panel_layout_manager.h b/ash/wm/panels/panel_layout_manager.h index 2d17b2d..f0c093d 100644 --- a/ash/wm/panels/panel_layout_manager.h +++ b/ash/wm/panels/panel_layout_manager.h @@ -36,10 +36,8 @@ class Widget; } namespace ash { -class Shelf; - -namespace internal { class PanelCalloutWidget; +class Shelf; class ShelfLayoutManager; // PanelLayoutManager is responsible for organizing panels within the @@ -186,7 +184,6 @@ class ASH_EXPORT PanelLayoutManager DISALLOW_COPY_AND_ASSIGN(PanelLayoutManager); }; -} // namespace internal } // namespace ash #endif // ASH_WM_PANELS_PANEL_LAYOUT_MANAGER_H_ diff --git a/ash/wm/panels/panel_layout_manager_unittest.cc b/ash/wm/panels/panel_layout_manager_unittest.cc index faba4f7..853f648 100644 --- a/ash/wm/panels/panel_layout_manager_unittest.cc +++ b/ash/wm/panels/panel_layout_manager_unittest.cc @@ -38,7 +38,6 @@ #include "ui/views/widget/widget.h" namespace ash { -namespace internal { using aura::test::WindowIsAbove; @@ -75,7 +74,7 @@ class PanelLayoutManagerTest : public test::AshTestBase { aura::Window* GetPanelContainer(aura::Window* panel) { return Shell::GetContainer(panel->GetRootWindow(), - internal::kShellWindowId_PanelContainer); + kShellWindowId_PanelContainer); } views::Widget* GetCalloutWidgetForPanel(aura::Window* panel) { @@ -238,9 +237,9 @@ class PanelLayoutManagerTest : public test::AshTestBase { void SetShelfAutoHideBehavior(aura::Window* window, ShelfAutoHideBehavior behavior) { - internal::ShelfLayoutManager* shelf = - RootWindowController::ForWindow(window)->shelf()-> - shelf_layout_manager(); + ShelfLayoutManager* shelf = RootWindowController::ForWindow(window) + ->shelf() + ->shelf_layout_manager(); shelf->SetAutoHideBehavior(behavior); ShelfView* shelf_view = GetShelfView(Shelf::ForWindow(window)); test::ShelfViewTestAPI test_api(shelf_view); @@ -249,13 +248,13 @@ class PanelLayoutManagerTest : public test::AshTestBase { void SetShelfVisibilityState(aura::Window* window, ShelfVisibilityState visibility_state) { - internal::ShelfLayoutManager* shelf = - RootWindowController::ForWindow(window)->shelf()-> - shelf_layout_manager(); + ShelfLayoutManager* shelf = RootWindowController::ForWindow(window) + ->shelf() + ->shelf_layout_manager(); shelf->SetState(visibility_state); } - internal::ShelfView* GetShelfView(Shelf* shelf) { + ShelfView* GetShelfView(Shelf* shelf) { return test::ShelfTestAPI(shelf).shelf_view(); } @@ -609,10 +608,10 @@ TEST_F(PanelLayoutManagerTest, PanelMoveBetweenMultipleDisplays) { EXPECT_EQ(root_windows[1], p1_d2->GetRootWindow()); EXPECT_EQ(root_windows[1], p2_d2->GetRootWindow()); - EXPECT_EQ(internal::kShellWindowId_PanelContainer, p1_d1->parent()->id()); - EXPECT_EQ(internal::kShellWindowId_PanelContainer, p2_d1->parent()->id()); - EXPECT_EQ(internal::kShellWindowId_PanelContainer, p1_d2->parent()->id()); - EXPECT_EQ(internal::kShellWindowId_PanelContainer, p2_d2->parent()->id()); + EXPECT_EQ(kShellWindowId_PanelContainer, p1_d1->parent()->id()); + EXPECT_EQ(kShellWindowId_PanelContainer, p2_d1->parent()->id()); + EXPECT_EQ(kShellWindowId_PanelContainer, p1_d2->parent()->id()); + EXPECT_EQ(kShellWindowId_PanelContainer, p2_d2->parent()->id()); // Test a panel on 1st display. // Clicking on the same display has no effect. @@ -788,5 +787,4 @@ TEST_F(PanelLayoutManagerTest, PanelsHideAndRestoreWithShelf) { INSTANTIATE_TEST_CASE_P(LtrRtl, PanelLayoutManagerTextDirectionTest, testing::Bool()); -} // namespace internal } // namespace ash diff --git a/ash/wm/panels/panel_window_event_handler.cc b/ash/wm/panels/panel_window_event_handler.cc index a3d5d8b..006c5d8 100644 --- a/ash/wm/panels/panel_window_event_handler.cc +++ b/ash/wm/panels/panel_window_event_handler.cc @@ -13,7 +13,6 @@ #include "ui/events/event.h" namespace ash { -namespace internal { PanelWindowEventHandler::PanelWindowEventHandler() { } @@ -52,5 +51,4 @@ void PanelWindowEventHandler::OnGestureEvent(ui::GestureEvent* event) { } } -} // namespace internal } // namespace ash diff --git a/ash/wm/panels/panel_window_event_handler.h b/ash/wm/panels/panel_window_event_handler.h index c972ed1..35e63aa 100644 --- a/ash/wm/panels/panel_window_event_handler.h +++ b/ash/wm/panels/panel_window_event_handler.h @@ -8,7 +8,6 @@ #include "ui/events/event_handler.h" namespace ash { -namespace internal { // PanelWindowEventHandler minimizes panels when the user double clicks or // double taps on the panel header. @@ -25,7 +24,6 @@ class PanelWindowEventHandler : public ui::EventHandler { DISALLOW_COPY_AND_ASSIGN(PanelWindowEventHandler); }; -} // namespace internal } // namespace ash #endif // ASH_WM_PANELS_PANEL_WINDOW_EVENT_HANDLER_H_ diff --git a/ash/wm/panels/panel_window_resizer.cc b/ash/wm/panels/panel_window_resizer.cc index 29803e8..14632b6 100644 --- a/ash/wm/panels/panel_window_resizer.cc +++ b/ash/wm/panels/panel_window_resizer.cc @@ -32,11 +32,9 @@ namespace ash { namespace { const int kPanelSnapToLauncherDistance = 30; -internal::PanelLayoutManager* GetPanelLayoutManager( - aura::Window* panel_container) { - DCHECK(panel_container->id() == internal::kShellWindowId_PanelContainer); - return static_cast<internal::PanelLayoutManager*>( - panel_container->layout_manager()); +PanelLayoutManager* GetPanelLayoutManager(aura::Window* panel_container) { + DCHECK(panel_container->id() == kShellWindowId_PanelContainer); + return static_cast<PanelLayoutManager*>(panel_container->layout_manager()); } } // namespace @@ -74,8 +72,8 @@ void PanelWindowResizer::Drag(const gfx::Point& location, int event_flags) { GetPanelLayoutManager(panel_container_)->FinishDragging(); aura::Window* dst_root = Shell::GetInstance()->display_controller()-> GetRootWindowForDisplayId(dst_display.id()); - panel_container_ = Shell::GetContainer( - dst_root, internal::kShellWindowId_PanelContainer); + panel_container_ = + Shell::GetContainer(dst_root, kShellWindowId_PanelContainer); // The panel's parent already knows that the drag is in progress for this // panel. @@ -124,9 +122,8 @@ PanelWindowResizer::PanelWindowResizer(WindowResizer* next_window_resizer, was_attached_(window_state->panel_attached()), weak_ptr_factory_(this) { DCHECK(details().is_resizable); - panel_container_ = Shell::GetContainer( - GetTarget()->GetRootWindow(), - internal::kShellWindowId_PanelContainer); + panel_container_ = Shell::GetContainer(GetTarget()->GetRootWindow(), + kShellWindowId_PanelContainer); initial_panel_container_ = panel_container_; } @@ -134,7 +131,7 @@ bool PanelWindowResizer::AttachToLauncher(const gfx::Rect& bounds, gfx::Point* offset) { bool should_attach = false; if (panel_container_) { - internal::PanelLayoutManager* panel_layout_manager = + PanelLayoutManager* panel_layout_manager = GetPanelLayoutManager(panel_container_); gfx::Rect launcher_bounds = ScreenUtil::ConvertRectFromScreen( GetTarget()->parent(), diff --git a/ash/wm/panels/panel_window_resizer_unittest.cc b/ash/wm/panels/panel_window_resizer_unittest.cc index 4debaed..07bb7a5 100644 --- a/ash/wm/panels/panel_window_resizer_unittest.cc +++ b/ash/wm/panels/panel_window_resizer_unittest.cc @@ -31,7 +31,6 @@ #include "ui/wm/core/window_util.h" namespace ash { -namespace internal { class PanelWindowResizerTest : public test::AshTestBase { public: @@ -65,11 +64,9 @@ class PanelWindowResizerTest : public test::AshTestBase { aura::Window* window = CreateTestWindowInShellWithDelegateAndType( NULL, ui::wm::WINDOW_TYPE_PANEL, 0, bounds); shelf_delegate_->AddShelfItem(window); - PanelLayoutManager* manager = - static_cast<PanelLayoutManager*>( - Shell::GetContainer(window->GetRootWindow(), - internal::kShellWindowId_PanelContainer)-> - layout_manager()); + PanelLayoutManager* manager = static_cast<PanelLayoutManager*>( + Shell::GetContainer(window->GetRootWindow(), + kShellWindowId_PanelContainer)->layout_manager()); manager->Relayout(); return window; } @@ -103,7 +100,7 @@ class PanelWindowResizerTest : public test::AshTestBase { wm::WindowState* window_state = wm::GetWindowState(window); EXPECT_TRUE(window_state->panel_attached()); aura::Window* root_window = window->GetRootWindow(); - EXPECT_EQ(internal::kShellWindowId_PanelContainer, window->parent()->id()); + EXPECT_EQ(kShellWindowId_PanelContainer, window->parent()->id()); DragStart(window); gfx::Rect initial_bounds = window->GetBoundsInScreen(); @@ -122,8 +119,7 @@ class PanelWindowResizerTest : public test::AshTestBase { DragEnd(); EXPECT_FALSE(window_state->panel_attached()); - EXPECT_EQ(internal::kShellWindowId_DefaultContainer, - window->parent()->id()); + EXPECT_EQ(kShellWindowId_DefaultContainer, window->parent()->id()); EXPECT_EQ(root_window, window->GetRootWindow()); DragStart(window); @@ -136,7 +132,7 @@ class PanelWindowResizerTest : public test::AshTestBase { EXPECT_TRUE(window_state->panel_attached()); EXPECT_EQ(initial_bounds.x(), window->GetBoundsInScreen().x()); EXPECT_EQ(initial_bounds.y(), window->GetBoundsInScreen().y()); - EXPECT_EQ(internal::kShellWindowId_PanelContainer, window->parent()->id()); + EXPECT_EQ(kShellWindowId_PanelContainer, window->parent()->id()); } void TestWindowOrder(const std::vector<aura::Window*>& window_order) { @@ -185,7 +181,7 @@ class PanelWindowResizerTest : public test::AshTestBase { private: scoped_ptr<WindowResizer> resizer_; - internal::PanelLayoutManager* panel_layout_manager_; + PanelLayoutManager* panel_layout_manager_; ShelfModel* model_; test::TestShelfDelegate* shelf_delegate_; @@ -310,7 +306,7 @@ TEST_F(PanelWindowResizerTest, DetachThenDragAcrossDisplays) { EXPECT_EQ(initial_bounds.x(), window->GetBoundsInScreen().x()); EXPECT_EQ(initial_bounds.y() - 100, window->GetBoundsInScreen().y()); EXPECT_FALSE(wm::GetWindowState(window.get())->panel_attached()); - EXPECT_EQ(internal::kShellWindowId_DefaultContainer, window->parent()->id()); + EXPECT_EQ(kShellWindowId_DefaultContainer, window->parent()->id()); DragStart(window.get()); DragMove(500, 0); @@ -319,7 +315,7 @@ TEST_F(PanelWindowResizerTest, DetachThenDragAcrossDisplays) { EXPECT_EQ(initial_bounds.x() + 500, window->GetBoundsInScreen().x()); EXPECT_EQ(initial_bounds.y() - 100, window->GetBoundsInScreen().y()); EXPECT_FALSE(wm::GetWindowState(window.get())->panel_attached()); - EXPECT_EQ(internal::kShellWindowId_DefaultContainer, window->parent()->id()); + EXPECT_EQ(kShellWindowId_DefaultContainer, window->parent()->id()); } TEST_F(PanelWindowResizerTest, DetachAcrossDisplays) { @@ -339,7 +335,7 @@ TEST_F(PanelWindowResizerTest, DetachAcrossDisplays) { EXPECT_EQ(initial_bounds.x() + 500, window->GetBoundsInScreen().x()); EXPECT_EQ(initial_bounds.y() - 100, window->GetBoundsInScreen().y()); EXPECT_FALSE(wm::GetWindowState(window.get())->panel_attached()); - EXPECT_EQ(internal::kShellWindowId_DefaultContainer, window->parent()->id()); + EXPECT_EQ(kShellWindowId_DefaultContainer, window->parent()->id()); } TEST_F(PanelWindowResizerTest, DetachThenAttachToSecondDisplay) { @@ -372,7 +368,7 @@ TEST_F(PanelWindowResizerTest, DetachThenAttachToSecondDisplay) { // When dropped should move to second display's panel container. EXPECT_EQ(root_windows[1], window->GetRootWindow()); EXPECT_TRUE(wm::GetWindowState(window.get())->panel_attached()); - EXPECT_EQ(internal::kShellWindowId_PanelContainer, window->parent()->id()); + EXPECT_EQ(kShellWindowId_PanelContainer, window->parent()->id()); } TEST_F(PanelWindowResizerTest, AttachToSecondDisplay) { @@ -398,7 +394,7 @@ TEST_F(PanelWindowResizerTest, AttachToSecondDisplay) { // When dropped should move to second display's panel container. EXPECT_EQ(root_windows[1], window->GetRootWindow()); EXPECT_TRUE(wm::GetWindowState(window.get())->panel_attached()); - EXPECT_EQ(internal::kShellWindowId_PanelContainer, window->parent()->id()); + EXPECT_EQ(kShellWindowId_PanelContainer, window->parent()->id()); } TEST_F(PanelWindowResizerTest, AttachToSecondFullscreenDisplay) { @@ -431,7 +427,7 @@ TEST_F(PanelWindowResizerTest, AttachToSecondFullscreenDisplay) { // When dropped should move to second display's panel container. EXPECT_EQ(root_windows[1], window->GetRootWindow()); EXPECT_TRUE(wm::GetWindowState(window.get())->panel_attached()); - EXPECT_EQ(internal::kShellWindowId_PanelContainer, window->parent()->id()); + EXPECT_EQ(kShellWindowId_PanelContainer, window->parent()->id()); EXPECT_TRUE(window->IsVisible()); EXPECT_TRUE(wm::GetWindowState(window.get())->IsActive()); EXPECT_EQ(initial_bounds.y() + 200, window->GetBoundsInScreen().y()); @@ -441,19 +437,19 @@ TEST_F(PanelWindowResizerTest, RevertDragRestoresAttachment) { scoped_ptr<aura::Window> window( CreatePanelWindow(gfx::Point(0, 0))); EXPECT_TRUE(wm::GetWindowState(window.get())->panel_attached()); - EXPECT_EQ(internal::kShellWindowId_PanelContainer, window->parent()->id()); + EXPECT_EQ(kShellWindowId_PanelContainer, window->parent()->id()); DragStart(window.get()); DragMove(0, -100); DragRevert(); EXPECT_TRUE(wm::GetWindowState(window.get())->panel_attached()); - EXPECT_EQ(internal::kShellWindowId_PanelContainer, window->parent()->id()); + EXPECT_EQ(kShellWindowId_PanelContainer, window->parent()->id()); // Detach panel. DragStart(window.get()); DragMove(0, -100); DragEnd(); EXPECT_FALSE(wm::GetWindowState(window.get())->panel_attached()); - EXPECT_EQ(internal::kShellWindowId_DefaultContainer, window->parent()->id()); + EXPECT_EQ(kShellWindowId_DefaultContainer, window->parent()->id()); // Drag back to launcher. DragStart(window.get()); @@ -462,7 +458,7 @@ TEST_F(PanelWindowResizerTest, RevertDragRestoresAttachment) { // When the drag is reverted it should remain detached. DragRevert(); EXPECT_FALSE(wm::GetWindowState(window.get())->panel_attached()); - EXPECT_EQ(internal::kShellWindowId_DefaultContainer, window->parent()->id()); + EXPECT_EQ(kShellWindowId_DefaultContainer, window->parent()->id()); } TEST_F(PanelWindowResizerTest, DragMovesToPanelLayer) { @@ -470,17 +466,16 @@ TEST_F(PanelWindowResizerTest, DragMovesToPanelLayer) { DragStart(window.get()); DragMove(0, -100); DragEnd(); - EXPECT_EQ(internal::kShellWindowId_DefaultContainer, window->parent()->id()); + EXPECT_EQ(kShellWindowId_DefaultContainer, window->parent()->id()); // While moving the panel window should be moved to the panel container. DragStart(window.get()); DragMove(20, 0); - EXPECT_EQ(internal::kShellWindowId_PanelContainer, window->parent()->id()); + EXPECT_EQ(kShellWindowId_PanelContainer, window->parent()->id()); DragEnd(); // When dropped it should return to the default container. - EXPECT_EQ(internal::kShellWindowId_DefaultContainer, - window->parent()->id()); + EXPECT_EQ(kShellWindowId_DefaultContainer, window->parent()->id()); } TEST_P(PanelWindowResizerTextDirectionTest, DragReordersPanelsHorizontal) { @@ -520,7 +515,7 @@ TEST_P(PanelWindowResizerTransientTest, PanelWithTransientChild) { DragStart(child.get()); DragMove(50, dy); // While moving the transient child window should be in the panel container. - EXPECT_EQ(internal::kShellWindowId_PanelContainer, child->parent()->id()); + EXPECT_EQ(kShellWindowId_PanelContainer, child->parent()->id()); DragEnd(); // Child should move, |window| should not. EXPECT_EQ(gfx::Point(20 + 50, 20 + dy).ToString(), @@ -532,7 +527,7 @@ TEST_P(PanelWindowResizerTransientTest, PanelWithTransientChild) { DragStart(child.get()); DragMove(350, 0); // While moving the transient child window should be in the panel container. - EXPECT_EQ(internal::kShellWindowId_PanelContainer, child->parent()->id()); + EXPECT_EQ(kShellWindowId_PanelContainer, child->parent()->id()); DragEnd(); // |child| should move, |window| should not. EXPECT_EQ(gfx::Point(20 + 50 + 350, 20 + dy).ToString(), @@ -542,23 +537,23 @@ TEST_P(PanelWindowResizerTransientTest, PanelWithTransientChild) { DragStart(window.get()); DragMove(0, -100); // While moving the windows should be in the panel container. - EXPECT_EQ(internal::kShellWindowId_PanelContainer, window->parent()->id()); - EXPECT_EQ(internal::kShellWindowId_PanelContainer, child->parent()->id()); + EXPECT_EQ(kShellWindowId_PanelContainer, window->parent()->id()); + EXPECT_EQ(kShellWindowId_PanelContainer, child->parent()->id()); DragEnd(); // When dropped they should return to the default container. - EXPECT_EQ(internal::kShellWindowId_DefaultContainer, window->parent()->id()); - EXPECT_EQ(internal::kShellWindowId_DefaultContainer, child->parent()->id()); + EXPECT_EQ(kShellWindowId_DefaultContainer, window->parent()->id()); + EXPECT_EQ(kShellWindowId_DefaultContainer, child->parent()->id()); // While moving the window and child should be moved to the panel container. DragStart(window.get()); DragMove(20, 0); - EXPECT_EQ(internal::kShellWindowId_PanelContainer, window->parent()->id()); - EXPECT_EQ(internal::kShellWindowId_PanelContainer, child->parent()->id()); + EXPECT_EQ(kShellWindowId_PanelContainer, window->parent()->id()); + EXPECT_EQ(kShellWindowId_PanelContainer, child->parent()->id()); DragEnd(); // When dropped they should return to the default container. - EXPECT_EQ(internal::kShellWindowId_DefaultContainer, window->parent()->id()); - EXPECT_EQ(internal::kShellWindowId_DefaultContainer, child->parent()->id()); + EXPECT_EQ(kShellWindowId_DefaultContainer, window->parent()->id()); + EXPECT_EQ(kShellWindowId_DefaultContainer, child->parent()->id()); } INSTANTIATE_TEST_CASE_P(LtrRtl, PanelWindowResizerTextDirectionTest, @@ -569,5 +564,4 @@ INSTANTIATE_TEST_CASE_P(NormalPanelPopup, ui::wm::WINDOW_TYPE_PANEL, ui::wm::WINDOW_TYPE_POPUP)); -} // namespace internal } // namespace ash diff --git a/ash/wm/partial_screenshot_view.cc b/ash/wm/partial_screenshot_view.cc index 30b12f1..cec063d 100644 --- a/ash/wm/partial_screenshot_view.cc +++ b/ash/wm/partial_screenshot_view.cc @@ -26,7 +26,7 @@ namespace ash { // A self-owned object to handle the cancel and the finish of current partial // screenshot session. class PartialScreenshotView::OverlayDelegate - : public internal::OverlayEventFilter::Delegate, + : public OverlayEventFilter::Delegate, public views::WidgetObserver { public: OverlayDelegate() { @@ -42,10 +42,10 @@ class PartialScreenshotView::OverlayDelegate virtual void Cancel() OVERRIDE { // Make sure the mouse_warp_mode allows warping. It can be stopped by a // partial screenshot view. - internal::MouseCursorEventFilter* mouse_cursor_filter = + MouseCursorEventFilter* mouse_cursor_filter = Shell::GetInstance()->mouse_cursor_filter(); mouse_cursor_filter->set_mouse_warp_mode( - internal::MouseCursorEventFilter::WARP_ALWAYS); + MouseCursorEventFilter::WARP_ALWAYS); for (size_t i = 0; i < widgets_.size(); ++i) widgets_[i]->Close(); } @@ -116,9 +116,8 @@ void PartialScreenshotView::Init(aura::Window* root_window) { params.delegate = this; // The partial screenshot rectangle has to be at the real top of // the screen. - params.parent = Shell::GetContainer( - root_window, - internal::kShellWindowId_OverlayContainer); + params.parent = + Shell::GetContainer(root_window, kShellWindowId_OverlayContainer); widget->Init(params); widget->SetContentsView(this); @@ -194,10 +193,9 @@ bool PartialScreenshotView::OnMousePressed(const ui::MouseEvent& event) { // Prevent moving across displays during drag. Capturing a screenshot across // the displays is not supported yet. // TODO(mukai): remove this restriction. - internal::MouseCursorEventFilter* mouse_cursor_filter = + MouseCursorEventFilter* mouse_cursor_filter = Shell::GetInstance()->mouse_cursor_filter(); - mouse_cursor_filter->set_mouse_warp_mode( - internal::MouseCursorEventFilter::WARP_NONE); + mouse_cursor_filter->set_mouse_warp_mode(MouseCursorEventFilter::WARP_NONE); OnSelectionStarted(event.location()); return true; } diff --git a/ash/wm/resize_shadow.cc b/ash/wm/resize_shadow.cc index 65f6623..408db4b 100644 --- a/ash/wm/resize_shadow.cc +++ b/ash/wm/resize_shadow.cc @@ -40,7 +40,6 @@ void ShowLayer(ui::Layer* layer, bool visible) { } // namespace namespace ash { -namespace internal { ResizeShadow::ResizeShadow() : last_hit_test_(HTNOWHERE) {} @@ -106,5 +105,4 @@ void ResizeShadow::Layout(const gfx::Rect& content_bounds) { image_grid_->SetContentBounds(local_bounds); } -} // namespace internal } // namespace ash diff --git a/ash/wm/resize_shadow.h b/ash/wm/resize_shadow.h index 8b05d92..6add50f 100644 --- a/ash/wm/resize_shadow.h +++ b/ash/wm/resize_shadow.h @@ -22,7 +22,6 @@ class ImageGrid; } namespace ash { -namespace internal { // A class to render the resize edge effect when the user moves their mouse // over a sizing edge. This is just a visual effect; the actual resize is @@ -60,7 +59,6 @@ class ResizeShadow { DISALLOW_COPY_AND_ASSIGN(ResizeShadow); }; -} // namespace internal } // namespace ash #endif // ASH_WM_RESIZE_SHADOW_H_ diff --git a/ash/wm/resize_shadow_and_cursor_unittest.cc b/ash/wm/resize_shadow_and_cursor_unittest.cc index 6431409..0503a82 100644 --- a/ash/wm/resize_shadow_and_cursor_unittest.cc +++ b/ash/wm/resize_shadow_and_cursor_unittest.cc @@ -74,9 +74,9 @@ class ResizeShadowAndCursorTest : public AshTestBase { // Returns the hit test code if there is a resize shadow. Returns HTNOWHERE if // there is no resize shadow. int ResizeShadowHitTest() const { - ash::internal::ResizeShadow* resize_shadow = - ash::Shell::GetInstance()->resize_shadow_controller()-> - GetShadowForWindowForTest(window_); + ash::ResizeShadow* resize_shadow = ash::Shell::GetInstance() + ->resize_shadow_controller() + ->GetShadowForWindowForTest(window_); return resize_shadow ? resize_shadow->GetLastHitTestForTest() : HTNOWHERE; } diff --git a/ash/wm/resize_shadow_controller.cc b/ash/wm/resize_shadow_controller.cc index 85778d3..e5ed6c3 100644 --- a/ash/wm/resize_shadow_controller.cc +++ b/ash/wm/resize_shadow_controller.cc @@ -10,7 +10,6 @@ #include "ui/aura/window.h" namespace ash { -namespace internal { ResizeShadowController::ResizeShadowController() { } @@ -70,5 +69,4 @@ ResizeShadow* ResizeShadowController::GetShadowForWindow(aura::Window* window) { return it != window_shadows_.end() ? it->second.get() : NULL; } -} // namespace internal } // namespace ash diff --git a/ash/wm/resize_shadow_controller.h b/ash/wm/resize_shadow_controller.h index 1eccf4c..2bd3f12 100644 --- a/ash/wm/resize_shadow_controller.h +++ b/ash/wm/resize_shadow_controller.h @@ -18,8 +18,6 @@ class Window; } namespace ash { -namespace internal { - class ResizeShadow; // ResizeShadowController observes changes to resizable windows and shows @@ -59,7 +57,6 @@ class ASH_EXPORT ResizeShadowController : public aura::WindowObserver { DISALLOW_COPY_AND_ASSIGN(ResizeShadowController); }; -} // namespace internal } // namespace ash #endif // ASH_WM_RESIZE_SHADOW_CONTROLLER_H_ diff --git a/ash/wm/root_window_layout_manager.cc b/ash/wm/root_window_layout_manager.cc index 2f7efda..282dbed 100644 --- a/ash/wm/root_window_layout_manager.cc +++ b/ash/wm/root_window_layout_manager.cc @@ -12,7 +12,6 @@ #include "ui/views/widget/widget.h" namespace ash { -namespace internal { //////////////////////////////////////////////////////////////////////////////// // RootWindowLayoutManager, public: @@ -79,5 +78,4 @@ void RootWindowLayoutManager::SetChildBounds( SetChildBoundsDirect(child, requested_bounds); } -} // namespace internal } // namespace ash diff --git a/ash/wm/root_window_layout_manager.h b/ash/wm/root_window_layout_manager.h index 708e306..d9fd297 100644 --- a/ash/wm/root_window_layout_manager.h +++ b/ash/wm/root_window_layout_manager.h @@ -25,7 +25,6 @@ class Widget; } namespace ash { -namespace internal { // A layout manager for the root window. // Resizes all of its immediate children to fill the bounds of the root window. @@ -50,7 +49,6 @@ class RootWindowLayoutManager : public aura::LayoutManager { DISALLOW_COPY_AND_ASSIGN(RootWindowLayoutManager); }; -} // namespace internal } // namespace ash #endif // ASH_WM_ROOT_WINDOW_LAYOUT_MANAGER_H_ diff --git a/ash/wm/screen_dimmer.cc b/ash/wm/screen_dimmer.cc index 4b4335e..b570c2d 100644 --- a/ash/wm/screen_dimmer.cc +++ b/ash/wm/screen_dimmer.cc @@ -13,8 +13,6 @@ #include "ui/gfx/size.h" namespace ash { -namespace internal { - namespace { // Opacity for |dimming_layer_| when it's dimming the screen. @@ -65,5 +63,4 @@ void ScreenDimmer::OnWindowBoundsChanged(aura::Window* root, dimming_layer_->SetBounds(gfx::Rect(root->bounds().size())); } -} // namespace internal } // namespace ash diff --git a/ash/wm/screen_dimmer.h b/ash/wm/screen_dimmer.h index abbb0a5..1d6e205 100644 --- a/ash/wm/screen_dimmer.h +++ b/ash/wm/screen_dimmer.h @@ -16,7 +16,6 @@ class Layer; } namespace ash { -namespace internal { // ScreenDimmer displays a partially-opaque layer above everything // else in the root window to darken the display. It shouldn't be used @@ -65,7 +64,6 @@ class ASH_EXPORT ScreenDimmer : public aura::WindowObserver { DISALLOW_COPY_AND_ASSIGN(ScreenDimmer); }; -} // namespace internal } // namespace ash #endif // ASH_WM_SCREEN_DIMMER_H_ diff --git a/ash/wm/screen_dimmer_unittest.cc b/ash/wm/screen_dimmer_unittest.cc index c339a9a..2ea4e96 100644 --- a/ash/wm/screen_dimmer_unittest.cc +++ b/ash/wm/screen_dimmer_unittest.cc @@ -23,13 +23,13 @@ class ScreenDimmerTest : public AshTestBase { virtual void SetUp() OVERRIDE { AshTestBase::SetUp(); dimmer_ = Shell::GetPrimaryRootWindowController()->screen_dimmer(); - test_api_.reset(new internal::ScreenDimmer::TestApi(dimmer_)); + test_api_.reset(new ScreenDimmer::TestApi(dimmer_)); } protected: - internal::ScreenDimmer* dimmer_; // not owned + ScreenDimmer* dimmer_; // not owned - scoped_ptr<internal::ScreenDimmer::TestApi> test_api_; + scoped_ptr<ScreenDimmer::TestApi> test_api_; private: DISALLOW_COPY_AND_ASSIGN(ScreenDimmerTest); diff --git a/ash/wm/session_state_animator.cc b/ash/wm/session_state_animator.cc index 586539c..9900275 100644 --- a/ash/wm/session_state_animator.cc +++ b/ash/wm/session_state_animator.cc @@ -15,8 +15,6 @@ #include "ui/views/widget/widget.h" namespace ash { -namespace internal { - namespace { // Slightly-smaller size that we scale the screen down to for the pre-lock and @@ -460,44 +458,38 @@ void SessionStateAnimator::GetContainers(int container_mask, if (container_mask & DESKTOP_BACKGROUND) { containers->push_back(Shell::GetContainer( - root_window, - internal::kShellWindowId_DesktopBackgroundContainer)); + root_window, kShellWindowId_DesktopBackgroundContainer)); } if (container_mask & LAUNCHER) { - containers->push_back(Shell::GetContainer( - root_window, - internal::kShellWindowId_ShelfContainer)); + containers->push_back( + Shell::GetContainer(root_window, kShellWindowId_ShelfContainer)); } if (container_mask & NON_LOCK_SCREEN_CONTAINERS) { // TODO(antrim): Figure out a way to eliminate a need to exclude launcher // in such way. aura::Window* non_lock_screen_containers = Shell::GetContainer( - root_window, - internal::kShellWindowId_NonLockScreenContainersContainer); + root_window, kShellWindowId_NonLockScreenContainersContainer); aura::Window::Windows children = non_lock_screen_containers->children(); for (aura::Window::Windows::const_iterator it = children.begin(); it != children.end(); ++it) { aura::Window* window = *it; - if (window->id() == internal::kShellWindowId_ShelfContainer) + if (window->id() == kShellWindowId_ShelfContainer) continue; containers->push_back(window); } } if (container_mask & LOCK_SCREEN_BACKGROUND) { containers->push_back(Shell::GetContainer( - root_window, - internal::kShellWindowId_LockScreenBackgroundContainer)); + root_window, kShellWindowId_LockScreenBackgroundContainer)); } if (container_mask & LOCK_SCREEN_CONTAINERS) { containers->push_back(Shell::GetContainer( - root_window, - internal::kShellWindowId_LockScreenContainersContainer)); + root_window, kShellWindowId_LockScreenContainersContainer)); } if (container_mask & LOCK_SCREEN_RELATED_CONTAINERS) { containers->push_back(Shell::GetContainer( - root_window, - internal::kShellWindowId_LockScreenRelatedContainersContainer)); + root_window, kShellWindowId_LockScreenRelatedContainersContainer)); } } @@ -613,5 +605,4 @@ void SessionStateAnimator::RunAnimationForWindow( } } -} // namespace internal } // namespace ash diff --git a/ash/wm/session_state_animator.h b/ash/wm/session_state_animator.h index 4cb183e..a9e43db4 100644 --- a/ash/wm/session_state_animator.h +++ b/ash/wm/session_state_animator.h @@ -22,7 +22,6 @@ class Layer; } namespace ash { -namespace internal { // Displays onscreen animations for session state changes (lock/unlock, sign // out, shut down). @@ -174,7 +173,6 @@ class ASH_EXPORT SessionStateAnimator { DISALLOW_COPY_AND_ASSIGN(SessionStateAnimator); }; -} // namespace internal } // namespace ash #endif // ASH_WM_SESSION_STATE_ANIMATOR_H_ diff --git a/ash/wm/stacking_controller.cc b/ash/wm/stacking_controller.cc index 62263d4..18eccce 100644 --- a/ash/wm/stacking_controller.cc +++ b/ash/wm/stacking_controller.cc @@ -44,10 +44,8 @@ bool HasTransientParentWindow(const aura::Window* window) { ui::wm::WINDOW_TYPE_UNKNOWN; } -internal::AlwaysOnTopController* -GetAlwaysOnTopController(aura::Window* root_window) { - return internal::GetRootWindowController(root_window)-> - always_on_top_controller(); +AlwaysOnTopController* GetAlwaysOnTopController(aura::Window* root_window) { + return GetRootWindowController(root_window)->always_on_top_controller(); } } // namespace @@ -82,24 +80,22 @@ aura::Window* StackingController::GetDefaultParent(aura::Window* context, if (IsSystemModal(window)) return GetSystemModalContainer(target_root, window); else if (HasTransientParentWindow(window)) - return internal::RootWindowController::GetContainerForWindow( + return RootWindowController::GetContainerForWindow( ::wm::GetTransientParent(window)); return GetAlwaysOnTopController(target_root)->GetContainer(window); case ui::wm::WINDOW_TYPE_CONTROL: - return GetContainerById( - target_root, internal::kShellWindowId_UnparentedControlContainer); + return GetContainerById(target_root, + kShellWindowId_UnparentedControlContainer); case ui::wm::WINDOW_TYPE_PANEL: if (wm::GetWindowState(window)->panel_attached()) - return GetContainerById(target_root, - internal::kShellWindowId_PanelContainer); + return GetContainerById(target_root, kShellWindowId_PanelContainer); else return GetAlwaysOnTopController(target_root)->GetContainer(window); case ui::wm::WINDOW_TYPE_MENU: - return GetContainerById( - target_root, internal::kShellWindowId_MenuContainer); + return GetContainerById(target_root, kShellWindowId_MenuContainer); case ui::wm::WINDOW_TYPE_TOOLTIP: - return GetContainerById( - target_root, internal::kShellWindowId_DragImageAndTooltipContainer); + return GetContainerById(target_root, + kShellWindowId_DragImageAndTooltipContainer); default: NOTREACHED() << "Window " << window->id() << " has unhandled type " << window->type(); @@ -124,8 +120,7 @@ aura::Window* StackingController::GetSystemModalContainer( Shell::GetInstance()->session_state_delegate(); if (!session_state_delegate->IsUserSessionBlocked() || !::wm::GetTransientParent(window)) { - return GetContainerById(root, - internal::kShellWindowId_SystemModalContainer); + return GetContainerById(root, kShellWindowId_SystemModalContainer); } // Otherwise those that originate from LockScreen container and above are @@ -133,12 +128,10 @@ aura::Window* StackingController::GetSystemModalContainer( int window_container_id = ::wm::GetTransientParent(window)->parent()->id(); aura::Window* container = NULL; - if (window_container_id < internal::kShellWindowId_LockScreenContainer) { - container = GetContainerById( - root, internal::kShellWindowId_SystemModalContainer); + if (window_container_id < kShellWindowId_LockScreenContainer) { + container = GetContainerById(root, kShellWindowId_SystemModalContainer); } else { - container = GetContainerById( - root, internal::kShellWindowId_LockSystemModalContainer); + container = GetContainerById(root, kShellWindowId_LockSystemModalContainer); } return container; diff --git a/ash/wm/stacking_controller.h b/ash/wm/stacking_controller.h index bbe715e..8c76aeb 100644 --- a/ash/wm/stacking_controller.h +++ b/ash/wm/stacking_controller.h @@ -12,9 +12,7 @@ #include "ui/aura/client/window_tree_client.h" namespace ash { -namespace internal { class AlwaysOnTopController; -} class ASH_EXPORT StackingController : public aura::client::WindowTreeClient { public: diff --git a/ash/wm/stacking_controller_unittest.cc b/ash/wm/stacking_controller_unittest.cc index c975169..c091e03 100644 --- a/ash/wm/stacking_controller_unittest.cc +++ b/ash/wm/stacking_controller_unittest.cc @@ -15,7 +15,6 @@ using aura::Window; namespace ash { -namespace internal { class StackingControllerTest : public test::AshTestBase { public: @@ -60,5 +59,4 @@ TEST_F(StackingControllerTest, TransientParent) { EXPECT_EQ(launcher, w1->parent()); } -} // namespace internal } // namespace ash diff --git a/ash/wm/status_area_layout_manager.cc b/ash/wm/status_area_layout_manager.cc index d9e0424..a1bf98e 100644 --- a/ash/wm/status_area_layout_manager.cc +++ b/ash/wm/status_area_layout_manager.cc @@ -12,7 +12,6 @@ #include "ui/views/widget/widget.h" namespace ash { -namespace internal { //////////////////////////////////////////////////////////////////////////////// // StatusAreaLayoutManager, public: @@ -77,5 +76,4 @@ void StatusAreaLayoutManager::LayoutStatusArea() { shelf_->shelf_layout_manager()->LayoutShelf(); } -} // namespace internal } // namespace ash diff --git a/ash/wm/status_area_layout_manager.h b/ash/wm/status_area_layout_manager.h index 8e6944d..9f255ce 100644 --- a/ash/wm/status_area_layout_manager.h +++ b/ash/wm/status_area_layout_manager.h @@ -11,7 +11,6 @@ namespace ash { class ShelfWidget; -namespace internal { // StatusAreaLayoutManager is a layout manager responsible for the status area. // In any case when status area needs relayout it redirects this call to @@ -45,7 +44,6 @@ class StatusAreaLayoutManager : public aura::LayoutManager { DISALLOW_COPY_AND_ASSIGN(StatusAreaLayoutManager); }; -} // namespace internal } // namespace ash #endif // ASH_WM_STATUS_AREA_LAYOUT_MANAGER_H_ diff --git a/ash/wm/system_background_controller.cc b/ash/wm/system_background_controller.cc index 7e4054e..86ec63d 100644 --- a/ash/wm/system_background_controller.cc +++ b/ash/wm/system_background_controller.cc @@ -9,7 +9,6 @@ #include "ui/compositor/layer_type.h" namespace ash { -namespace internal { SystemBackgroundController::SystemBackgroundController( aura::Window* root_window, @@ -41,5 +40,4 @@ void SystemBackgroundController::OnWindowBoundsChanged( layer_->SetBounds(gfx::Rect(root_window_->layer()->bounds().size())); } -} // namespace internal } // namespace ash diff --git a/ash/wm/system_background_controller.h b/ash/wm/system_background_controller.h index 8d74cdd..95c4d5c 100644 --- a/ash/wm/system_background_controller.h +++ b/ash/wm/system_background_controller.h @@ -18,7 +18,6 @@ class Layer; } namespace ash { -namespace internal { // SystemBackgroundController manages a ui::Layer that's stacked at the bottom // of an aura::RootWindow's children. It exists solely to obscure portions of @@ -48,7 +47,6 @@ class SystemBackgroundController : public aura::WindowObserver { DISALLOW_COPY_AND_ASSIGN(SystemBackgroundController); }; -} // namespace internal } // namespace ash #endif // ASH_WM_SYSTEM_BACKGROUND_CONTROLLER_H_ diff --git a/ash/wm/system_gesture_event_filter.cc b/ash/wm/system_gesture_event_filter.cc index 1c31832..e00a093 100644 --- a/ash/wm/system_gesture_event_filter.cc +++ b/ash/wm/system_gesture_event_filter.cc @@ -19,7 +19,6 @@ #endif namespace ash { -namespace internal { SystemGestureEventFilter::SystemGestureEventFilter() : long_press_affordance_(new LongPressAffordanceHandler), @@ -69,5 +68,4 @@ void SystemGestureEventFilter::OnGestureEvent(ui::GestureEvent* event) { } } -} // namespace internal } // namespace ash diff --git a/ash/wm/system_gesture_event_filter.h b/ash/wm/system_gesture_event_filter.h index 8fe82db..43bf758 100644 --- a/ash/wm/system_gesture_event_filter.h +++ b/ash/wm/system_gesture_event_filter.h @@ -9,16 +9,14 @@ #include "ui/events/event_handler.h" namespace ash { +class LongPressAffordanceHandler; +class OverviewGestureHandler; +class ShelfGestureHandler; namespace test { class SystemGestureEventFilterTest; } -namespace internal { -class LongPressAffordanceHandler; -class OverviewGestureHandler; -class ShelfGestureHandler; - // An event filter which handles system level gesture events. class SystemGestureEventFilter : public ui::EventHandler { public: @@ -41,7 +39,6 @@ class SystemGestureEventFilter : public ui::EventHandler { DISALLOW_COPY_AND_ASSIGN(SystemGestureEventFilter); }; -} // namespace internal } // namespace ash #endif // ASH_WM_SYSTEM_GESTURE_EVENT_FILTER_H_ diff --git a/ash/wm/system_gesture_event_filter_unittest.cc b/ash/wm/system_gesture_event_filter_unittest.cc index 39cdac8..47f46df 100644 --- a/ash/wm/system_gesture_event_filter_unittest.cc +++ b/ash/wm/system_gesture_event_filter_unittest.cc @@ -114,14 +114,14 @@ class SystemGestureEventFilterTest SystemGestureEventFilterTest() : AshTestBase(), docked_enabled_(GetParam()) {} virtual ~SystemGestureEventFilterTest() {} - internal::LongPressAffordanceHandler* GetLongPressAffordance() { + LongPressAffordanceHandler* GetLongPressAffordance() { ShellTestApi shell_test(Shell::GetInstance()); return shell_test.system_gesture_event_filter()-> long_press_affordance_.get(); } - base::OneShotTimer<internal::LongPressAffordanceHandler>* - GetLongPressAffordanceTimer() { + base::OneShotTimer<LongPressAffordanceHandler>* + GetLongPressAffordanceTimer() { return &GetLongPressAffordance()->timer_; } @@ -194,7 +194,7 @@ TEST_P(SystemGestureEventFilterTest, LongPressAffordanceStateOnCaptureLoss) { ASSERT_FALSE(details.dispatcher_destroyed); EXPECT_TRUE(window1->HasCapture()); - base::OneShotTimer<internal::LongPressAffordanceHandler>* timer = + base::OneShotTimer<LongPressAffordanceHandler>* timer = GetLongPressAffordanceTimer(); EXPECT_TRUE(timer->IsRunning()); EXPECT_EQ(window1, GetLongPressAffordanceTarget()); diff --git a/ash/wm/system_modal_container_event_filter.cc b/ash/wm/system_modal_container_event_filter.cc index 4412a9c..c8400cf 100644 --- a/ash/wm/system_modal_container_event_filter.cc +++ b/ash/wm/system_modal_container_event_filter.cc @@ -9,7 +9,6 @@ #include "ui/events/event.h" namespace ash { -namespace internal { SystemModalContainerEventFilter::SystemModalContainerEventFilter( SystemModalContainerEventFilterDelegate* delegate) @@ -32,5 +31,4 @@ void SystemModalContainerEventFilter::OnMouseEvent( event->StopPropagation(); } -} // namespace internal } // namespace ash diff --git a/ash/wm/system_modal_container_event_filter.h b/ash/wm/system_modal_container_event_filter.h index e1f2e8e..7c00d6f 100644 --- a/ash/wm/system_modal_container_event_filter.h +++ b/ash/wm/system_modal_container_event_filter.h @@ -11,7 +11,6 @@ #include "ui/events/event_handler.h" namespace ash { -namespace internal { class SystemModalContainerEventFilterDelegate; @@ -31,7 +30,6 @@ class ASH_EXPORT SystemModalContainerEventFilter : public ui::EventHandler { DISALLOW_COPY_AND_ASSIGN(SystemModalContainerEventFilter); }; -} // namespace internal } // namespace ash #endif // ASH_WM_SYSTEM_MODAL_CONTAINER_EVENT_FILTER_H_ diff --git a/ash/wm/system_modal_container_event_filter_delegate.h b/ash/wm/system_modal_container_event_filter_delegate.h index 4e27d00..a5765f6 100644 --- a/ash/wm/system_modal_container_event_filter_delegate.h +++ b/ash/wm/system_modal_container_event_filter_delegate.h @@ -12,7 +12,6 @@ class Window; } namespace ash { -namespace internal { class ASH_EXPORT SystemModalContainerEventFilterDelegate { public: @@ -20,7 +19,6 @@ class ASH_EXPORT SystemModalContainerEventFilterDelegate { virtual bool CanWindowReceiveEvents(aura::Window* window) = 0; }; -} // namespace internal } // namespace ash #endif // ASH_WM_MODALITY_EVENT_FILTER_DELEGATE_H_ diff --git a/ash/wm/system_modal_container_layout_manager.cc b/ash/wm/system_modal_container_layout_manager.cc index 6937501..89a7740 100644 --- a/ash/wm/system_modal_container_layout_manager.cc +++ b/ash/wm/system_modal_container_layout_manager.cc @@ -27,7 +27,6 @@ #include "ui/wm/core/compound_event_filter.h" namespace ash { -namespace internal { //////////////////////////////////////////////////////////////////////////////// // SystemModalContainerLayoutManager, public: @@ -66,7 +65,7 @@ void SystemModalContainerLayoutManager::OnWindowAddedToLayout( child->type() == ui::wm::WINDOW_TYPE_NORMAL || child->type() == ui::wm::WINDOW_TYPE_POPUP); DCHECK( - container_->id() != internal::kShellWindowId_LockSystemModalContainer || + container_->id() != kShellWindowId_LockSystemModalContainer || Shell::GetInstance()->session_state_delegate()->IsUserSessionBlocked()); child->AddObserver(this); @@ -133,7 +132,7 @@ bool SystemModalContainerLayoutManager::CanWindowReceiveEvents( // This container can not handle events if the screen is locked and it is not // above the lock screen layer (crbug.com/110920). if (Shell::GetInstance()->session_state_delegate()->IsUserSessionBlocked() && - container_->id() < ash::internal::kShellWindowId_LockScreenContainer) + container_->id() < ash::kShellWindowId_LockScreenContainer) return true; return wm::GetActivatableWindow(window) == modal_window(); } @@ -188,8 +187,8 @@ void SystemModalContainerLayoutManager::DestroyModalBackground() { bool SystemModalContainerLayoutManager::IsModalBackground( aura::Window* window) { int id = window->parent()->id(); - if (id != internal::kShellWindowId_SystemModalContainer && - id != internal::kShellWindowId_LockSystemModalContainer) + if (id != kShellWindowId_SystemModalContainer && + id != kShellWindowId_LockSystemModalContainer) return false; SystemModalContainerLayoutManager* layout_manager = static_cast<SystemModalContainerLayoutManager*>( @@ -220,5 +219,4 @@ void SystemModalContainerLayoutManager::RemoveModalWindow( modal_windows_.erase(it); } -} // namespace internal } // namespace ash diff --git a/ash/wm/system_modal_container_layout_manager.h b/ash/wm/system_modal_container_layout_manager.h index 76618ec..0833cc8 100644 --- a/ash/wm/system_modal_container_layout_manager.h +++ b/ash/wm/system_modal_container_layout_manager.h @@ -26,7 +26,6 @@ class Widget; } namespace ash { -namespace internal { // LayoutManager for the modal window container. class ASH_EXPORT SystemModalContainerLayoutManager @@ -92,7 +91,6 @@ class ASH_EXPORT SystemModalContainerLayoutManager DISALLOW_COPY_AND_ASSIGN(SystemModalContainerLayoutManager); }; -} // namespace internal } // namespace ash #endif // ASH_WM_SYSTEM_MODAL_CONTAINER_LAYOUT_MANAGER_H_ diff --git a/ash/wm/system_modal_container_layout_manager_unittest.cc b/ash/wm/system_modal_container_layout_manager_unittest.cc index af7c4f3..a150ef6 100644 --- a/ash/wm/system_modal_container_layout_manager_unittest.cc +++ b/ash/wm/system_modal_container_layout_manager_unittest.cc @@ -29,7 +29,7 @@ namespace { aura::Window* GetModalContainer() { return Shell::GetPrimaryRootWindowController()->GetContainer( - ash::internal::kShellWindowId_SystemModalContainer); + ash::kShellWindowId_SystemModalContainer); } bool AllRootWindowsHaveModalBackgroundsForContainer(int container_id) { @@ -38,21 +38,20 @@ bool AllRootWindowsHaveModalBackgroundsForContainer(int container_id) { bool has_modal_screen = !containers.empty(); for (std::vector<aura::Window*>::iterator iter = containers.begin(); iter != containers.end(); ++iter) { - has_modal_screen &= - static_cast<internal::SystemModalContainerLayoutManager*>( - (*iter)->layout_manager())->has_modal_background(); + has_modal_screen &= static_cast<SystemModalContainerLayoutManager*>( + (*iter)->layout_manager())->has_modal_background(); } return has_modal_screen; } bool AllRootWindowsHaveLockedModalBackgrounds() { return AllRootWindowsHaveModalBackgroundsForContainer( - internal::kShellWindowId_LockSystemModalContainer); + kShellWindowId_LockSystemModalContainer); } bool AllRootWindowsHaveModalBackgrounds() { return AllRootWindowsHaveModalBackgroundsForContainer( - internal::kShellWindowId_SystemModalContainer); + kShellWindowId_SystemModalContainer); } class TestWindow : public views::WidgetDelegateView { @@ -313,7 +312,7 @@ TEST_F(SystemModalContainerLayoutManagerTest, EventFocusContainers) { EventTestWindow* lock_delegate = new EventTestWindow(false); scoped_ptr<aura::Window> lock(lock_delegate->OpenTestWindowWithParent( Shell::GetPrimaryRootWindowController()->GetContainer( - ash::internal::kShellWindowId_LockScreenContainer))); + ash::kShellWindowId_LockScreenContainer))); EXPECT_TRUE(wm::IsActiveWindow(lock.get())); e1.ClickLeftButton(); EXPECT_EQ(1, lock_delegate->mouse_presses()); @@ -338,8 +337,10 @@ TEST_F(SystemModalContainerLayoutManagerTest, EventFocusContainers) { // is hidden. TEST_F(SystemModalContainerLayoutManagerTest, ShowModalWhileHidden) { // Hide the lock screen. - Shell::GetPrimaryRootWindowController()->GetContainer( - internal::kShellWindowId_SystemModalContainer)->layer()->SetOpacity(0); + Shell::GetPrimaryRootWindowController() + ->GetContainer(kShellWindowId_SystemModalContainer) + ->layer() + ->SetOpacity(0); // Create a modal window. scoped_ptr<aura::Window> parent(OpenToplevelTestWindow(false)); @@ -409,7 +410,7 @@ TEST_F(SystemModalContainerLayoutManagerTest, ShowNormalBackgroundOrLocked) { BlockUserSession(static_cast<UserSessionBlockReason>(block_reason)); scoped_ptr<aura::Window> lock_parent(OpenTestWindowWithParent( Shell::GetPrimaryRootWindowController()->GetContainer( - ash::internal::kShellWindowId_LockScreenContainer), + ash::kShellWindowId_LockScreenContainer), false)); scoped_ptr<aura::Window> lock_modal_window(OpenTestWindowWithParent( lock_parent.get(), true)); @@ -447,9 +448,9 @@ TEST_F(SystemModalContainerLayoutManagerTest, MultiDisplays) { aura::Window::Windows root_windows = Shell::GetAllRootWindows(); EXPECT_EQ(2U, root_windows.size()); aura::Window* container1 = Shell::GetContainer( - root_windows[0], ash::internal::kShellWindowId_SystemModalContainer); + root_windows[0], ash::kShellWindowId_SystemModalContainer); aura::Window* container2 = Shell::GetContainer( - root_windows[1], ash::internal::kShellWindowId_SystemModalContainer); + root_windows[1], ash::kShellWindowId_SystemModalContainer); scoped_ptr<aura::Window> modal1( OpenTestWindowWithParent(container1, true)); diff --git a/ash/wm/toplevel_window_event_handler.cc b/ash/wm/toplevel_window_event_handler.cc index 872fd03..8b6c9ba 100644 --- a/ash/wm/toplevel_window_event_handler.cc +++ b/ash/wm/toplevel_window_event_handler.cc @@ -232,14 +232,14 @@ void ToplevelWindowEventHandler::OnGestureEvent(ui::GestureEvent* event) { if (!(WindowResizer::GetBoundsChangeForWindowComponent(component) & WindowResizer::kBoundsChange_Resizes)) return; - internal::ResizeShadowController* controller = + ResizeShadowController* controller = Shell::GetInstance()->resize_shadow_controller(); if (controller) controller->ShowShadow(target, component); return; } case ui::ET_GESTURE_END: { - internal::ResizeShadowController* controller = + ResizeShadowController* controller = Shell::GetInstance()->resize_shadow_controller(); if (controller) controller->HideShadow(target); @@ -532,7 +532,7 @@ void ToplevelWindowEventHandler::HandleMouseMoved( // TODO(jamescook): Move the resize cursor update code into here from // CompoundEventFilter? - internal::ResizeShadowController* controller = + ResizeShadowController* controller = Shell::GetInstance()->resize_shadow_controller(); if (controller) { if (event->flags() & ui::EF_IS_NON_CLIENT) { @@ -554,7 +554,7 @@ void ToplevelWindowEventHandler::HandleMouseExited( if (event->phase() != ui::EP_POSTTARGET) return; - internal::ResizeShadowController* controller = + ResizeShadowController* controller = Shell::GetInstance()->resize_shadow_controller(); if (controller) controller->HideShadow(target); diff --git a/ash/wm/toplevel_window_event_handler_unittest.cc b/ash/wm/toplevel_window_event_handler_unittest.cc index a387067..3aa25ba 100644 --- a/ash/wm/toplevel_window_event_handler_unittest.cc +++ b/ash/wm/toplevel_window_event_handler_unittest.cc @@ -70,9 +70,8 @@ class ToplevelWindowEventHandlerTest : public AshTestBase { w1->SetType(ui::wm::WINDOW_TYPE_NORMAL); w1->set_id(1); w1->Init(aura::WINDOW_LAYER_TEXTURED); - aura::Window* parent = - Shell::GetContainer(Shell::GetPrimaryRootWindow(), - internal::kShellWindowId_AlwaysOnTopContainer); + aura::Window* parent = Shell::GetContainer( + Shell::GetPrimaryRootWindow(), kShellWindowId_AlwaysOnTopContainer); parent->AddChild(w1); w1->SetBounds(gfx::Rect(0, 0, 100, 100)); w1->Show(); @@ -477,8 +476,9 @@ TEST_F(ToplevelWindowEventHandlerTest, GestureDragMinimizeLoginScreen) { SetUserLoggedIn(false); scoped_ptr<aura::Window> target(CreateWindow(HTCAPTION)); - aura::Window* lock = internal::RootWindowController::ForWindow(target.get())-> - GetContainer(internal::kShellWindowId_LockSystemModalContainer); + aura::Window* lock = + RootWindowController::ForWindow(target.get()) + ->GetContainer(kShellWindowId_LockSystemModalContainer); lock->AddChild(target.get()); aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(), target.get()); diff --git a/ash/wm/video_detector.cc b/ash/wm/video_detector.cc index 38aef18..f0a7aaa 100644 --- a/ash/wm/video_detector.cc +++ b/ash/wm/video_detector.cc @@ -131,8 +131,8 @@ void VideoDetector::MaybeNotifyObservers(aura::Window* window, // http://crbug.com/340666 bool fullscreen_window_exists = false; std::vector<aura::Window*> containers = - Shell::GetContainersFromAllRootWindows( - internal::kShellWindowId_DefaultContainer, NULL); + Shell::GetContainersFromAllRootWindows(kShellWindowId_DefaultContainer, + NULL); for (std::vector<aura::Window*>::const_iterator container = containers.begin(); container != containers.end(); ++container) { const aura::Window::Windows& windows = (*container)->children(); diff --git a/ash/wm/window_animations.cc b/ash/wm/window_animations.cc index 109aa1b..3d195ae 100644 --- a/ash/wm/window_animations.cc +++ b/ash/wm/window_animations.cc @@ -468,8 +468,7 @@ gfx::Rect GetMinimizeAnimationTargetBoundsInScreen(aura::Window* window) { // correctly and the window can be animated to the launcher item's light // bar. if (item_rect.width() != 0 || item_rect.height() != 0) { - internal::ShelfLayoutManager* layout_manager = - internal::ShelfLayoutManager::ForShelf(window); + ShelfLayoutManager* layout_manager = ShelfLayoutManager::ForShelf(window); if (layout_manager->visibility_state() == SHELF_AUTO_HIDE) { gfx::Rect shelf_bounds = shelf->shelf_widget()->GetWindowBoundsInScreen(); switch (layout_manager->GetAlignment()) { diff --git a/ash/wm/window_modality_controller_unittest.cc b/ash/wm/window_modality_controller_unittest.cc index c829171..910b369 100644 --- a/ash/wm/window_modality_controller_unittest.cc +++ b/ash/wm/window_modality_controller_unittest.cc @@ -20,7 +20,6 @@ #include "ui/wm/core/window_util.h" namespace ash { -namespace internal { typedef test::AshTestBase WindowModalityControllerTest; @@ -560,5 +559,4 @@ TEST_F(WindowModalityControllerTest, ChildModalAncestor) { EXPECT_TRUE(wm::IsActiveWindow(w4.get())); } -} // namespace internal } // namespace ash diff --git a/ash/wm/window_properties.cc b/ash/wm/window_properties.cc index ced25b2..1689c90 100644 --- a/ash/wm/window_properties.cc +++ b/ash/wm/window_properties.cc @@ -10,10 +10,10 @@ DECLARE_WINDOW_PROPERTY_TYPE(ash::wm::WindowState*); namespace ash { -namespace internal { + DEFINE_WINDOW_PROPERTY_KEY(bool, kStayInSameRootWindowKey, false); DEFINE_WINDOW_PROPERTY_KEY(bool, kUsesScreenCoordinatesKey, false); DEFINE_OWNED_WINDOW_PROPERTY_KEY(wm::WindowState, kWindowStateKey, NULL); -} // namespace internal + } // namespace ash diff --git a/ash/wm/window_properties.h b/ash/wm/window_properties.h index 74ae495..c99d21d 100644 --- a/ash/wm/window_properties.h +++ b/ash/wm/window_properties.h @@ -19,7 +19,6 @@ namespace ash { namespace wm { class WindowState; } // namespace wm -namespace internal { // Shell-specific window property keys. @@ -40,7 +39,6 @@ extern const aura::WindowProperty<wm::WindowState*>* const kWindowStateKey; // Alphabetical sort. -} // namespace internal } // namespace ash #endif // ASH_WM_WINDOW_PROPERTIES_H_ diff --git a/ash/wm/window_resizer.cc b/ash/wm/window_resizer.cc index 14c1fd9..08ff0c4 100644 --- a/ash/wm/window_resizer.cc +++ b/ash/wm/window_resizer.cc @@ -142,10 +142,9 @@ gfx::Rect WindowResizer::CalculateBoundsForDrag( gfx::Rect work_area = Shell::GetScreen()->GetDisplayNearestWindow(GetTarget()).work_area(); aura::Window* dock_container = Shell::GetContainer( - GetTarget()->GetRootWindow(), - internal::kShellWindowId_DockedContainer); - internal::DockedWindowLayoutManager* dock_layout = - static_cast<internal::DockedWindowLayoutManager*>( + GetTarget()->GetRootWindow(), kShellWindowId_DockedContainer); + DockedWindowLayoutManager* dock_layout = + static_cast<DockedWindowLayoutManager*>( dock_container->layout_manager()); work_area.Union(dock_layout->docked_bounds()); @@ -211,11 +210,11 @@ gfx::Rect WindowResizer::CalculateBoundsForDrag( // calculate the target display after the drag. const gfx::Display& display = Shell::GetScreen()->GetDisplayMatching(near_passed_location); - aura::Window* dock_container = Shell::GetContainer( - wm::GetRootWindowMatching(near_passed_location), - internal::kShellWindowId_DockedContainer); - internal::DockedWindowLayoutManager* dock_layout = - static_cast<internal::DockedWindowLayoutManager*>( + aura::Window* dock_container = + Shell::GetContainer(wm::GetRootWindowMatching(near_passed_location), + kShellWindowId_DockedContainer); + DockedWindowLayoutManager* dock_layout = + static_cast<DockedWindowLayoutManager*>( dock_container->layout_manager()); gfx::Rect screen_work_area = display.work_area(); diff --git a/ash/wm/window_state.cc b/ash/wm/window_state.cc index 9af59ca..7714aca 100644 --- a/ash/wm/window_state.cc +++ b/ash/wm/window_state.cc @@ -150,7 +150,7 @@ bool WindowState::IsActive() const { bool WindowState::IsDocked() const { return window_->parent() && - window_->parent()->id() == internal::kShellWindowId_DockedContainer; + window_->parent()->id() == kShellWindowId_DockedContainer; } bool WindowState::CanMaximize() const { @@ -158,12 +158,11 @@ bool WindowState::CanMaximize() const { } bool WindowState::CanMinimize() const { - internal::RootWindowController* controller = - internal::RootWindowController::ForWindow(window_); + RootWindowController* controller = RootWindowController::ForWindow(window_); if (!controller) return false; - aura::Window* lockscreen = controller->GetContainer( - internal::kShellWindowId_LockScreenContainersContainer); + aura::Window* lockscreen = + controller->GetContainer(kShellWindowId_LockScreenContainersContainer); if (lockscreen->Contains(window_)) return false; @@ -418,10 +417,10 @@ WindowState* GetActiveWindowState() { WindowState* GetWindowState(aura::Window* window) { if (!window) return NULL; - WindowState* settings = window->GetProperty(internal::kWindowStateKey); + WindowState* settings = window->GetProperty(kWindowStateKey); if(!settings) { settings = new WindowState(window); - window->SetProperty(internal::kWindowStateKey, settings); + window->SetProperty(kWindowStateKey, settings); } return settings; } diff --git a/ash/wm/window_state.h b/ash/wm/window_state.h index 8bfb16e..4de1f9d 100644 --- a/ash/wm/window_state.h +++ b/ash/wm/window_state.h @@ -24,10 +24,8 @@ class Rect; } namespace ash { -namespace internal { class WorkspaceLayoutManager; class MaximizeModeWindowState; -} namespace wm { class WindowStateDelegate; @@ -296,7 +294,7 @@ class ASH_EXPORT WindowState : public aura::WindowObserver { private: friend class DefaultState; - friend class ash::internal::MaximizeModeWindowState; + friend class ash::MaximizeModeWindowState; FRIEND_TEST_ALL_PREFIXES(WindowAnimationsTest, CrossFadeToBounds); WindowStateDelegate* delegate() { return delegate_.get(); } diff --git a/ash/wm/workspace/magnetism_matcher.cc b/ash/wm/workspace/magnetism_matcher.cc index e7d674b..d486f61 100644 --- a/ash/wm/workspace/magnetism_matcher.cc +++ b/ash/wm/workspace/magnetism_matcher.cc @@ -8,8 +8,6 @@ #include <cmath> namespace ash { -namespace internal { - namespace { // Returns true if |a| is close enough to |b| that the two edges snap. @@ -190,5 +188,4 @@ void MagnetismMatcher::AttachToSecondaryEdge( } } -} // namespace internal } // namespace ash diff --git a/ash/wm/workspace/magnetism_matcher.h b/ash/wm/workspace/magnetism_matcher.h index ff1f528..5c17c7a58 100644 --- a/ash/wm/workspace/magnetism_matcher.h +++ b/ash/wm/workspace/magnetism_matcher.h @@ -15,7 +15,6 @@ #include "ui/gfx/rect.h" namespace ash { -namespace internal { enum MagnetismEdge { MAGNETISM_EDGE_TOP = 1 << 0, @@ -185,7 +184,6 @@ class ASH_EXPORT MagnetismMatcher { DISALLOW_COPY_AND_ASSIGN(MagnetismMatcher); }; -} // namespace internal } // namespace ash #endif // ASH_WM_WORKSPACE_MAGNETISM_MATCHER_H_ diff --git a/ash/wm/workspace/magnetism_matcher_unittest.cc b/ash/wm/workspace/magnetism_matcher_unittest.cc index 054622f..6c7ea9b 100644 --- a/ash/wm/workspace/magnetism_matcher_unittest.cc +++ b/ash/wm/workspace/magnetism_matcher_unittest.cc @@ -7,7 +7,6 @@ #include "testing/gtest/include/gtest/gtest.h" namespace ash { -namespace internal { // Trivial test case verifying assertions on left edge. TEST(MagnetismMatcherTest, TrivialLeft) { @@ -166,6 +165,5 @@ TEST(MagnetismMatcherTest, ObscureTrailing) { EXPECT_EQ(SECONDARY_MAGNETISM_EDGE_NONE, edge.secondary_edge); } -} // namespace internal } // namespace ash diff --git a/ash/wm/workspace/multi_window_resize_controller.cc b/ash/wm/workspace/multi_window_resize_controller.cc index df43914..347b117 100644 --- a/ash/wm/workspace/multi_window_resize_controller.cc +++ b/ash/wm/workspace/multi_window_resize_controller.cc @@ -29,8 +29,6 @@ using aura::Window; namespace ash { -namespace internal { - namespace { // Delay before showing. @@ -386,9 +384,8 @@ void MultiWindowResizeController::ShowNow() { views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP); params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; - params.parent = Shell::GetContainer( - Shell::GetTargetRootWindow(), - internal::kShellWindowId_AlwaysOnTopContainer); + params.parent = Shell::GetContainer(Shell::GetTargetRootWindow(), + kShellWindowId_AlwaysOnTopContainer); params.can_activate = false; ResizeView* view = new ResizeView(this, windows_.direction); resize_widget_->set_focus_on_creation(false); @@ -543,5 +540,4 @@ bool MultiWindowResizeController::IsOverWindow( window->delegate()->GetNonClientComponent(window_loc) == component; } -} // namespace internal } // namespace ash diff --git a/ash/wm/workspace/multi_window_resize_controller.h b/ash/wm/workspace/multi_window_resize_controller.h index 6dd342e..5e21b24 100644 --- a/ash/wm/workspace/multi_window_resize_controller.h +++ b/ash/wm/workspace/multi_window_resize_controller.h @@ -24,8 +24,6 @@ class Widget; } namespace ash { -namespace internal { - class MultiWindowResizeControllerTest; class WorkspaceWindowResizer; @@ -180,7 +178,6 @@ class ASH_EXPORT MultiWindowResizeController : DISALLOW_COPY_AND_ASSIGN(MultiWindowResizeController); }; -} // namespace internal } // namespace ash #endif // ASH_WM_WORKSPACE_MULTI_WINDOW_RESIZE_CONTROLLER_H_ diff --git a/ash/wm/workspace/multi_window_resize_controller_unittest.cc b/ash/wm/workspace/multi_window_resize_controller_unittest.cc index 056e7d2..9ff1d7c 100644 --- a/ash/wm/workspace/multi_window_resize_controller_unittest.cc +++ b/ash/wm/workspace/multi_window_resize_controller_unittest.cc @@ -19,7 +19,6 @@ #include "ui/views/widget/widget.h" namespace ash { -namespace internal { class MultiWindowResizeControllerTest : public test::AshTestBase { public: @@ -254,5 +253,5 @@ TEST_F(MultiWindowResizeControllerTest, Three) { EXPECT_TRUE(IsShowing()); generator.PressLeftButton(); } -} // namespace internal + } // namespace ash diff --git a/ash/wm/workspace/phantom_window_controller.cc b/ash/wm/workspace/phantom_window_controller.cc index f56575b..ba95423 100644 --- a/ash/wm/workspace/phantom_window_controller.cc +++ b/ash/wm/workspace/phantom_window_controller.cc @@ -24,8 +24,6 @@ #include "ui/views/widget/widget.h" namespace ash { -namespace internal { - namespace { // The duration of the show animation. @@ -289,5 +287,4 @@ scoped_ptr<views::Widget> PhantomWindowController::CreatePhantomWidget( return phantom_widget.Pass(); } -} // namespace internal } // namespace ash diff --git a/ash/wm/workspace/phantom_window_controller.h b/ash/wm/workspace/phantom_window_controller.h index fa87ef4..d62b135 100644 --- a/ash/wm/workspace/phantom_window_controller.h +++ b/ash/wm/workspace/phantom_window_controller.h @@ -19,7 +19,6 @@ class Widget; } namespace ash { -namespace internal { // PhantomWindowController is responsible for showing a phantom representation // of a window. It's used to show a preview of how snapping or docking a window @@ -81,7 +80,6 @@ class ASH_EXPORT PhantomWindowController { DISALLOW_COPY_AND_ASSIGN(PhantomWindowController); }; -} // namespace internal } // namespace ash #endif // ASH_WM_WORKSPACE_PHANTOM_WINDOW_CONTROLLER_H_ diff --git a/ash/wm/workspace/phantom_window_controller_unittest.cc b/ash/wm/workspace/phantom_window_controller_unittest.cc index 760db96..fa637d8 100644 --- a/ash/wm/workspace/phantom_window_controller_unittest.cc +++ b/ash/wm/workspace/phantom_window_controller_unittest.cc @@ -14,8 +14,6 @@ #include "ui/views/widget/widget.h" namespace ash { -namespace internal { - namespace { // Returns true if |window| is non-NULL and is visible. @@ -172,5 +170,4 @@ TEST_F(PhantomWindowControllerTest, OldCaptionButtonStyle) { EXPECT_FALSE(start_deletion_observer.IsWindowAlive()); } -} // namespace internal } // namespace ash diff --git a/ash/wm/workspace/two_step_edge_cycler.cc b/ash/wm/workspace/two_step_edge_cycler.cc index 76da2a1..3dd4437 100644 --- a/ash/wm/workspace/two_step_edge_cycler.cc +++ b/ash/wm/workspace/two_step_edge_cycler.cc @@ -7,8 +7,6 @@ #include <cmath> namespace ash { -namespace internal { - namespace { // We cycle to the second mode if any of the following happens while the mouse @@ -46,5 +44,4 @@ void TwoStepEdgeCycler::OnMove(const gfx::Point& location) { time_last_move_ = base::TimeTicks::Now(); } -} // namespace internal } // namespace ash diff --git a/ash/wm/workspace/two_step_edge_cycler.h b/ash/wm/workspace/two_step_edge_cycler.h index 007eda7..ffa1620 100644 --- a/ash/wm/workspace/two_step_edge_cycler.h +++ b/ash/wm/workspace/two_step_edge_cycler.h @@ -12,8 +12,6 @@ namespace ash { -namespace internal { - // TwoStepEdgeCycler is responsible for cycling between two modes when the mouse // is at the edge of the workspace. The cycler does not loop so it is impossible // to get back to the first mode once the second mode is reached. @@ -46,7 +44,6 @@ class ASH_EXPORT TwoStepEdgeCycler { DISALLOW_COPY_AND_ASSIGN(TwoStepEdgeCycler); }; -} // namespace internal } // namespace ash #endif // ASH_WM_WORKSPACE_TWO_STEP_EDGE_CYCLER_H_ diff --git a/ash/wm/workspace/workspace_event_handler.cc b/ash/wm/workspace/workspace_event_handler.cc index 65a8841..bfc8104 100644 --- a/ash/wm/workspace/workspace_event_handler.cc +++ b/ash/wm/workspace/workspace_event_handler.cc @@ -14,7 +14,6 @@ #include "ui/base/hit_test.h" namespace ash { -namespace internal { WorkspaceEventHandler::WorkspaceEventHandler() { } @@ -109,5 +108,4 @@ void WorkspaceEventHandler::HandleVerticalResizeDoubleClick( } } -} // namespace internal } // namespace ash diff --git a/ash/wm/workspace/workspace_event_handler.h b/ash/wm/workspace/workspace_event_handler.h index 65a05ac8..f949821 100644 --- a/ash/wm/workspace/workspace_event_handler.h +++ b/ash/wm/workspace/workspace_event_handler.h @@ -9,14 +9,12 @@ #include "ui/events/event_handler.h" namespace ash { +class WorkspaceEventHandlerTestHelper; + namespace wm { class WindowState; } -namespace internal { - -class WorkspaceEventHandlerTestHelper; - class WorkspaceEventHandler : public ui::EventHandler { public: WorkspaceEventHandler(); @@ -41,7 +39,6 @@ class WorkspaceEventHandler : public ui::EventHandler { DISALLOW_COPY_AND_ASSIGN(WorkspaceEventHandler); }; -} // namespace internal } // namespace ash #endif // ASH_WM_WORKSPACE_WORKSPACE_EVENT_HANDLER_H_ diff --git a/ash/wm/workspace/workspace_event_handler_test_helper.cc b/ash/wm/workspace/workspace_event_handler_test_helper.cc index 55b707b..485b102 100644 --- a/ash/wm/workspace/workspace_event_handler_test_helper.cc +++ b/ash/wm/workspace/workspace_event_handler_test_helper.cc @@ -5,7 +5,6 @@ #include "ash/wm/workspace/workspace_event_handler_test_helper.h" namespace ash { -namespace internal { WorkspaceEventHandlerTestHelper::WorkspaceEventHandlerTestHelper( WorkspaceEventHandler* handler) @@ -15,5 +14,4 @@ WorkspaceEventHandlerTestHelper::WorkspaceEventHandlerTestHelper( WorkspaceEventHandlerTestHelper::~WorkspaceEventHandlerTestHelper() { } -} // namespace internal } // namespace ash diff --git a/ash/wm/workspace/workspace_event_handler_test_helper.h b/ash/wm/workspace/workspace_event_handler_test_helper.h index 21e1adb..3d0ec95 100644 --- a/ash/wm/workspace/workspace_event_handler_test_helper.h +++ b/ash/wm/workspace/workspace_event_handler_test_helper.h @@ -8,7 +8,6 @@ #include "ash/wm/workspace/workspace_event_handler.h" namespace ash { -namespace internal { class WorkspaceEventHandlerTestHelper { public: @@ -25,7 +24,6 @@ class WorkspaceEventHandlerTestHelper { DISALLOW_COPY_AND_ASSIGN(WorkspaceEventHandlerTestHelper); }; -} // namespace internal } // namespace ash #endif // ASH_WM_WORKSPACE_WORKSPACE_EVENT_HANDLER_TEST_HELPER_H_ diff --git a/ash/wm/workspace/workspace_event_handler_unittest.cc b/ash/wm/workspace/workspace_event_handler_unittest.cc index f02830a..fe9ec8c 100644 --- a/ash/wm/workspace/workspace_event_handler_unittest.cc +++ b/ash/wm/workspace/workspace_event_handler_unittest.cc @@ -28,7 +28,6 @@ #endif namespace ash { -namespace internal { class WorkspaceEventHandlerTest : public test::AshTestBase { public: @@ -455,5 +454,4 @@ TEST_F(WorkspaceEventHandlerTest, DeleteWhileInRunLoop) { aura::client::WINDOW_MOVE_SOURCE_MOUSE); } -} // namespace internal } // namespace ash diff --git a/ash/wm/workspace/workspace_layout_manager.cc b/ash/wm/workspace/workspace_layout_manager.cc index 1b4b4af..c817141 100644 --- a/ash/wm/workspace/workspace_layout_manager.cc +++ b/ash/wm/workspace/workspace_layout_manager.cc @@ -32,8 +32,6 @@ using aura::Window; namespace ash { -namespace internal { - WorkspaceLayoutManager::WorkspaceLayoutManager(aura::Window* window) : shelf_(NULL), window_(window), @@ -57,7 +55,7 @@ WorkspaceLayoutManager::~WorkspaceLayoutManager() { Shell::GetInstance()->activation_client()->RemoveObserver(this); } -void WorkspaceLayoutManager::SetShelf(internal::ShelfLayoutManager* shelf) { +void WorkspaceLayoutManager::SetShelf(ShelfLayoutManager* shelf) { shelf_ = shelf; } @@ -281,5 +279,4 @@ void WorkspaceLayoutManager::UpdateFullscreenState() { } } -} // namespace internal } // namespace ash diff --git a/ash/wm/workspace/workspace_layout_manager.h b/ash/wm/workspace/workspace_layout_manager.h index 970f5e4..296e5ad 100644 --- a/ash/wm/workspace/workspace_layout_manager.h +++ b/ash/wm/workspace/workspace_layout_manager.h @@ -29,16 +29,14 @@ class Layer; } namespace ash { +class ShelfLayoutManager; +class WorkspaceLayoutManagerDelegate; + namespace wm { class WindowState; class WMEvent; } -namespace internal { - -class ShelfLayoutManager; -class WorkspaceLayoutManagerDelegate; - // LayoutManager used on the window created for a workspace. class ASH_EXPORT WorkspaceLayoutManager : public aura::LayoutManager, @@ -50,7 +48,7 @@ class ASH_EXPORT WorkspaceLayoutManager explicit WorkspaceLayoutManager(aura::Window* window); virtual ~WorkspaceLayoutManager(); - void SetShelf(internal::ShelfLayoutManager* shelf); + void SetShelf(ShelfLayoutManager* shelf); // A delegate which can be set to add a backdrop behind the top most visible // window. With the call the ownership of the delegate will be transferred to @@ -123,7 +121,7 @@ class ASH_EXPORT WorkspaceLayoutManager // Animates the window bounds to |bounds|. void SetChildBoundsAnimated(aura::Window* child, const gfx::Rect& bounds); - internal::ShelfLayoutManager* shelf_; + ShelfLayoutManager* shelf_; aura::Window* window_; aura::Window* root_window_; @@ -143,7 +141,6 @@ class ASH_EXPORT WorkspaceLayoutManager DISALLOW_COPY_AND_ASSIGN(WorkspaceLayoutManager); }; -} // namespace internal } // namespace ash #endif // ASH_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_ diff --git a/ash/wm/workspace/workspace_layout_manager_delegate.h b/ash/wm/workspace/workspace_layout_manager_delegate.h index a32c028..4cd1710 100644 --- a/ash/wm/workspace/workspace_layout_manager_delegate.h +++ b/ash/wm/workspace/workspace_layout_manager_delegate.h @@ -16,8 +16,6 @@ namespace wm { class WindowState; } -namespace internal { - // A delegate which can be set to create and control a backdrop which gets // placed below the top level window. class WorkspaceLayoutManagerDelegate { @@ -43,7 +41,6 @@ class WorkspaceLayoutManagerDelegate { wm::WindowStateType old_type) = 0; }; -} // namespace internal } // namespace ash #endif // ASH_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_DELEGATE_H_ diff --git a/ash/wm/workspace/workspace_layout_manager_unittest.cc b/ash/wm/workspace/workspace_layout_manager_unittest.cc index 1765b09..4af3056 100644 --- a/ash/wm/workspace/workspace_layout_manager_unittest.cc +++ b/ash/wm/workspace/workspace_layout_manager_unittest.cc @@ -371,8 +371,7 @@ TEST_F(WorkspaceLayoutManagerTest, MaximizeWithEmptySize) { NULL)); wm::GetWindowState(window.get())->Maximize(); aura::Window* default_container = Shell::GetContainer( - Shell::GetPrimaryRootWindow(), - internal::kShellWindowId_DefaultContainer); + Shell::GetPrimaryRootWindow(), kShellWindowId_DefaultContainer); default_container->AddChild(window.get()); window->Show(); gfx::Rect work_area( @@ -518,10 +517,9 @@ class WorkspaceLayoutManagerSoloTest : public test::AshTestBase { test::AshTestBase::SetUp(); UpdateDisplay("800x600"); aura::Window* default_container = Shell::GetContainer( - Shell::GetPrimaryRootWindow(), - internal::kShellWindowId_DefaultContainer); - default_container->SetLayoutManager(new internal::WorkspaceLayoutManager( - Shell::GetPrimaryRootWindow())); + Shell::GetPrimaryRootWindow(), kShellWindowId_DefaultContainer); + default_container->SetLayoutManager( + new WorkspaceLayoutManager(Shell::GetPrimaryRootWindow())); } aura::Window* CreateTestWindow(const gfx::Rect& bounds) { @@ -754,8 +752,7 @@ TEST_F(WorkspaceLayoutManagerSoloTest, NotResizeWhenScreenIsLocked) { window->SetProperty(aura::client::kAlwaysOnTopKey, true); window->Show(); - internal::ShelfLayoutManager* shelf = - internal::ShelfLayoutManager::ForShelf(window.get()); + ShelfLayoutManager* shelf = ShelfLayoutManager::ForShelf(window.get()); shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS); window->SetBounds(ScreenUtil::GetMaximizedWindowBoundsInParent(window.get())); @@ -787,9 +784,8 @@ class WorkspaceLayoutManagerBackdropTest : public test::AshTestBase { virtual void SetUp() OVERRIDE { test::AshTestBase::SetUp(); UpdateDisplay("800x600"); - default_container_ = Shell::GetContainer( - Shell::GetPrimaryRootWindow(), - internal::kShellWindowId_DefaultContainer); + default_container_ = Shell::GetContainer(Shell::GetPrimaryRootWindow(), + kShellWindowId_DefaultContainer); // We set the size to something smaller then the display to avoid resizing // issues with the shelf. default_container_->SetBounds(gfx::Rect(0, 0, 800, 500)); @@ -802,14 +798,12 @@ class WorkspaceLayoutManagerBackdropTest : public test::AshTestBase { // Turn the top window back drop on / off. void ShowTopWindowBackdrop(bool show) { - scoped_ptr<ash::internal::WorkspaceLayoutManagerDelegate> backdrop; + scoped_ptr<ash::WorkspaceLayoutManagerDelegate> backdrop; if (show) { - backdrop.reset(new ash::internal::WorkspaceBackdropDelegate( - default_container_)); + backdrop.reset(new ash::WorkspaceBackdropDelegate(default_container_)); } - (static_cast<internal::WorkspaceLayoutManager*> - (default_container_->layout_manager()))->SetMaximizeBackdropDelegate( - backdrop.Pass()); + (static_cast<WorkspaceLayoutManager*>(default_container_->layout_manager())) + ->SetMaximizeBackdropDelegate(backdrop.Pass()); // Closing and / or opening can be a delayed operation. base::MessageLoop::current()->RunUntilIdle(); } diff --git a/ash/wm/workspace/workspace_window_resizer.cc b/ash/wm/workspace/workspace_window_resizer.cc index 6223de3..75fedaa 100644 --- a/ash/wm/workspace/workspace_window_resizer.cc +++ b/ash/wm/workspace/workspace_window_resizer.cc @@ -84,33 +84,27 @@ scoped_ptr<WindowResizer> CreateWindowResizer( window_state->CreateDragDetails(window, point_in_parent, window_component, source); if (window->parent() && - (window->parent()->id() == internal::kShellWindowId_DefaultContainer || - window->parent()->id() == internal::kShellWindowId_DockedContainer || - window->parent()->id() == internal::kShellWindowId_PanelContainer)) { - window_resizer = internal::WorkspaceWindowResizer::Create( - window_state, - std::vector<aura::Window*>()); + (window->parent()->id() == kShellWindowId_DefaultContainer || + window->parent()->id() == kShellWindowId_DockedContainer || + window->parent()->id() == kShellWindowId_PanelContainer)) { + window_resizer = WorkspaceWindowResizer::Create( + window_state, std::vector<aura::Window*>()); } else { window_resizer = DefaultWindowResizer::Create(window_state); } - window_resizer = internal::DragWindowResizer::Create(window_resizer, - window_state); + window_resizer = DragWindowResizer::Create(window_resizer, window_state); if (window->type() == ui::wm::WINDOW_TYPE_PANEL) window_resizer = PanelWindowResizer::Create(window_resizer, window_state); - if (switches::UseDockedWindows() && - window_resizer && window->parent() && + if (switches::UseDockedWindows() && window_resizer && window->parent() && !::wm::GetTransientParent(window) && - (window->parent()->id() == internal::kShellWindowId_DefaultContainer || - window->parent()->id() == internal::kShellWindowId_DockedContainer || - window->parent()->id() == internal::kShellWindowId_PanelContainer)) { - window_resizer = internal::DockedWindowResizer::Create(window_resizer, - window_state); + (window->parent()->id() == kShellWindowId_DefaultContainer || + window->parent()->id() == kShellWindowId_DockedContainer || + window->parent()->id() == kShellWindowId_PanelContainer)) { + window_resizer = DockedWindowResizer::Create(window_resizer, window_state); } return make_scoped_ptr<WindowResizer>(window_resizer); } -namespace internal { - namespace { // Snapping distance used instead of WorkspaceWindowResizer::kScreenEdgeInset @@ -1047,5 +1041,4 @@ bool WorkspaceWindowResizer::AreBoundsValidSnappedBounds( return bounds_in_parent == snapped_bounds; } -} // namespace internal } // namespace ash diff --git a/ash/wm/workspace/workspace_window_resizer.h b/ash/wm/workspace/workspace_window_resizer.h index c16744a..d7d57d087 100644 --- a/ash/wm/workspace/workspace_window_resizer.h +++ b/ash/wm/workspace/workspace_window_resizer.h @@ -17,17 +17,15 @@ #include "ui/aura/window_tracker.h" namespace ash { -namespace wm { -class WindowState; -} - -namespace internal { - class DockedWindowLayoutManager; class PhantomWindowController; class TwoStepEdgeCycler; class WindowSize; +namespace wm { +class WindowState; +} + // WindowResizer implementation for workspaces. This enforces that windows are // not allowed to vertically move or resize outside of the work area. As windows // are moved outside the work area they are shrunk. We remember the height of @@ -222,7 +220,6 @@ class ASH_EXPORT WorkspaceWindowResizer : public WindowResizer { DISALLOW_COPY_AND_ASSIGN(WorkspaceWindowResizer); }; -} // namespace internal } // namespace ash #endif // ASH_WM_WORKSPACE_WINDOW_RESIZER_H_ diff --git a/ash/wm/workspace/workspace_window_resizer_unittest.cc b/ash/wm/workspace/workspace_window_resizer_unittest.cc index 1b1a027..791e843 100644 --- a/ash/wm/workspace/workspace_window_resizer_unittest.cc +++ b/ash/wm/workspace/workspace_window_resizer_unittest.cc @@ -32,7 +32,6 @@ #include "ui/views/widget/widget.h" namespace ash { -namespace internal { namespace { const int kRootHeight = 600; @@ -183,7 +182,7 @@ class WorkspaceWindowResizerTest : public test::AshTestBase { return std::vector<aura::Window*>(); } - internal::ShelfLayoutManager* shelf_layout_manager() { + ShelfLayoutManager* shelf_layout_manager() { return Shell::GetPrimaryRootWindowController()->GetShelfLayoutManager(); } @@ -1874,5 +1873,4 @@ TEST_F(WorkspaceWindowResizerTest, TouchResizeToEdge_BOTTOM) { touch_resize_window_->bounds().ToString()); } -} // namespace internal } // namespace ash diff --git a/ash/wm/workspace_controller.cc b/ash/wm/workspace_controller.cc index 96735be..5d3ae6e 100644 --- a/ash/wm/workspace_controller.cc +++ b/ash/wm/workspace_controller.cc @@ -24,7 +24,6 @@ #include "ui/wm/public/activation_client.h" namespace ash { -namespace internal { namespace { // Amount of time to pause before animating anything. Only used during initial @@ -70,10 +69,8 @@ WorkspaceWindowState WorkspaceController::GetWindowState() const { // These are the container ids of containers which may contain windows that // may overlap the launcher shelf and affect its transparency. - const int kWindowContainerIds[] = { - internal::kShellWindowId_DefaultContainer, - internal::kShellWindowId_DockedContainer, - }; + const int kWindowContainerIds[] = {kShellWindowId_DefaultContainer, + kShellWindowId_DockedContainer, }; const gfx::Rect shelf_bounds(shelf_->GetIdealBounds()); bool window_overlaps_launcher = false; for (size_t idx = 0; idx < arraysize(kWindowContainerIds); idx++) { @@ -141,5 +138,4 @@ void WorkspaceController::SetMaximizeBackdropDelegate( layout_manager_->SetMaximizeBackdropDelegate(delegate.Pass()); } -} // namespace internal } // namespace ash diff --git a/ash/wm/workspace_controller.h b/ash/wm/workspace_controller.h index 175ebe7..0529917 100644 --- a/ash/wm/workspace_controller.h +++ b/ash/wm/workspace_controller.h @@ -15,8 +15,6 @@ class Window; } namespace ash { -namespace internal { - class ShelfLayoutManager; class WorkspaceControllerTestHelper; class WorkspaceEventHandler; @@ -48,14 +46,13 @@ class ASH_EXPORT WorkspaceController { aura::Window* viewport_; - internal::ShelfLayoutManager* shelf_; - scoped_ptr<internal::WorkspaceEventHandler> event_handler_; - internal::WorkspaceLayoutManager* layout_manager_; + ShelfLayoutManager* shelf_; + scoped_ptr<WorkspaceEventHandler> event_handler_; + WorkspaceLayoutManager* layout_manager_; DISALLOW_COPY_AND_ASSIGN(WorkspaceController); }; -} // namespace internal } // namespace ash #endif // ASH_WM_WORKSPACE_CONTROLLER_H_ diff --git a/ash/wm/workspace_controller_test_helper.cc b/ash/wm/workspace_controller_test_helper.cc index 5ecfa2f..9cab7b5 100644 --- a/ash/wm/workspace_controller_test_helper.cc +++ b/ash/wm/workspace_controller_test_helper.cc @@ -9,7 +9,6 @@ #include "ui/aura/window.h" namespace ash { -namespace internal { WorkspaceControllerTestHelper::WorkspaceControllerTestHelper( WorkspaceController* controller) @@ -28,5 +27,4 @@ WorkspaceControllerTestHelper::GetMultiWindowResizeController() { return WorkspaceEventHandlerTestHelper(GetEventHandler()).resize_controller(); } -} // namespace internal } // namespace ash diff --git a/ash/wm/workspace_controller_test_helper.h b/ash/wm/workspace_controller_test_helper.h index ecdcccc..f020c35 100644 --- a/ash/wm/workspace_controller_test_helper.h +++ b/ash/wm/workspace_controller_test_helper.h @@ -8,8 +8,6 @@ #include "ash/wm/workspace_controller.h" namespace ash { -namespace internal { - class MultiWindowResizeController; class WorkspaceEventHandler; @@ -27,7 +25,6 @@ class WorkspaceControllerTestHelper { DISALLOW_COPY_AND_ASSIGN(WorkspaceControllerTestHelper); }; -} // namespace internal } // namespace ash #endif // ASH_WM_WORKSPACE_CONTROLLER_TEST_HELPER_H_ diff --git a/ash/wm/workspace_controller_unittest.cc b/ash/wm/workspace_controller_unittest.cc index 106ba52..09d1c94 100644 --- a/ash/wm/workspace_controller_unittest.cc +++ b/ash/wm/workspace_controller_unittest.cc @@ -41,7 +41,6 @@ using aura::Window; namespace ash { -namespace internal { // Returns a string containing the names of all the children of |window| (in // order). Each entry is separated by a space. @@ -128,11 +127,9 @@ class WorkspaceControllerTest : public test::AshTestBase { test::TestShelfDelegate* shelf_delegate = test::TestShelfDelegate::instance(); shelf_delegate->AddShelfItem(window); - PanelLayoutManager* manager = - static_cast<PanelLayoutManager*>( - Shell::GetContainer(window->GetRootWindow(), - internal::kShellWindowId_PanelContainer)-> - layout_manager()); + PanelLayoutManager* manager = static_cast<PanelLayoutManager*>( + Shell::GetContainer(window->GetRootWindow(), + kShellWindowId_PanelContainer)->layout_manager()); manager->Relayout(); return window; } @@ -1469,7 +1466,7 @@ TEST_F(WorkspaceControllerTest, WindowEdgeHitTestDocked) { 123, gfx::Rect(20, 10, 100, 50), NULL)); ParentWindowInPrimaryRootWindow(window.get()); aura::Window* docked_container = Shell::GetContainer( - window->GetRootWindow(), internal::kShellWindowId_DockedContainer); + window->GetRootWindow(), kShellWindowId_DockedContainer); docked_container->AddChild(window.get()); window->Show(); ui::EventTarget* root = window->GetRootWindow(); @@ -1508,5 +1505,4 @@ TEST_F(WorkspaceControllerTest, WindowEdgeHitTestDocked) { } } -} // namespace internal } // namespace ash |