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

Unified Diff: ui/views/mus/platform_window_mus.cc

Issue 1527183003: Change mojo enums to be scoped enums in the generated C++ bindings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo-binding-equals
Patch Set: Created 4 years, 12 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
Index: ui/views/mus/platform_window_mus.cc
diff --git a/ui/views/mus/platform_window_mus.cc b/ui/views/mus/platform_window_mus.cc
index 3683cf5ba15d425a5a1ede9b67d15f0840d7fb47..d4b3a8ac1ab5e8d19849a2a393157eff7a427486 100644
--- a/ui/views/mus/platform_window_mus.cc
+++ b/ui/views/mus/platform_window_mus.cc
@@ -23,8 +23,8 @@ PlatformWindowMus::PlatformWindowMus(ui::PlatformWindowDelegate* delegate,
mus::Window* mus_window)
: delegate_(delegate),
mus_window_(mus_window),
- show_state_(mus::mojom::SHOW_STATE_RESTORED),
- last_cursor_(mus::mojom::CURSOR_NULL),
+ show_state_(mus::mojom::ShowState::RESTORED),
+ last_cursor_(mus::mojom::Cursor::CURSOR_NULL),
has_capture_(false),
mus_window_destroyed_(false) {
DCHECK(delegate_);
@@ -111,15 +111,15 @@ void PlatformWindowMus::ToggleFullscreen() {
}
void PlatformWindowMus::Maximize() {
- SetShowState(mus::mojom::SHOW_STATE_MAXIMIZED);
+ SetShowState(mus::mojom::ShowState::MAXIMIZED);
}
void PlatformWindowMus::Minimize() {
- SetShowState(mus::mojom::SHOW_STATE_MINIMIZED);
+ SetShowState(mus::mojom::ShowState::MINIMIZED);
}
void PlatformWindowMus::Restore() {
- SetShowState(mus::mojom::SHOW_STATE_RESTORED);
+ SetShowState(mus::mojom::ShowState::RESTORED);
}
void PlatformWindowMus::SetCursor(ui::PlatformCursor cursor) {
@@ -140,7 +140,8 @@ ui::PlatformImeController* PlatformWindowMus::GetPlatformImeController() {
void PlatformWindowMus::SetShowState(mus::mojom::ShowState show_state) {
mus_window_->SetSharedProperty<int32_t>(
- mus::mojom::WindowManager::kShowState_Property, show_state);
+ mus::mojom::WindowManager::kShowState_Property,
+ static_cast<int32_t>(show_state));
}
void PlatformWindowMus::OnWindowDestroyed(mus::Window* window) {
@@ -186,17 +187,17 @@ void PlatformWindowMus::OnWindowSharedPropertyChanged(
show_state_ = show_state;
ui::PlatformWindowState state = ui::PLATFORM_WINDOW_STATE_UNKNOWN;
switch (show_state_) {
- case mus::mojom::SHOW_STATE_MINIMIZED:
+ case mus::mojom::ShowState::MINIMIZED:
state = ui::PLATFORM_WINDOW_STATE_MINIMIZED;
break;
- case mus::mojom::SHOW_STATE_MAXIMIZED:
+ case mus::mojom::ShowState::MAXIMIZED:
state = ui::PLATFORM_WINDOW_STATE_MAXIMIZED;
break;
- case mus::mojom::SHOW_STATE_RESTORED:
+ case mus::mojom::ShowState::RESTORED:
state = ui::PLATFORM_WINDOW_STATE_NORMAL;
break;
- case mus::mojom::SHOW_STATE_IMMERSIVE:
- case mus::mojom::SHOW_STATE_PRESENTATION:
+ case mus::mojom::ShowState::IMMERSIVE:
+ case mus::mojom::ShowState::PRESENTATION:
// This may not be sufficient.
state = ui::PLATFORM_WINDOW_STATE_FULLSCREEN;
break;

Powered by Google App Engine
This is Rietveld 408576698