Skip to content

Commit

Permalink
mus: WindowManagerConnection makes top level windows.
Browse files Browse the repository at this point in the history
Reflect what it calls underneath in its name.

BUG=none

Review-Url: https://codereview.chromium.org/2399253002
Cr-Commit-Position: refs/heads/master@{#423972}
  • Loading branch information
eglaysher authored and Commit bot committed Oct 7, 2016
1 parent 577dc9d commit 4e7bd53
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion ash/autoclick/mus/autoclick_application.cc
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ void AutoclickApplication::Launch(uint32_t what, mash::mojom::LaunchMode how) {
mojo::ConvertTo<std::vector<uint8_t>>(
static_cast<int32_t>(ui::mojom::ShowState::FULLSCREEN));
ui::Window* window =
window_manager_connection_.get()->NewWindow(properties);
window_manager_connection_.get()->NewTopLevelWindow(properties);
params.native_widget = new views::NativeWidgetMus(
widget_.get(), window, ui::mojom::SurfaceType::DEFAULT);
widget_->Init(params);
Expand Down
2 changes: 1 addition & 1 deletion ash/touch_hud/mus/touch_hud_application.cc
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ void TouchHudApplication::Launch(uint32_t what, mash::mojom::LaunchMode how) {
mojo::ConvertTo<std::vector<uint8_t>>(
static_cast<int32_t>(ui::mojom::ShowState::FULLSCREEN));
ui::Window* window =
window_manager_connection_.get()->NewWindow(properties);
window_manager_connection_.get()->NewTopLevelWindow(properties);
params.native_widget = new views::NativeWidgetMus(
widget_, window, ui::mojom::SurfaceType::DEFAULT);
widget_->Init(params);
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/ui/views/frame/browser_frame_mus.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ui::Window* CreateMusWindow(BrowserView* browser_view) {
mojo::ConvertTo<std::vector<uint8_t>>(true);
properties[ui::mojom::WindowManager::kAppID_Property] =
mojo::ConvertTo<std::vector<uint8_t>>(chrome_app_id);
return views::WindowManagerConnection::Get()->NewWindow(properties);
return views::WindowManagerConnection::Get()->NewTopLevelWindow(properties);
}

} // namespace
Expand Down
2 changes: 1 addition & 1 deletion mash/login/login.cc
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class UI : public views::WidgetDelegateView,
mojo::ConvertTo<std::vector<uint8_t>>(
static_cast<int32_t>(ash::mojom::Container::LOGIN_WINDOWS));
ui::Window* window =
views::WindowManagerConnection::Get()->NewWindow(properties);
views::WindowManagerConnection::Get()->NewTopLevelWindow(properties);
params.native_widget = new views::NativeWidgetMus(
widget, window, ui::mojom::SurfaceType::DEFAULT);
widget->Init(params);
Expand Down
2 changes: 1 addition & 1 deletion mash/screenlock/screenlock.cc
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ void Screenlock::OnStart(const shell::Identity& identity) {
mojo::ConvertTo<std::vector<uint8_t>>(
static_cast<int32_t>(ash::mojom::Container::LOGIN_WINDOWS));
ui::Window* window =
views::WindowManagerConnection::Get()->NewWindow(properties);
views::WindowManagerConnection::Get()->NewTopLevelWindow(properties);
params.native_widget = new views::NativeWidgetMus(
widget, window, ui::mojom::SurfaceType::DEFAULT);
widget->Init(params);
Expand Down
2 changes: 1 addition & 1 deletion ui/views/mus/native_widget_mus_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ class IsMaximizedObserver : public ui::WindowObserver {
// OnWindowSharedPropertyChanged() returns the right thing.
TEST_F(NativeWidgetMusTest, IsMaximized) {
ASSERT_TRUE(WindowManagerConnection::Exists());
ui::Window* window = WindowManagerConnection::Get()->NewWindow(
ui::Window* window = WindowManagerConnection::Get()->NewTopLevelWindow(
std::map<std::string, std::vector<uint8_t>>());
IsMaximizedObserver observer;
// NOTE: the order here is important, we purposefully add the
Expand Down
4 changes: 2 additions & 2 deletions ui/views/mus/window_manager_connection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ bool WindowManagerConnection::Exists() {
return !!lazy_tls_ptr.Pointer()->Get();
}

ui::Window* WindowManagerConnection::NewWindow(
ui::Window* WindowManagerConnection::NewTopLevelWindow(
const std::map<std::string, std::vector<uint8_t>>& properties) {
return client_->NewTopLevelWindow(&properties);
}
Expand All @@ -130,7 +130,7 @@ NativeWidget* WindowManagerConnection::CreateNativeWidgetMus(
NativeWidgetMus::ConfigurePropertiesForNewWindow(init_params, &properties);
properties[ui::mojom::WindowManager::kAppID_Property] =
mojo::ConvertTo<std::vector<uint8_t>>(identity_.name());
return new NativeWidgetMus(delegate, NewWindow(properties),
return new NativeWidgetMus(delegate, NewTopLevelWindow(properties),
ui::mojom::SurfaceType::DEFAULT);
}

Expand Down
2 changes: 1 addition & 1 deletion ui/views/mus/window_manager_connection.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class VIEWS_MUS_EXPORT WindowManagerConnection
ui::GpuService* gpu_service() { return gpu_service_.get(); }
ui::WindowTreeClient* client() { return client_.get(); }

ui::Window* NewWindow(
ui::Window* NewTopLevelWindow(
const std::map<std::string, std::vector<uint8_t>>& properties);

NativeWidget* CreateNativeWidgetMus(
Expand Down

0 comments on commit 4e7bd53

Please sign in to comment.