diff options
Diffstat (limited to 'ash')
-rw-r--r-- | ash/ash.gyp | 56 | ||||
-rw-r--r-- | ash/frame/OWNERS | 1 | ||||
-rw-r--r-- | ash/frame/caption_buttons/alternate_frame_size_button.cc (renamed from ash/wm/caption_buttons/alternate_frame_size_button.cc) | 2 | ||||
-rw-r--r-- | ash/frame/caption_buttons/alternate_frame_size_button.h (renamed from ash/wm/caption_buttons/alternate_frame_size_button.h) | 10 | ||||
-rw-r--r-- | ash/frame/caption_buttons/alternate_frame_size_button_delegate.h (renamed from ash/wm/caption_buttons/alternate_frame_size_button_delegate.h) | 8 | ||||
-rw-r--r-- | ash/frame/caption_buttons/alternate_frame_size_button_unittest.cc (renamed from ash/wm/caption_buttons/alternate_frame_size_button_unittest.cc) | 6 | ||||
-rw-r--r-- | ash/frame/caption_buttons/bubble_contents_button_row.cc (renamed from ash/wm/caption_buttons/bubble_contents_button_row.cc) | 6 | ||||
-rw-r--r-- | ash/frame/caption_buttons/bubble_contents_button_row.h (renamed from ash/wm/caption_buttons/bubble_contents_button_row.h) | 6 | ||||
-rw-r--r-- | ash/frame/caption_buttons/caption_button_types.h (renamed from ash/wm/caption_buttons/caption_button_types.h) | 6 | ||||
-rw-r--r-- | ash/frame/caption_buttons/frame_caption_button.cc (renamed from ash/wm/caption_buttons/frame_caption_button.cc) | 2 | ||||
-rw-r--r-- | ash/frame/caption_buttons/frame_caption_button.h (renamed from ash/wm/caption_buttons/frame_caption_button.h) | 8 | ||||
-rw-r--r-- | ash/frame/caption_buttons/frame_caption_button_container_view.cc (renamed from ash/wm/caption_buttons/frame_caption_button_container_view.cc) | 8 | ||||
-rw-r--r-- | ash/frame/caption_buttons/frame_caption_button_container_view.h (renamed from ash/wm/caption_buttons/frame_caption_button_container_view.h) | 8 | ||||
-rw-r--r-- | ash/frame/caption_buttons/frame_caption_button_container_view_unittest.cc (renamed from ash/wm/caption_buttons/frame_caption_button_container_view_unittest.cc) | 4 | ||||
-rw-r--r-- | ash/frame/caption_buttons/frame_maximize_button.cc (renamed from ash/wm/caption_buttons/frame_maximize_button.cc) | 6 | ||||
-rw-r--r-- | ash/frame/caption_buttons/frame_maximize_button.h (renamed from ash/wm/caption_buttons/frame_maximize_button.h) | 10 | ||||
-rw-r--r-- | ash/frame/caption_buttons/frame_maximize_button_observer.h (renamed from ash/wm/caption_buttons/frame_maximize_button_observer.h) | 6 | ||||
-rw-r--r-- | ash/frame/caption_buttons/frame_maximize_button_unittest.cc (renamed from ash/wm/caption_buttons/frame_maximize_button_unittest.cc) | 6 | ||||
-rw-r--r-- | ash/frame/caption_buttons/maximize_bubble_controller.cc (renamed from ash/wm/caption_buttons/maximize_bubble_controller.cc) | 6 | ||||
-rw-r--r-- | ash/frame/caption_buttons/maximize_bubble_controller.h (renamed from ash/wm/caption_buttons/maximize_bubble_controller.h) | 8 | ||||
-rw-r--r-- | ash/frame/caption_buttons/maximize_bubble_controller_bubble.cc (renamed from ash/wm/caption_buttons/maximize_bubble_controller_bubble.cc) | 8 | ||||
-rw-r--r-- | ash/frame/caption_buttons/maximize_bubble_controller_bubble.h (renamed from ash/wm/caption_buttons/maximize_bubble_controller_bubble.h) | 6 | ||||
-rw-r--r-- | ash/frame/custom_frame_view_ash.cc (renamed from ash/wm/custom_frame_view_ash.cc) | 12 | ||||
-rw-r--r-- | ash/frame/custom_frame_view_ash.h (renamed from ash/wm/custom_frame_view_ash.h) | 6 | ||||
-rw-r--r-- | ash/frame/custom_frame_view_ash_unittest.cc (renamed from ash/wm/custom_frame_view_ash_unittest.cc) | 2 | ||||
-rw-r--r-- | ash/frame/frame_border_hit_test_controller.cc (renamed from ash/wm/frame_border_hit_test_controller.cc) | 4 | ||||
-rw-r--r-- | ash/frame/frame_border_hit_test_controller.h (renamed from ash/wm/frame_border_hit_test_controller.h) | 6 | ||||
-rw-r--r-- | ash/frame/header_painter.cc (renamed from ash/wm/header_painter.cc) | 4 | ||||
-rw-r--r-- | ash/frame/header_painter.h (renamed from ash/wm/header_painter.h) | 6 | ||||
-rw-r--r-- | ash/frame/header_painter_unittest.cc (renamed from ash/wm/header_painter_unittest.cc) | 4 | ||||
-rw-r--r-- | ash/shell.cc | 2 | ||||
-rw-r--r-- | ash/wm/panels/panel_frame_view.cc | 6 | ||||
-rw-r--r-- | ash/wm/resize_shadow_and_cursor_unittest.cc | 2 | ||||
-rw-r--r-- | ash/wm/solo_window_tracker_unittest.cc | 429 |
34 files changed, 121 insertions, 549 deletions
diff --git a/ash/ash.gyp b/ash/ash.gyp index 3bb2b5ebb..b7d8334 100644 --- a/ash/ash.gyp +++ b/ash/ash.gyp @@ -154,6 +154,29 @@ 'first_run/first_run_helper_impl.h', 'focus_cycler.cc', 'focus_cycler.h', + 'frame/caption_buttons/alternate_frame_size_button.cc', + 'frame/caption_buttons/alternate_frame_size_button.h', + 'frame/caption_buttons/alternate_frame_size_button_delegate.h', + 'frame/caption_buttons/bubble_contents_button_row.cc', + 'frame/caption_buttons/bubble_contents_button_row.h', + 'frame/caption_buttons/caption_button_types.h', + 'frame/caption_buttons/frame_caption_button.cc', + 'frame/caption_buttons/frame_caption_button.h', + 'frame/caption_buttons/frame_caption_button_container_view.cc', + 'frame/caption_buttons/frame_caption_button_container_view.h', + 'frame/caption_buttons/frame_maximize_button.cc', + 'frame/caption_buttons/frame_maximize_button.h', + 'frame/caption_buttons/frame_maximize_button_observer.h', + 'frame/caption_buttons/maximize_bubble_controller.cc', + 'frame/caption_buttons/maximize_bubble_controller.h', + 'frame/caption_buttons/maximize_bubble_controller_bubble.cc', + 'frame/caption_buttons/maximize_bubble_controller_bubble.h', + 'frame/custom_frame_view_ash.cc', + 'frame/custom_frame_view_ash.h', + 'frame/frame_border_hit_test_controller.cc', + 'frame/frame_border_hit_test_controller.h', + 'frame/header_painter.cc', + 'frame/header_painter.h', 'gpu_support.h', 'gpu_support_stub.cc', 'gpu_support_stub.h', @@ -478,27 +501,8 @@ 'wm/ash_focus_rules.h', 'wm/boot_splash_screen_chromeos.cc', 'wm/boot_splash_screen_chromeos.h', - 'wm/caption_buttons/alternate_frame_size_button.cc', - 'wm/caption_buttons/alternate_frame_size_button.h', - 'wm/caption_buttons/alternate_frame_size_button_delegate.h', - 'wm/caption_buttons/bubble_contents_button_row.cc', - 'wm/caption_buttons/bubble_contents_button_row.h', - 'wm/caption_buttons/caption_button_types.h', - 'wm/caption_buttons/frame_caption_button.cc', - 'wm/caption_buttons/frame_caption_button.h', - 'wm/caption_buttons/frame_caption_button_container_view.cc', - 'wm/caption_buttons/frame_caption_button_container_view.h', - 'wm/caption_buttons/frame_maximize_button.cc', - 'wm/caption_buttons/frame_maximize_button.h', - 'wm/caption_buttons/frame_maximize_button_observer.h', - 'wm/caption_buttons/maximize_bubble_controller.cc', - 'wm/caption_buttons/maximize_bubble_controller.h', - 'wm/caption_buttons/maximize_bubble_controller_bubble.cc', - 'wm/caption_buttons/maximize_bubble_controller_bubble.h', 'wm/coordinate_conversion.cc', 'wm/coordinate_conversion.h', - 'wm/custom_frame_view_ash.cc', - 'wm/custom_frame_view_ash.h', 'wm/default_state.cc', 'wm/default_state.h', 'wm/default_window_resizer.cc', @@ -516,10 +520,6 @@ 'wm/drag_window_resizer.h', 'wm/event_client_impl.cc', 'wm/event_client_impl.h', - 'wm/frame_border_hit_test_controller.cc', - 'wm/frame_border_hit_test_controller.h', - 'wm/header_painter.cc', - 'wm/header_painter.h', 'wm/gestures/long_press_affordance_handler.cc', 'wm/gestures/long_press_affordance_handler.h', 'wm/gestures/overview_gesture_handler.cc', @@ -873,6 +873,11 @@ 'drag_drop/drag_drop_tracker_unittest.cc', 'extended_desktop_unittest.cc', 'focus_cycler_unittest.cc', + 'frame/caption_buttons/alternate_frame_size_button_unittest.cc', + 'frame/caption_buttons/frame_caption_button_container_view_unittest.cc', + 'frame/caption_buttons/frame_maximize_button_unittest.cc', + 'frame/custom_frame_view_ash_unittest.cc', + 'frame/header_painter_unittest.cc', 'ime/candidate_window_view_unittest.cc', 'ime/input_method_menu_item_unittest.cc', 'ime/input_method_menu_manager_unittest.cc', @@ -936,15 +941,10 @@ 'touch/touch_observer_hud_unittest.cc', 'wm/app_list_controller_unittest.cc', 'wm/ash_native_cursor_manager_unittest.cc', - 'wm/caption_buttons/alternate_frame_size_button_unittest.cc', - 'wm/caption_buttons/frame_caption_button_container_view_unittest.cc', - 'wm/caption_buttons/frame_maximize_button_unittest.cc', - 'wm/custom_frame_view_ash_unittest.cc', 'wm/dock/docked_window_layout_manager_unittest.cc', 'wm/dock/docked_window_resizer_unittest.cc', 'wm/drag_window_resizer_unittest.cc', 'wm/gestures/overview_gesture_handler_unittest.cc', - 'wm/header_painter_unittest.cc', 'wm/immersive_fullscreen_controller_unittest.cc', 'wm/lock_state_controller_unittest.cc', 'wm/maximize_mode/maximize_mode_window_manager_unittest.cc', diff --git a/ash/frame/OWNERS b/ash/frame/OWNERS new file mode 100644 index 0000000..e710530 --- /dev/null +++ b/ash/frame/OWNERS @@ -0,0 +1 @@ +pkotwicz@chromium.org diff --git a/ash/wm/caption_buttons/alternate_frame_size_button.cc b/ash/frame/caption_buttons/alternate_frame_size_button.cc index b8396f1..930fa37 100644 --- a/ash/wm/caption_buttons/alternate_frame_size_button.cc +++ b/ash/frame/caption_buttons/alternate_frame_size_button.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ash/wm/caption_buttons/alternate_frame_size_button.h" +#include "ash/frame/caption_buttons/alternate_frame_size_button.h" #include "ash/metrics/user_metrics_recorder.h" #include "ash/screen_util.h" diff --git a/ash/wm/caption_buttons/alternate_frame_size_button.h b/ash/frame/caption_buttons/alternate_frame_size_button.h index 43eafca..89c9549 100644 --- a/ash/wm/caption_buttons/alternate_frame_size_button.h +++ b/ash/frame/caption_buttons/alternate_frame_size_button.h @@ -2,12 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef ASH_WM_CAPTION_BUTTONS_ALTERNATE_FRAME_SIZE_BUTTON_H_ -#define ASH_WM_CAPTION_BUTTONS_ALTERNATE_FRAME_SIZE_BUTTON_H_ +#ifndef ASH_FRAME_CAPTION_BUTTONS_ALTERNATE_FRAME_SIZE_BUTTON_H_ +#define ASH_FRAME_CAPTION_BUTTONS_ALTERNATE_FRAME_SIZE_BUTTON_H_ #include "ash/ash_export.h" -#include "ash/wm/caption_buttons/alternate_frame_size_button_delegate.h" -#include "ash/wm/caption_buttons/frame_caption_button.h" +#include "ash/frame/caption_buttons/alternate_frame_size_button_delegate.h" +#include "ash/frame/caption_buttons/frame_caption_button.h" #include "ash/wm/workspace/snap_types.h" #include "base/timer/timer.h" @@ -118,4 +118,4 @@ class ASH_EXPORT AlternateFrameSizeButton : public FrameCaptionButton { } // namespace ash -#endif // ASH_WM_CAPTION_BUTTONS_ALTERNATE_FRAME_SIZE_BUTTON_H_ +#endif // ASH_FRAME_CAPTION_BUTTONS_ALTERNATE_FRAME_SIZE_BUTTON_H_ diff --git a/ash/wm/caption_buttons/alternate_frame_size_button_delegate.h b/ash/frame/caption_buttons/alternate_frame_size_button_delegate.h index e3ff85f..050227b 100644 --- a/ash/wm/caption_buttons/alternate_frame_size_button_delegate.h +++ b/ash/frame/caption_buttons/alternate_frame_size_button_delegate.h @@ -2,11 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef ASH_WM_CAPTION_BUTTONS_ALTERNATE_FRAME_SIZE_BUTTON_DELEGATE_H_ -#define ASH_WM_CAPTION_BUTTONS_ALTERNATE_FRAME_SIZE_BUTTON_DELEGATE_H_ +#ifndef ASH_FRAME_CAPTION_BUTTONS_ALTERNATE_FRAME_SIZE_BUTTON_DELEGATE_H_ +#define ASH_FRAME_CAPTION_BUTTONS_ALTERNATE_FRAME_SIZE_BUTTON_DELEGATE_H_ #include "ash/ash_export.h" -#include "ash/wm/caption_buttons/caption_button_types.h" +#include "ash/frame/caption_buttons/caption_button_types.h" namespace gfx { class Insets; @@ -55,4 +55,4 @@ class ASH_EXPORT AlternateFrameSizeButtonDelegate { } // namespace ash -#endif // ASH_WM_CAPTION_BUTTONS_ALTERNATE_FRAME_SIZE_BUTTON_DELEGATE_H_ +#endif // ASH_FRAME_CAPTION_BUTTONS_ALTERNATE_FRAME_SIZE_BUTTON_DELEGATE_H_ diff --git a/ash/wm/caption_buttons/alternate_frame_size_button_unittest.cc b/ash/frame/caption_buttons/alternate_frame_size_button_unittest.cc index c79fe28..92c7bbc 100644 --- a/ash/wm/caption_buttons/alternate_frame_size_button_unittest.cc +++ b/ash/frame/caption_buttons/alternate_frame_size_button_unittest.cc @@ -2,13 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ash/wm/caption_buttons/alternate_frame_size_button.h" +#include "ash/frame/caption_buttons/alternate_frame_size_button.h" #include "ash/ash_switches.h" +#include "ash/frame/caption_buttons/frame_caption_button.h" +#include "ash/frame/caption_buttons/frame_caption_button_container_view.h" #include "ash/shell.h" #include "ash/test/ash_test_base.h" -#include "ash/wm/caption_buttons/frame_caption_button.h" -#include "ash/wm/caption_buttons/frame_caption_button_container_view.h" #include "ash/wm/window_state.h" #include "base/command_line.h" #include "base/i18n/rtl.h" diff --git a/ash/wm/caption_buttons/bubble_contents_button_row.cc b/ash/frame/caption_buttons/bubble_contents_button_row.cc index 6eb9062..761beec 100644 --- a/ash/wm/caption_buttons/bubble_contents_button_row.cc +++ b/ash/frame/caption_buttons/bubble_contents_button_row.cc @@ -2,10 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ash/wm/caption_buttons/bubble_contents_button_row.h" +#include "ash/frame/caption_buttons/bubble_contents_button_row.h" -#include "ash/wm/caption_buttons/maximize_bubble_controller.h" -#include "ash/wm/caption_buttons/maximize_bubble_controller_bubble.h" +#include "ash/frame/caption_buttons/maximize_bubble_controller.h" +#include "ash/frame/caption_buttons/maximize_bubble_controller_bubble.h" #include "grit/ash_resources.h" #include "ui/base/resource/resource_bundle.h" #include "ui/views/controls/button/image_button.h" diff --git a/ash/wm/caption_buttons/bubble_contents_button_row.h b/ash/frame/caption_buttons/bubble_contents_button_row.h index 5f6e8d1..e3bfc61 100644 --- a/ash/wm/caption_buttons/bubble_contents_button_row.h +++ b/ash/frame/caption_buttons/bubble_contents_button_row.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef ASH_WM_CAPTION_BUTTONS_BUBBLE_CONTENTS_BUTTON_ROW_H_ -#define ASH_WM_CAPTION_BUTTONS_BUBBLE_CONTENTS_BUTTON_ROW_H_ +#ifndef ASH_FRAME_CAPTION_BUTTONS_BUBBLE_CONTENTS_BUTTON_ROW_H_ +#define ASH_FRAME_CAPTION_BUTTONS_BUBBLE_CONTENTS_BUTTON_ROW_H_ #include "ash/wm/workspace/snap_types.h" #include "ui/views/controls/button/button.h" @@ -56,4 +56,4 @@ class BubbleContentsButtonRow : public views::View, } // namespace ash -#endif // ASH_WM_CAPTION_BUTTONS_BUBBLE_CONTENTS_BUTTON_ROW_H_ +#endif // ASH_FRAME_CAPTION_BUTTONS_BUBBLE_CONTENTS_BUTTON_ROW_H_ diff --git a/ash/wm/caption_buttons/caption_button_types.h b/ash/frame/caption_buttons/caption_button_types.h index 81c4f35..b481a02 100644 --- a/ash/wm/caption_buttons/caption_button_types.h +++ b/ash/frame/caption_buttons/caption_button_types.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef ASH_WM_CAPTION_BUTTONS_CAPTION_BUTTON_TYPES_H_ -#define ASH_WM_CAPTION_BUTTONS_CAPTION_BUTTON_TYPES_H_ +#ifndef ASH_FRAME_CAPTION_BUTTONS_CAPTION_BUTTON_TYPES_H_ +#define ASH_FRAME_CAPTION_BUTTONS_CAPTION_BUTTON_TYPES_H_ namespace ash { @@ -28,4 +28,4 @@ enum CaptionButtonIcon { } // namespace ash -#endif // ASH_WM_CAPTION_BUTTONS_CAPTION_BUTTON_TYPES_H_ +#endif // ASH_FRAME_CAPTION_BUTTONS_CAPTION_BUTTON_TYPES_H_ diff --git a/ash/wm/caption_buttons/frame_caption_button.cc b/ash/frame/caption_buttons/frame_caption_button.cc index 4852ebc..f7ecc2a 100644 --- a/ash/wm/caption_buttons/frame_caption_button.cc +++ b/ash/frame/caption_buttons/frame_caption_button.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ash/wm/caption_buttons/frame_caption_button.h" +#include "ash/frame/caption_buttons/frame_caption_button.h" #include "ui/base/resource/resource_bundle.h" #include "ui/gfx/animation/slide_animation.h" diff --git a/ash/wm/caption_buttons/frame_caption_button.h b/ash/frame/caption_buttons/frame_caption_button.h index 90cf065..f9a4de1 100644 --- a/ash/wm/caption_buttons/frame_caption_button.h +++ b/ash/frame/caption_buttons/frame_caption_button.h @@ -2,11 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef ASH_WM_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_H_ -#define ASH_WM_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_H_ +#ifndef ASH_FRAME_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_H_ +#define ASH_FRAME_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_H_ #include "ash/ash_export.h" -#include "ash/wm/caption_buttons/caption_button_types.h" +#include "ash/frame/caption_buttons/caption_button_types.h" #include "base/memory/scoped_ptr.h" #include "ui/gfx/image/image_skia.h" #include "ui/views/controls/button/custom_button.h" @@ -100,4 +100,4 @@ class ASH_EXPORT FrameCaptionButton : public views::CustomButton { } // namespace ash -#endif // ASH_WM_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_H_ +#endif // ASH_FRAME_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_H_ diff --git a/ash/wm/caption_buttons/frame_caption_button_container_view.cc b/ash/frame/caption_buttons/frame_caption_button_container_view.cc index a6b02bf..6d2b424 100644 --- a/ash/wm/caption_buttons/frame_caption_button_container_view.cc +++ b/ash/frame/caption_buttons/frame_caption_button_container_view.cc @@ -2,16 +2,16 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ash/wm/caption_buttons/frame_caption_button_container_view.h" +#include "ash/frame/caption_buttons/frame_caption_button_container_view.h" #include <cmath> #include "ash/ash_switches.h" +#include "ash/frame/caption_buttons/alternate_frame_size_button.h" +#include "ash/frame/caption_buttons/frame_caption_button.h" +#include "ash/frame/caption_buttons/frame_maximize_button.h" #include "ash/metrics/user_metrics_recorder.h" #include "ash/shell.h" -#include "ash/wm/caption_buttons/alternate_frame_size_button.h" -#include "ash/wm/caption_buttons/frame_caption_button.h" -#include "ash/wm/caption_buttons/frame_maximize_button.h" #include "grit/ui_strings.h" // Accessibility names #include "ui/base/hit_test.h" #include "ui/base/l10n/l10n_util.h" diff --git a/ash/wm/caption_buttons/frame_caption_button_container_view.h b/ash/frame/caption_buttons/frame_caption_button_container_view.h index 29399f8..9324ca2 100644 --- a/ash/wm/caption_buttons/frame_caption_button_container_view.h +++ b/ash/frame/caption_buttons/frame_caption_button_container_view.h @@ -2,11 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef ASH_WM_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_CONTAINER_VIEW_H_ -#define ASH_WM_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_CONTAINER_VIEW_H_ +#ifndef ASH_FRAME_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_CONTAINER_VIEW_H_ +#define ASH_FRAME_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_CONTAINER_VIEW_H_ #include "ash/ash_export.h" -#include "ash/wm/caption_buttons/alternate_frame_size_button_delegate.h" +#include "ash/frame/caption_buttons/alternate_frame_size_button_delegate.h" #include "ui/views/controls/button/button.h" #include "ui/views/view.h" @@ -155,4 +155,4 @@ class ASH_EXPORT FrameCaptionButtonContainerView } // namesapace ash -#endif // ASH_WM_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_CONTAINER_VIEW_H_ +#endif // ASH_FRAME_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_CONTAINER_VIEW_H_ diff --git a/ash/wm/caption_buttons/frame_caption_button_container_view_unittest.cc b/ash/frame/caption_buttons/frame_caption_button_container_view_unittest.cc index 89b1d4f..c0317bf 100644 --- a/ash/wm/caption_buttons/frame_caption_button_container_view_unittest.cc +++ b/ash/frame/caption_buttons/frame_caption_button_container_view_unittest.cc @@ -2,11 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ash/wm/caption_buttons/frame_caption_button_container_view.h" +#include "ash/frame/caption_buttons/frame_caption_button_container_view.h" #include "ash/ash_switches.h" +#include "ash/frame/caption_buttons/frame_caption_button.h" #include "ash/test/ash_test_base.h" -#include "ash/wm/caption_buttons/frame_caption_button.h" #include "base/command_line.h" #include "grit/ash_resources.h" #include "ui/aura/window_event_dispatcher.h" diff --git a/ash/wm/caption_buttons/frame_maximize_button.cc b/ash/frame/caption_buttons/frame_maximize_button.cc index 9d631ad..9341251 100644 --- a/ash/wm/caption_buttons/frame_maximize_button.cc +++ b/ash/frame/caption_buttons/frame_maximize_button.cc @@ -2,15 +2,15 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ash/wm/caption_buttons/frame_maximize_button.h" +#include "ash/frame/caption_buttons/frame_maximize_button.h" +#include "ash/frame/caption_buttons/frame_maximize_button_observer.h" +#include "ash/frame/caption_buttons/maximize_bubble_controller.h" #include "ash/metrics/user_metrics_recorder.h" #include "ash/screen_util.h" #include "ash/shelf/shelf_widget.h" #include "ash/shell.h" #include "ash/touch/touch_uma.h" -#include "ash/wm/caption_buttons/frame_maximize_button_observer.h" -#include "ash/wm/caption_buttons/maximize_bubble_controller.h" #include "ash/wm/window_animations.h" #include "ash/wm/window_state.h" #include "ash/wm/window_util.h" diff --git a/ash/wm/caption_buttons/frame_maximize_button.h b/ash/frame/caption_buttons/frame_maximize_button.h index f751aa3..0cfe224 100644 --- a/ash/wm/caption_buttons/frame_maximize_button.h +++ b/ash/frame/caption_buttons/frame_maximize_button.h @@ -2,12 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef ASH_WM_CAPTION_BUTTONS_FRAME_MAXIMIZE_BUTTON_H_ -#define ASH_WM_CAPTION_BUTTONS_FRAME_MAXIMIZE_BUTTON_H_ +#ifndef ASH_FRAME_CAPTION_BUTTONS_FRAME_MAXIMIZE_BUTTON_H_ +#define ASH_FRAME_CAPTION_BUTTONS_FRAME_MAXIMIZE_BUTTON_H_ #include "ash/ash_export.h" -#include "ash/wm/caption_buttons/caption_button_types.h" -#include "ash/wm/caption_buttons/frame_caption_button.h" +#include "ash/frame/caption_buttons/caption_button_types.h" +#include "ash/frame/caption_buttons/frame_caption_button.h" #include "ash/wm/workspace/snap_types.h" #include "base/memory/scoped_ptr.h" #include "base/observer_list.h" @@ -175,4 +175,4 @@ class ASH_EXPORT FrameMaximizeButton : public FrameCaptionButton, } // namespace ash -#endif // ASH_WM_CAPTION_BUTTONS_FRAME_MAXIMIZE_BUTTON_H_ +#endif // ASH_FRAME_CAPTION_BUTTONS_FRAME_MAXIMIZE_BUTTON_H_ diff --git a/ash/wm/caption_buttons/frame_maximize_button_observer.h b/ash/frame/caption_buttons/frame_maximize_button_observer.h index 1962f60..57bdd47 100644 --- a/ash/wm/caption_buttons/frame_maximize_button_observer.h +++ b/ash/frame/caption_buttons/frame_maximize_button_observer.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef ASH_WM_CAPTION_BUTTONS_FRAME_MAXIMIZE_BUTTON_OBSERVER_H_ -#define ASH_WM_CAPTION_BUTTONS_FRAME_MAXIMIZE_BUTTON_OBSERVER_H_ +#ifndef ASH_FRAME_CAPTION_BUTTONS_FRAME_MAXIMIZE_BUTTON_OBSERVER_H_ +#define ASH_FRAME_CAPTION_BUTTONS_FRAME_MAXIMIZE_BUTTON_OBSERVER_H_ #include "ash/ash_export.h" @@ -23,4 +23,4 @@ class ASH_EXPORT FrameMaximizeButtonObserver { } // namespace ash -#endif // ASH_WM_CAPTION_BUTTONS_FRAME_MAXIMIZE_BUTTON_OBSERVER_H_ +#endif // ASH_FRAME_CAPTION_BUTTONS_FRAME_MAXIMIZE_BUTTON_OBSERVER_H_ diff --git a/ash/wm/caption_buttons/frame_maximize_button_unittest.cc b/ash/frame/caption_buttons/frame_maximize_button_unittest.cc index 23b60f5..06305d1 100644 --- a/ash/wm/caption_buttons/frame_maximize_button_unittest.cc +++ b/ash/frame/caption_buttons/frame_maximize_button_unittest.cc @@ -2,13 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ash/wm/caption_buttons/frame_maximize_button.h" +#include "ash/frame/caption_buttons/frame_maximize_button.h" #include "ash/ash_switches.h" +#include "ash/frame/caption_buttons/frame_caption_button_container_view.h" +#include "ash/frame/caption_buttons/maximize_bubble_controller.h" #include "ash/shell.h" #include "ash/test/ash_test_base.h" -#include "ash/wm/caption_buttons/frame_caption_button_container_view.h" -#include "ash/wm/caption_buttons/maximize_bubble_controller.h" #include "ash/wm/window_state.h" #include "ash/wm/window_util.h" #include "base/command_line.h" diff --git a/ash/wm/caption_buttons/maximize_bubble_controller.cc b/ash/frame/caption_buttons/maximize_bubble_controller.cc index f01d0e2..9b353dd 100644 --- a/ash/wm/caption_buttons/maximize_bubble_controller.cc +++ b/ash/frame/caption_buttons/maximize_bubble_controller.cc @@ -2,10 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ash/wm/caption_buttons/maximize_bubble_controller.h" +#include "ash/frame/caption_buttons/maximize_bubble_controller.h" -#include "ash/wm/caption_buttons/frame_maximize_button.h" -#include "ash/wm/caption_buttons/maximize_bubble_controller_bubble.h" +#include "ash/frame/caption_buttons/frame_maximize_button.h" +#include "ash/frame/caption_buttons/maximize_bubble_controller_bubble.h" #include "base/timer/timer.h" diff --git a/ash/wm/caption_buttons/maximize_bubble_controller.h b/ash/frame/caption_buttons/maximize_bubble_controller.h index 53a07dd..4ed03b8 100644 --- a/ash/wm/caption_buttons/maximize_bubble_controller.h +++ b/ash/frame/caption_buttons/maximize_bubble_controller.h @@ -2,11 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef ASH_WM_CAPTION_BUTTONS_MAXIMIZE_BUBBLE_CONTROLLER_H_ -#define ASH_WM_CAPTION_BUTTONS_MAXIMIZE_BUBBLE_CONTROLLER_H_ +#ifndef ASH_FRAME_CAPTION_BUTTONS_MAXIMIZE_BUBBLE_CONTROLLER_H_ +#define ASH_FRAME_CAPTION_BUTTONS_MAXIMIZE_BUBBLE_CONTROLLER_H_ #include "ash/ash_export.h" -#include "ash/wm/caption_buttons/caption_button_types.h" +#include "ash/frame/caption_buttons/caption_button_types.h" #include "ash/wm/workspace/snap_types.h" #include "base/memory/scoped_ptr.h" @@ -101,4 +101,4 @@ class ASH_EXPORT MaximizeBubbleController { } // namespace ash -#endif // ASH_WM_CAPTION_BUTTONS_MAXIMIZE_BUBBLE_CONTROLLER_H_ +#endif // ASH_FRAME_CAPTION_BUTTONS_MAXIMIZE_BUBBLE_CONTROLLER_H_ diff --git a/ash/wm/caption_buttons/maximize_bubble_controller_bubble.cc b/ash/frame/caption_buttons/maximize_bubble_controller_bubble.cc index 2753659..b74b32d 100644 --- a/ash/wm/caption_buttons/maximize_bubble_controller_bubble.cc +++ b/ash/frame/caption_buttons/maximize_bubble_controller_bubble.cc @@ -2,14 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ash/wm/caption_buttons/maximize_bubble_controller_bubble.h" +#include "ash/frame/caption_buttons/maximize_bubble_controller_bubble.h" +#include "ash/frame/caption_buttons/bubble_contents_button_row.h" +#include "ash/frame/caption_buttons/frame_maximize_button.h" +#include "ash/frame/caption_buttons/maximize_bubble_controller.h" #include "ash/metrics/user_metrics_recorder.h" #include "ash/shell.h" #include "ash/shell_window_ids.h" -#include "ash/wm/caption_buttons/bubble_contents_button_row.h" -#include "ash/wm/caption_buttons/frame_maximize_button.h" -#include "ash/wm/caption_buttons/maximize_bubble_controller.h" #include "grit/ash_strings.h" #include "ui/base/resource/resource_bundle.h" #include "ui/gfx/canvas.h" diff --git a/ash/wm/caption_buttons/maximize_bubble_controller_bubble.h b/ash/frame/caption_buttons/maximize_bubble_controller_bubble.h index 39f7ee2..f2e25d6 100644 --- a/ash/wm/caption_buttons/maximize_bubble_controller_bubble.h +++ b/ash/frame/caption_buttons/maximize_bubble_controller_bubble.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef ASH_WM_CAPTION_BUTTONS_MAXIMIZE_BUBBLE_CONTROLLER_BUBBLE_H_ -#define ASH_WM_CAPTION_BUTTONS_MAXIMIZE_BUBBLE_CONTROLLER_BUBBLE_H_ +#ifndef ASH_FRAME_CAPTION_BUTTONS_MAXIMIZE_BUBBLE_CONTROLLER_BUBBLE_H_ +#define ASH_FRAME_CAPTION_BUTTONS_MAXIMIZE_BUBBLE_CONTROLLER_BUBBLE_H_ #include "ash/wm/workspace/snap_types.h" #include "ui/views/bubble/bubble_delegate.h" @@ -99,4 +99,4 @@ class MaximizeBubbleControllerBubble : public views::BubbleDelegateView, } // namespace ash -#endif // ASH_WM_CAPTION_BUTTONS_MAXIMIZE_BUBBLE_CONTROLLER_BUBBLE_H_ +#endif // ASH_FRAME_CAPTION_BUTTONS_MAXIMIZE_BUBBLE_CONTROLLER_BUBBLE_H_ diff --git a/ash/wm/custom_frame_view_ash.cc b/ash/frame/custom_frame_view_ash.cc index 4eb5c8f..e810bdb 100644 --- a/ash/wm/custom_frame_view_ash.cc +++ b/ash/frame/custom_frame_view_ash.cc @@ -2,14 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ash/wm/custom_frame_view_ash.h" +#include "ash/frame/custom_frame_view_ash.h" #include "ash/ash_switches.h" -#include "ash/wm/caption_buttons/frame_caption_button_container_view.h" -#include "ash/wm/caption_buttons/frame_maximize_button.h" -#include "ash/wm/caption_buttons/frame_maximize_button_observer.h" -#include "ash/wm/frame_border_hit_test_controller.h" -#include "ash/wm/header_painter.h" +#include "ash/frame/caption_buttons/frame_caption_button_container_view.h" +#include "ash/frame/caption_buttons/frame_maximize_button.h" +#include "ash/frame/caption_buttons/frame_maximize_button_observer.h" +#include "ash/frame/frame_border_hit_test_controller.h" +#include "ash/frame/header_painter.h" #include "ash/wm/immersive_fullscreen_controller.h" #include "ash/wm/window_state.h" #include "ash/wm/window_state_delegate.h" diff --git a/ash/wm/custom_frame_view_ash.h b/ash/frame/custom_frame_view_ash.h index c7b09f1..9a87e71 100644 --- a/ash/wm/custom_frame_view_ash.h +++ b/ash/frame/custom_frame_view_ash.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef ASH_WM_CUSTOM_FRAME_VIEW_ASH_H_ -#define ASH_WM_CUSTOM_FRAME_VIEW_ASH_H_ +#ifndef ASH_FRAME_CUSTOM_FRAME_VIEW_ASH_H_ +#define ASH_FRAME_CUSTOM_FRAME_VIEW_ASH_H_ #include "ash/ash_export.h" #include "base/memory/scoped_ptr.h" @@ -85,4 +85,4 @@ class ASH_EXPORT CustomFrameViewAsh : public views::NonClientFrameView { } // namespace ash -#endif // ASH_WM_CUSTOM_FRAME_VIEW_ASH_H_ +#endif // ASH_FRAME_CUSTOM_FRAME_VIEW_ASH_H_ diff --git a/ash/wm/custom_frame_view_ash_unittest.cc b/ash/frame/custom_frame_view_ash_unittest.cc index 953b55c..014f586 100644 --- a/ash/wm/custom_frame_view_ash_unittest.cc +++ b/ash/frame/custom_frame_view_ash_unittest.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ash/wm/custom_frame_view_ash.h" +#include "ash/frame/custom_frame_view_ash.h" #include "ash/test/ash_test_base.h" #include "base/memory/scoped_ptr.h" diff --git a/ash/wm/frame_border_hit_test_controller.cc b/ash/frame/frame_border_hit_test_controller.cc index 238a977..228db6b 100644 --- a/ash/wm/frame_border_hit_test_controller.cc +++ b/ash/frame/frame_border_hit_test_controller.cc @@ -2,10 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ash/wm/frame_border_hit_test_controller.h" +#include "ash/frame/frame_border_hit_test_controller.h" #include "ash/ash_constants.h" -#include "ash/wm/header_painter.h" +#include "ash/frame/header_painter.h" #include "ash/wm/resize_handle_window_targeter.h" #include "ash/wm/window_state_observer.h" #include "ui/aura/env.h" diff --git a/ash/wm/frame_border_hit_test_controller.h b/ash/frame/frame_border_hit_test_controller.h index 126f406..1fef389 100644 --- a/ash/wm/frame_border_hit_test_controller.h +++ b/ash/frame/frame_border_hit_test_controller.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef ASH_WM_FRAME_BORDER_HITTEST_CONTROLLER_H_ -#define ASH_WM_FRAME_BORDER_HITTEST_CONTROLLER_H_ +#ifndef ASH_FRAME_FRAME_BORDER_HITTEST_CONTROLLER_H_ +#define ASH_FRAME_FRAME_BORDER_HITTEST_CONTROLLER_H_ #include "ash/ash_export.h" #include "base/basictypes.h" @@ -46,4 +46,4 @@ class ASH_EXPORT FrameBorderHitTestController { } // namespace ash -#endif // ASH_WM_FRAME_BORDER_HITTEST_CONTROLLER_H_ +#endif // ASH_FRAME_FRAME_BORDER_HITTEST_CONTROLLER_H_ diff --git a/ash/wm/header_painter.cc b/ash/frame/header_painter.cc index c6db020..6e18d95 100644 --- a/ash/wm/header_painter.cc +++ b/ash/frame/header_painter.cc @@ -2,11 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ash/wm/header_painter.h" +#include "ash/frame/header_painter.h" #include <vector> -#include "ash/wm/caption_buttons/frame_caption_button_container_view.h" +#include "ash/frame/caption_buttons/frame_caption_button_container_view.h" #include "base/logging.h" // DCHECK #include "grit/ash_resources.h" #include "third_party/skia/include/core/SkCanvas.h" diff --git a/ash/wm/header_painter.h b/ash/frame/header_painter.h index dd9f5f2..5207583 100644 --- a/ash/wm/header_painter.h +++ b/ash/frame/header_painter.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef ASH_WM_HEADER_PAINTER_H_ -#define ASH_WM_HEADER_PAINTER_H_ +#ifndef ASH_FRAME_HEADER_PAINTER_H_ +#define ASH_FRAME_HEADER_PAINTER_H_ #include "ash/ash_export.h" #include "base/basictypes.h" @@ -180,4 +180,4 @@ class ASH_EXPORT HeaderPainter : public gfx::AnimationDelegate { } // namespace ash -#endif // ASH_WM_HEADER_PAINTER_H_ +#endif // ASH_FRAME_HEADER_PAINTER_H_ diff --git a/ash/wm/header_painter_unittest.cc b/ash/frame/header_painter_unittest.cc index 6156214..91523d63 100644 --- a/ash/wm/header_painter_unittest.cc +++ b/ash/frame/header_painter_unittest.cc @@ -2,11 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ash/wm/header_painter.h" +#include "ash/frame/header_painter.h" +#include "ash/frame/caption_buttons/frame_caption_button_container_view.h" #include "ash/shell.h" #include "ash/test/ash_test_base.h" -#include "ash/wm/caption_buttons/frame_caption_button_container_view.h" #include "ash/wm/window_state.h" #include "base/memory/scoped_ptr.h" #include "grit/ash_resources.h" diff --git a/ash/shell.cc b/ash/shell.cc index ee56b83..a2bbd0a 100644 --- a/ash/shell.cc +++ b/ash/shell.cc @@ -26,6 +26,7 @@ #include "ash/drag_drop/drag_drop_controller.h" #include "ash/first_run/first_run_helper_impl.h" #include "ash/focus_cycler.h" +#include "ash/frame/custom_frame_view_ash.h" #include "ash/gpu_support.h" #include "ash/high_contrast/high_contrast_controller.h" #include "ash/host/window_tree_host_factory.h" @@ -55,7 +56,6 @@ #include "ash/wm/ash_focus_rules.h" #include "ash/wm/ash_native_cursor_manager.h" #include "ash/wm/coordinate_conversion.h" -#include "ash/wm/custom_frame_view_ash.h" #include "ash/wm/event_client_impl.h" #include "ash/wm/lock_state_controller.h" #include "ash/wm/maximize_mode/maximize_mode_window_manager.h" diff --git a/ash/wm/panels/panel_frame_view.cc b/ash/wm/panels/panel_frame_view.cc index 73d10b4..9188dc8 100644 --- a/ash/wm/panels/panel_frame_view.cc +++ b/ash/wm/panels/panel_frame_view.cc @@ -4,9 +4,9 @@ #include "ash/wm/panels/panel_frame_view.h" -#include "ash/wm/caption_buttons/frame_caption_button_container_view.h" -#include "ash/wm/frame_border_hit_test_controller.h" -#include "ash/wm/header_painter.h" +#include "ash/frame/caption_buttons/frame_caption_button_container_view.h" +#include "ash/frame/frame_border_hit_test_controller.h" +#include "ash/frame/header_painter.h" #include "grit/ash_resources.h" #include "ui/base/hit_test.h" #include "ui/base/l10n/l10n_util.h" diff --git a/ash/wm/resize_shadow_and_cursor_unittest.cc b/ash/wm/resize_shadow_and_cursor_unittest.cc index ba34050..6431409 100644 --- a/ash/wm/resize_shadow_and_cursor_unittest.cc +++ b/ash/wm/resize_shadow_and_cursor_unittest.cc @@ -3,10 +3,10 @@ // found in the LICENSE file. #include "ash/ash_constants.h" +#include "ash/frame/custom_frame_view_ash.h" #include "ash/shell.h" #include "ash/test/ash_test_base.h" #include "ash/test/cursor_manager_test_api.h" -#include "ash/wm/custom_frame_view_ash.h" #include "ash/wm/resize_shadow.h" #include "ash/wm/resize_shadow_controller.h" #include "ash/wm/window_state.h" diff --git a/ash/wm/solo_window_tracker_unittest.cc b/ash/wm/solo_window_tracker_unittest.cc deleted file mode 100644 index 08ac7ee..0000000 --- a/ash/wm/solo_window_tracker_unittest.cc +++ /dev/null @@ -1,429 +0,0 @@ -// Copyright 2013 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "ash/wm/solo_window_tracker.h" - -#include "ash/ash_constants.h" -#include "ash/ash_switches.h" -#include "ash/root_window_controller.h" -#include "ash/screen_ash.h" -#include "ash/shell.h" -#include "ash/shell_window_ids.h" -#include "ash/test/ash_test_base.h" -#include "ash/wm/window_resizer.h" -#include "ash/wm/window_state.h" -#include "base/memory/scoped_ptr.h" -#include "ui/aura/client/aura_constants.h" -#include "ui/aura/test/event_generator.h" -#include "ui/aura/window.h" -#include "ui/aura/window_event_dispatcher.h" -#include "ui/aura/window_observer.h" -#include "ui/base/hit_test.h" -#include "ui/gfx/screen.h" - -namespace ash { - -namespace { - -class WindowRepaintChecker : public aura::WindowObserver { - public: - explicit WindowRepaintChecker(aura::Window* window) - : window_(window), - is_paint_scheduled_(false) { - window_->AddObserver(this); - } - - virtual ~WindowRepaintChecker() { - if (window_) - window_->RemoveObserver(this); - } - - bool IsPaintScheduledAndReset() { - bool result = is_paint_scheduled_; - is_paint_scheduled_ = false; - return result; - } - - private: - // aura::WindowObserver overrides: - virtual void OnWindowPaintScheduled(aura::Window* window, - const gfx::Rect& region) OVERRIDE { - is_paint_scheduled_ = true; - } - virtual void OnWindowDestroyed(aura::Window* window) OVERRIDE { - DCHECK_EQ(window_, window); - window_ = NULL; - } - - aura::Window* window_; - bool is_paint_scheduled_; - - DISALLOW_COPY_AND_ASSIGN(WindowRepaintChecker); -}; - -} // namespace - -class SoloWindowTrackerTest : public test::AshTestBase { - public: - SoloWindowTrackerTest() { - } - virtual ~SoloWindowTrackerTest() { - } - - // Helpers methods to create test windows in the primary root window. - aura::Window* CreateWindowInPrimary() { - aura::Window* window = new aura::Window(NULL); - window->SetType(ui::wm::WINDOW_TYPE_NORMAL); - window->Init(aura::WINDOW_LAYER_TEXTURED); - window->SetBounds(gfx::Rect(100, 100)); - ParentWindowInPrimaryRootWindow(window); - return window; - } - aura::Window* CreateAlwaysOnTopWindowInPrimary() { - aura::Window* window = new aura::Window(NULL); - window->SetType(ui::wm::WINDOW_TYPE_NORMAL); - window->Init(aura::WINDOW_LAYER_TEXTURED); - window->SetBounds(gfx::Rect(100, 100)); - window->SetProperty(aura::client::kAlwaysOnTopKey, true); - ParentWindowInPrimaryRootWindow(window); - return window; - } - aura::Window* CreatePanelWindowInPrimary() { - aura::Window* window = new aura::Window(NULL); - window->SetType(ui::wm::WINDOW_TYPE_PANEL); - window->Init(aura::WINDOW_LAYER_TEXTURED); - window->SetBounds(gfx::Rect(100, 100)); - ParentWindowInPrimaryRootWindow(window); - return window; - } - - // Drag |window| to the dock. - void DockWindow(aura::Window* window) { - // Because the tests use windows without delegates, - // aura::test::EventGenerator cannot be used. - gfx::Point drag_to = - ash::ScreenUtil::GetDisplayBoundsInParent(window).top_right(); - scoped_ptr<WindowResizer> resizer(CreateWindowResizer( - window, - window->bounds().origin(), - HTCAPTION, - aura::client::WINDOW_MOVE_SOURCE_MOUSE)); - resizer->Drag(drag_to, 0); - resizer->CompleteDrag(); - EXPECT_EQ(internal::kShellWindowId_DockedContainer, - window->parent()->id()); - } - - // Drag |window| out of the dock. - void UndockWindow(aura::Window* window) { - gfx::Point drag_to = - ash::ScreenUtil::GetDisplayWorkAreaBoundsInParent(window).top_right() - - gfx::Vector2d(10, 0); - scoped_ptr<WindowResizer> resizer(CreateWindowResizer( - window, - window->bounds().origin(), - HTCAPTION, - aura::client::WINDOW_MOVE_SOURCE_MOUSE)); - resizer->Drag(drag_to, 0); - resizer->CompleteDrag(); - EXPECT_NE(internal::kShellWindowId_DockedContainer, - window->parent()->id()); - } - - // Returns the primary display. - gfx::Display GetPrimaryDisplay() { - return ash::Shell::GetInstance()->GetScreen()->GetPrimaryDisplay(); - } - - // Returns the secondary display. - gfx::Display GetSecondaryDisplay() { - return ScreenUtil::GetSecondaryDisplay(); - } - - // Returns the window which uses the solo header, if any, on the primary - // display. - aura::Window* GetWindowWithSoloHeaderInPrimary() { - return GetWindowWithSoloHeader(Shell::GetPrimaryRootWindow()); - } - - // Returns the window which uses the solo header, if any, in |root|. - aura::Window* GetWindowWithSoloHeader(aura::Window* root) { - SoloWindowTracker* solo_window_tracker = - internal::GetRootWindowController(root)->solo_window_tracker(); - return solo_window_tracker ? - solo_window_tracker->GetWindowWithSoloHeader() : NULL; - } - - private: - DISALLOW_COPY_AND_ASSIGN(SoloWindowTrackerTest); -}; - -TEST_F(SoloWindowTrackerTest, Basic) { - scoped_ptr<aura::Window> w1(CreateWindowInPrimary()); - w1->Show(); - - // We only have one window, so it should use a solo header. - EXPECT_EQ(w1.get(), GetWindowWithSoloHeaderInPrimary()); - - // Create a second window. - scoped_ptr<aura::Window> w2(CreateWindowInPrimary()); - w2->Show(); - - // Now there are two windows, so we should not use solo headers. - EXPECT_EQ(NULL, GetWindowWithSoloHeaderInPrimary()); - - // Hide one window. Solo should be enabled. - w2->Hide(); - EXPECT_EQ(w1.get(), GetWindowWithSoloHeaderInPrimary()); - - // Show that window. Solo should be disabled. - w2->Show(); - EXPECT_EQ(NULL, GetWindowWithSoloHeaderInPrimary()); - - // Minimize the first window. Solo should be enabled. - wm::GetWindowState(w1.get())->Minimize(); - EXPECT_EQ(w2.get(), GetWindowWithSoloHeaderInPrimary()); - - // Close the minimized window. - w1.reset(); - EXPECT_EQ(w2.get(), GetWindowWithSoloHeaderInPrimary()); - - // Open an always-on-top window (which lives in a different container). - scoped_ptr<aura::Window> w3(CreateAlwaysOnTopWindowInPrimary()); - w3->Show(); - EXPECT_EQ(NULL, GetWindowWithSoloHeaderInPrimary()); - - // Close the always-on-top window. - w3.reset(); - EXPECT_EQ(w2.get(), GetWindowWithSoloHeaderInPrimary()); -} - -// Test that docked windows never use the solo header and that the presence of a -// docked window prevents all other windows from the using the solo window -// header. -TEST_F(SoloWindowTrackerTest, DockedWindow) { - if (!switches::UseDockedWindows() || !SupportsHostWindowResize()) - return; - - scoped_ptr<aura::Window> w1(CreateWindowInPrimary()); - w1->Show(); - EXPECT_EQ(w1.get(), GetWindowWithSoloHeaderInPrimary()); - - DockWindow(w1.get()); - EXPECT_EQ(NULL, GetWindowWithSoloHeaderInPrimary()); - - UndockWindow(w1.get()); - EXPECT_EQ(w1.get(), GetWindowWithSoloHeaderInPrimary()); - - scoped_ptr<aura::Window> w2(CreateWindowInPrimary()); - w2->Show(); - EXPECT_EQ(NULL, GetWindowWithSoloHeaderInPrimary()); - - DockWindow(w2.get()); - EXPECT_EQ(NULL, GetWindowWithSoloHeaderInPrimary()); - - wm::GetWindowState(w2.get())->Minimize(); - EXPECT_EQ(w1.get(), GetWindowWithSoloHeaderInPrimary()); -} - -// Panels should not "count" for computing solo window headers, and the panel -// itself should never use the solo header. -TEST_F(SoloWindowTrackerTest, Panel) { - scoped_ptr<aura::Window> w1(CreateWindowInPrimary()); - w1->Show(); - - // We only have one window, so it should use a solo header. - EXPECT_EQ(w1.get(), GetWindowWithSoloHeaderInPrimary()); - - // Create a panel window. - scoped_ptr<aura::Window> w2(CreatePanelWindowInPrimary()); - w2->Show(); - - // Despite two windows, the first window should still be considered "solo" - // because panels aren't included in the computation. - EXPECT_EQ(w1.get(), GetWindowWithSoloHeaderInPrimary()); - - // Even after closing the first window, the panel is still not considered - // solo. - w1.reset(); - EXPECT_EQ(NULL, GetWindowWithSoloHeaderInPrimary()); -} - -// Modal dialogs should not use solo headers. -TEST_F(SoloWindowTrackerTest, Modal) { - scoped_ptr<aura::Window> w1(CreateWindowInPrimary()); - w1->Show(); - - // We only have one window, so it should use a solo header. - EXPECT_EQ(w1.get(), GetWindowWithSoloHeaderInPrimary()); - - // Create a fake modal window. - scoped_ptr<aura::Window> w2(CreateWindowInPrimary()); - w2->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_WINDOW); - w2->Show(); - - // Despite two windows, the first window should still be considered "solo" - // because modal windows aren't included in the computation. - EXPECT_EQ(w1.get(), GetWindowWithSoloHeaderInPrimary()); -} - -// Constrained windows should not use solo headers. -TEST_F(SoloWindowTrackerTest, Constrained) { - scoped_ptr<aura::Window> w1(CreateWindowInPrimary()); - w1->Show(); - - // We only have one window, so it should use a solo header. - EXPECT_EQ(w1.get(), GetWindowWithSoloHeaderInPrimary()); - - // Create a fake constrained window. - scoped_ptr<aura::Window> w2(CreateWindowInPrimary()); - w2->SetProperty(aura::client::kConstrainedWindowKey, true); - w2->Show(); - - // Despite two windows, the first window should still be considered "solo" - // because constrained windows aren't included in the computation. - EXPECT_EQ(w1.get(), GetWindowWithSoloHeaderInPrimary()); -} - -// Non-drawing windows should not affect the solo computation. -TEST_F(SoloWindowTrackerTest, NotDrawn) { - aura::Window* w = CreateWindowInPrimary(); - w->Show(); - - // We only have one window, so it should use a solo header. - EXPECT_EQ(w, GetWindowWithSoloHeaderInPrimary()); - - // Create non-drawing window similar to DragDropTracker. - aura::Window* not_drawn = new aura::Window(NULL); - not_drawn->SetType(ui::wm::WINDOW_TYPE_NORMAL); - not_drawn->Init(aura::WINDOW_LAYER_NOT_DRAWN); - ParentWindowInPrimaryRootWindow(not_drawn); - not_drawn->Show(); - - // Despite two windows, the first window should still be considered "solo" - // because non-drawing windows aren't included in the computation. - EXPECT_EQ(w, GetWindowWithSoloHeaderInPrimary()); -} - -TEST_F(SoloWindowTrackerTest, MultiDisplay) { - if (!SupportsMultipleDisplays()) - return; - - UpdateDisplay("1000x600,600x400"); - - scoped_ptr<aura::Window> w1(CreateWindowInPrimary()); - w1->SetBoundsInScreen(gfx::Rect(0, 0, 100, 100), GetPrimaryDisplay()); - w1->Show(); - WindowRepaintChecker checker1(w1.get()); - scoped_ptr<aura::Window> w2(CreateWindowInPrimary()); - w2->SetBoundsInScreen(gfx::Rect(0, 0, 100, 100), GetPrimaryDisplay()); - w2->Show(); - WindowRepaintChecker checker2(w2.get()); - - // Now there are two windows in the same display, so we should not use solo - // headers. - EXPECT_EQ(NULL, GetWindowWithSoloHeaderInPrimary()); - EXPECT_TRUE(checker1.IsPaintScheduledAndReset()); - - // Moves the second window to the secondary display. Both w1/w2 should be - // solo. - w2->SetBoundsInScreen(gfx::Rect(1200, 0, 100, 100), - ScreenUtil::GetSecondaryDisplay()); - EXPECT_EQ(w1.get(), GetWindowWithSoloHeaderInPrimary()); - EXPECT_EQ(w2.get(), GetWindowWithSoloHeader(w2->GetRootWindow())); - EXPECT_TRUE(checker1.IsPaintScheduledAndReset()); - EXPECT_TRUE(checker2.IsPaintScheduledAndReset()); - - // Open two more windows in the primary display. - scoped_ptr<aura::Window> w3(CreateWindowInPrimary()); - w3->SetBoundsInScreen(gfx::Rect(0, 0, 100, 100), GetPrimaryDisplay()); - w3->Show(); - scoped_ptr<aura::Window> w4(CreateWindowInPrimary()); - w4->SetBoundsInScreen(gfx::Rect(0, 0, 100, 100), GetPrimaryDisplay()); - w4->Show(); - - // Because the primary display has three windows w1, w3, and w4, they - // shouldn't be solo. w2 should be solo. - EXPECT_EQ(NULL, GetWindowWithSoloHeaderInPrimary()); - EXPECT_EQ(w2.get(), GetWindowWithSoloHeader(w2->GetRootWindow())); - EXPECT_TRUE(checker1.IsPaintScheduledAndReset()); - - // Move w4 to the secondary display. Now w2 shouldn't be solo anymore. - w4->SetBoundsInScreen(gfx::Rect(1200, 0, 100, 100), GetSecondaryDisplay()); - EXPECT_EQ(NULL, GetWindowWithSoloHeaderInPrimary()); - EXPECT_EQ(NULL, GetWindowWithSoloHeader(w2->GetRootWindow())); - EXPECT_TRUE(checker2.IsPaintScheduledAndReset()); - - // Moves w3 to the secondary display too. Now w1 should be solo again. - w3->SetBoundsInScreen(gfx::Rect(1200, 0, 100, 100), GetSecondaryDisplay()); - EXPECT_EQ(w1.get(), GetWindowWithSoloHeaderInPrimary()); - EXPECT_EQ(NULL, GetWindowWithSoloHeader(w2->GetRootWindow())); - EXPECT_TRUE(checker1.IsPaintScheduledAndReset()); - - // Change w3's state to maximize. Doesn't affect w1. - wm::GetWindowState(w3.get())->Maximize(); - EXPECT_EQ(w1.get(), GetWindowWithSoloHeaderInPrimary()); - EXPECT_EQ(NULL, GetWindowWithSoloHeader(w2->GetRootWindow())); - - // Close w3 and w4. - w3.reset(); - w4.reset(); - EXPECT_EQ(w1.get(), GetWindowWithSoloHeaderInPrimary()); - EXPECT_EQ(w2.get(), GetWindowWithSoloHeader(w2->GetRootWindow())); - EXPECT_TRUE(checker2.IsPaintScheduledAndReset()); - - // Move w2 back to the primary display. - w2->SetBoundsInScreen(gfx::Rect(0, 0, 100, 100), GetPrimaryDisplay()); - EXPECT_EQ(w1->GetRootWindow(), w2->GetRootWindow()); - EXPECT_EQ(NULL, GetWindowWithSoloHeaderInPrimary()); - EXPECT_TRUE(checker1.IsPaintScheduledAndReset()); - EXPECT_TRUE(checker2.IsPaintScheduledAndReset()); - - // Close w2. - w2.reset(); - EXPECT_EQ(w1.get(), GetWindowWithSoloHeaderInPrimary()); - EXPECT_TRUE(checker1.IsPaintScheduledAndReset()); -} - -TEST_F(SoloWindowTrackerTest, ChildWindowVisibility) { - aura::Window* w = CreateWindowInPrimary(); - w->Show(); - - // We only have one window, so it should use a solo header. - EXPECT_EQ(w, GetWindowWithSoloHeaderInPrimary()); - - // Create a child window. This should not affect the solo-ness of |w1|. - aura::Window* child = new aura::Window(NULL); - child->SetType(ui::wm::WINDOW_TYPE_CONTROL); - child->Init(aura::WINDOW_LAYER_TEXTURED); - child->SetBounds(gfx::Rect(100, 100)); - w->AddChild(child); - child->Show(); - EXPECT_EQ(w, GetWindowWithSoloHeaderInPrimary()); - - // Changing the visibility of |child| should not affect the solo-ness of |w1|. - child->Hide(); - EXPECT_EQ(w, GetWindowWithSoloHeaderInPrimary()); -} - -TEST_F(SoloWindowTrackerTest, CreateAndDeleteSingleWindow) { - // Ensure that creating/deleting a window works well and doesn't cause - // crashes. See crbug.com/155634 - scoped_ptr<aura::Window> w(CreateWindowInPrimary()); - w->Show(); - - // We only have one window, so it should use a solo header. - EXPECT_EQ(w.get(), GetWindowWithSoloHeaderInPrimary()); - - // Close the window. - w.reset(); - EXPECT_EQ(NULL, GetWindowWithSoloHeaderInPrimary()); - - // Recreate another window again. - w.reset(CreateWindowInPrimary()); - w->Show(); - EXPECT_EQ(w.get(), GetWindowWithSoloHeaderInPrimary()); -} - -} // namespace ash |