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

Unified Diff: services/view_manager/view_manager_service_impl.cc

Issue 1375313006: For c++, Generate enum classes instead of enum from mojom. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 2 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: services/view_manager/view_manager_service_impl.cc
diff --git a/services/view_manager/view_manager_service_impl.cc b/services/view_manager/view_manager_service_impl.cc
index f10fc2d619d8a55afdd58a3fc04dc59ee6bb4623..5c81a1380f1f7541afd0302dc7945324c49a58a4 100644
--- a/services/view_manager/view_manager_service_impl.cc
+++ b/services/view_manager/view_manager_service_impl.cc
@@ -100,12 +100,12 @@ void ViewManagerServiceImpl::OnWillDestroyViewManagerServiceImpl(
mojo::ErrorCode ViewManagerServiceImpl::CreateView(const ViewId& view_id) {
if (view_id.connection_id != id_)
- return mojo::ERROR_CODE_ILLEGAL_ARGUMENT;
+ return mojo::ErrorCode::ILLEGAL_ARGUMENT;
if (view_map_.find(view_id.view_id) != view_map_.end())
- return mojo::ERROR_CODE_VALUE_IN_USE;
+ return mojo::ErrorCode::VALUE_IN_USE;
view_map_[view_id.view_id] = connection_manager_->CreateServerView(view_id);
known_views_.insert(ViewIdToTransportId(view_id));
- return mojo::ERROR_CODE_NONE;
+ return mojo::ErrorCode::NONE;
}
bool ViewManagerServiceImpl::AddView(const ViewId& parent_id,
@@ -327,8 +327,8 @@ bool ViewManagerServiceImpl::CanReorderView(const ServerView* view,
const size_t target_i =
std::find(children.begin(), children.end(), relative_view) -
children.begin();
- if ((direction == mojo::ORDER_DIRECTION_ABOVE && child_i == target_i + 1) ||
- (direction == mojo::ORDER_DIRECTION_BELOW && child_i + 1 == target_i)) {
+ if ((direction == mojo::OrderDirection::ABOVE && child_i == target_i + 1) ||
+ (direction == mojo::OrderDirection::BELOW && child_i + 1 == target_i)) {
return false;
}
« no previous file with comments | « services/view_manager/view_manager_service_apptest.cc ('k') | services/view_manager/view_manager_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698