Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2260)

Unified Diff: ash/mus/bridge/wm_window_mus.h

Issue 2613793002: Removes/promotes functions from WmWindowMus to WmWindowAura (Closed)
Patch Set: move WmWindowAuraTestApi to ash/test Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/mus/bridge/wm_shell_mus.cc ('k') | ash/mus/bridge/wm_window_mus.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/mus/bridge/wm_window_mus.h
diff --git a/ash/mus/bridge/wm_window_mus.h b/ash/mus/bridge/wm_window_mus.h
index 4b88c5ff4126cc23e1789bb587b57a558e7dbe67..3a910d97746d03c779d9c2ff54f4df0776ee9e10 100644
--- a/ash/mus/bridge/wm_window_mus.h
+++ b/ash/mus/bridge/wm_window_mus.h
@@ -22,7 +22,6 @@ namespace ash {
namespace mus {
class WmRootWindowControllerMus;
-class WmWindowMusTestApi;
// WmWindow implementation for mus.
//
@@ -30,22 +29,6 @@ class WmWindowMusTestApi;
// as an owned property).
class WmWindowMus : public WmWindowAura {
public:
- // Indicates the source of the widget creation.
- enum class WidgetCreationType {
- // The widget was created internally, and not at the request of a client.
- // For example, overview mode creates a number of widgets. These widgets are
- // created with a type of INTERNAL.
- INTERNAL,
-
- // The widget was created for a client. In other words there is a client
- // embedded in the aura::Window. For example, when Chrome creates a new
- // browser window the window manager is asked to create the aura::Window.
- // The window manager creates an aura::Window and a views::Widget to show
- // the non-client frame decorations. In this case the creation type is
- // FOR_CLIENT.
- FOR_CLIENT,
- };
-
explicit WmWindowMus(aura::Window* window);
// NOTE: this class is owned by the corresponding window. You shouldn't delete
// TODO(sky): friend deleter and make private.
@@ -60,13 +43,6 @@ class WmWindowMus : public WmWindowAura {
static WmWindowMus* Get(views::Widget* widget);
- // Sets the widget associated with the window. The widget is used to query
- // state, such as min/max size. The widget is not owned by the WmWindowMus.
- void set_widget(views::Widget* widget, WidgetCreationType type) {
- widget_ = widget;
- widget_creation_type_ = type;
- }
-
WmRootWindowControllerMus* GetRootWindowControllerMus() {
return const_cast<WmRootWindowControllerMus*>(
const_cast<const WmWindowMus*>(this)->GetRootWindowControllerMus());
@@ -80,32 +56,17 @@ class WmWindowMus : public WmWindowAura {
return static_cast<const WmWindowMus*>(window);
}
- // See description of |children_use_extended_hit_region_|.
- bool ShouldUseExtendedHitRegion() const;
-
// Returns true if this window is considered a shell window container.
bool IsContainer() const;
// WmWindow:
- const WmWindow* GetRootWindow() const override;
WmRootWindowController* GetRootWindowController() override;
WmShell* GetShell() const override;
- bool IsBubble() override;
- bool HasNonClientArea() override;
- int GetNonClientComponent(const gfx::Point& location) override;
- gfx::Size GetMinimumSize() const override;
- gfx::Size GetMaximumSize() const override;
- gfx::Rect GetMinimizeAnimationTargetBoundsInScreen() const override;
- bool IsSystemModal() const override;
- bool GetBoolProperty(WmWindowProperty key) override;
int GetIntProperty(WmWindowProperty key) override;
- WmWindow* GetToplevelWindow() override;
- WmWindow* GetToplevelWindowForFocus() override;
bool MoveToEventRoot(const ui::Event& event) override;
void SetBoundsInScreen(const gfx::Rect& bounds_in_screen,
const display::Display& dst_display) override;
void SetPinned(bool trusted) override;
- views::Widget* GetInternalWidget() override;
void CloseWidget() override;
bool CanActivate() const override;
void ShowResizeShadow(int component) override;
@@ -114,30 +75,9 @@ class WmWindowMus : public WmWindowAura {
ImmersiveFullscreenController* immersive_fullscreen_controller) override;
void SetBoundsInScreenBehaviorForChildren(
BoundsInScreenBehavior behavior) override;
- void SetSnapsChildrenToPhysicalPixelBoundary() override;
- void SnapToPixelBoundaryIfNecessary() override;
- void SetChildrenUseExtendedHitRegion() override;
void AddLimitedPreTargetHandler(ui::EventHandler* handler) override;
private:
- friend class WmWindowMusTestApi;
-
- views::Widget* widget_ = nullptr;
-
- WidgetCreationType widget_creation_type_ = WidgetCreationType::INTERNAL;
-
- bool snap_children_to_pixel_boundary_ = false;
-
- // If true child windows should get a slightly larger hit region to make
- // resizing easier.
- bool children_use_extended_hit_region_ = false;
-
- // Default value for |use_empty_minimum_size_for_testing_|.
- static bool default_use_empty_minimum_size_for_testing_;
-
- // If true the minimum size is 0x0, default is minimum size comes from widget.
- bool use_empty_minimum_size_for_testing_ = false;
-
BoundsInScreenBehavior child_bounds_in_screen_behavior_ =
BoundsInScreenBehavior::USE_LOCAL_COORDINATES;
« no previous file with comments | « ash/mus/bridge/wm_shell_mus.cc ('k') | ash/mus/bridge/wm_window_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698