Commit 9fbbb56b authored by James Cook's avatar James Cook Committed by Commit Bot

Eliminate a parameter from ash::NonClientFrameController

The |window_type| is always ws::mojom::WindowType::WINDOW, so it
doesn't need to be a parameter.

Bug: none
Change-Id: Id0ec9146d64e9653983f12945a1436083371633c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1506110
Auto-Submit: James Cook <jamescook@chromium.org>
Commit-Queue: Evan Stade <estade@chromium.org>
Reviewed-by: default avatarEvan Stade <estade@chromium.org>
Cr-Commit-Position: refs/heads/master@{#638284}
parent 84fe619b
......@@ -233,7 +233,6 @@ NonClientFrameController::NonClientFrameController(
aura::Window* parent,
aura::Window* context,
const gfx::Rect& bounds,
ws::mojom::WindowType window_type,
aura::PropertyConverter* property_converter,
std::map<std::string, std::vector<uint8_t>>* properties)
: widget_(new views::Widget),
......@@ -242,12 +241,7 @@ NonClientFrameController::NonClientFrameController(
// we need to ensure we don't inadvertently change random properties of the
// underlying ui::Window. For example, showing the Widget shouldn't change
// the bounds of the ui::Window in anyway.
//
// Assertions around InitParams::Type matching ws::mojom::WindowType exist in
// MusClient.
views::Widget::InitParams params(
static_cast<views::Widget::InitParams::Type>(window_type));
DCHECK_EQ(ws::mojom::WindowType::WINDOW, window_type);
views::Widget::InitParams params;
DCHECK((parent && !context) || (!parent && context));
params.parent = parent;
params.context = context;
......@@ -264,7 +258,7 @@ NonClientFrameController::NonClientFrameController(
window_->SetProperty(kWidgetCreationTypeKey, WidgetCreationType::FOR_CLIENT);
window_->AddObserver(this);
params.native_widget = native_widget;
aura::SetWindowType(window_, window_type);
aura::SetWindowType(window_, ws::mojom::WindowType::WINDOW);
for (auto& property_pair : *properties) {
property_converter->SetPropertyFromTransportValue(
window_, property_pair.first, &property_pair.second);
......
......@@ -29,9 +29,6 @@ class Insets;
}
namespace ws {
namespace mojom {
enum class WindowType;
}
class TopLevelProxyWindow;
} // namespace ws
......@@ -54,7 +51,6 @@ class ASH_EXPORT NonClientFrameController : public views::WidgetDelegate,
aura::Window* parent,
aura::Window* context,
const gfx::Rect& bounds,
ws::mojom::WindowType window_type,
aura::PropertyConverter* property_converter,
std::map<std::string, std::vector<uint8_t>>* properties);
......
......@@ -145,8 +145,8 @@ aura::Window* CreateAndParentTopLevelWindowInRoot(
// See NonClientFrameController for details on lifetime.
NonClientFrameController* non_client_frame_controller =
new NonClientFrameController(top_level_proxy_window, container_window,
context, bounds, window_type,
property_converter, properties);
context, bounds, property_converter,
properties);
return non_client_frame_controller->window();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment