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

Unified Diff: ui/views/mus/native_widget_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: rebase Created 4 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 | « ui/arc/notification/arc_notification_manager.cc ('k') | ui/views/mus/platform_window_mus.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/mus/native_widget_mus.cc
diff --git a/ui/views/mus/native_widget_mus.cc b/ui/views/mus/native_widget_mus.cc
index 11b77a2e6966e5d6978723c95e6f707dd0641756..4efb593311afbd9260caff19e4b7ad6d6af152cd 100644
--- a/ui/views/mus/native_widget_mus.cc
+++ b/ui/views/mus/native_widget_mus.cc
@@ -155,16 +155,15 @@ class ClientSideNonClientFrameView : public NonClientFrameView {
DISALLOW_COPY_AND_ASSIGN(ClientSideNonClientFrameView);
};
-mus::mojom::ResizeBehavior ResizeBehaviorFromDelegate(
- WidgetDelegate* delegate) {
- int32_t behavior = mus::mojom::RESIZE_BEHAVIOR_NONE;
+int ResizeBehaviorFromDelegate(WidgetDelegate* delegate) {
+ int32_t behavior = mus::mojom::kResizeBehaviorNone;
if (delegate->CanResize())
- behavior |= mus::mojom::RESIZE_BEHAVIOR_CAN_RESIZE;
+ behavior |= mus::mojom::kResizeBehaviorCanResize;
if (delegate->CanMaximize())
- behavior |= mus::mojom::RESIZE_BEHAVIOR_CAN_MAXIMIZE;
+ behavior |= mus::mojom::kResizeBehaviorCanMaximize;
if (delegate->CanMinimize())
- behavior |= mus::mojom::RESIZE_BEHAVIOR_CAN_MINIMIZE;
- return static_cast<mus::mojom::ResizeBehavior>(behavior);
+ behavior |= mus::mojom::kResizeBehaviorCanMinimize;
+ return behavior;
}
} // namespace
@@ -255,7 +254,8 @@ void NativeWidgetMus::ConfigurePropertiesForNewWindow(
(*properties)[mus::mojom::WindowManager::kWindowType_Property] =
mojo::TypeConverter<const std::vector<uint8_t>, int32_t>::Convert(
- mojo::ConvertTo<mus::mojom::WindowType>(init_params.type));
+ static_cast<int32_t>(
+ mojo::ConvertTo<mus::mojom::WindowType>(init_params.type)));
(*properties)[mus::mojom::WindowManager::kResizeBehavior_Property] =
mojo::TypeConverter<const std::vector<uint8_t>, int32_t>::Convert(
ResizeBehaviorFromDelegate(init_params.delegate));
« no previous file with comments | « ui/arc/notification/arc_notification_manager.cc ('k') | ui/views/mus/platform_window_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698