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

Unified Diff: content/browser/presentation/presentation_service_impl.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
Index: content/browser/presentation/presentation_service_impl.cc
diff --git a/content/browser/presentation/presentation_service_impl.cc b/content/browser/presentation/presentation_service_impl.cc
index 07644589a40adcd08c73fafec1293d17473d031a..26947c2a3b34138e3b956dcbecf34cad75dd87fc 100644
--- a/content/browser/presentation/presentation_service_impl.cc
+++ b/content/browser/presentation/presentation_service_impl.cc
@@ -47,8 +47,7 @@ presentation::SessionMessagePtr ToMojoSessionMessage(
if (input->is_binary()) {
// binary data
DCHECK(input->data);
- output->type = presentation::PresentationMessageType::
- PRESENTATION_MESSAGE_TYPE_ARRAY_BUFFER;
+ output->type = presentation::PresentationMessageType::ARRAY_BUFFER;
if (pass_ownership) {
output->data.Swap(input->data.get());
} else {
@@ -56,8 +55,7 @@ presentation::SessionMessagePtr ToMojoSessionMessage(
}
} else {
// string message
- output->type =
- presentation::PresentationMessageType::PRESENTATION_MESSAGE_TYPE_TEXT;
+ output->type = presentation::PresentationMessageType::TEXT;
if (pass_ownership) {
output->message.Swap(&input->message);
} else {
@@ -72,7 +70,7 @@ scoped_ptr<PresentationSessionMessage> GetPresentationSessionMessage(
DCHECK(!input.is_null());
scoped_ptr<content::PresentationSessionMessage> output;
switch (input->type) {
- case presentation::PRESENTATION_MESSAGE_TYPE_TEXT: {
+ case presentation::PresentationMessageType::TEXT: {
DCHECK(!input->message.is_null());
DCHECK(input->data.is_null());
// Return null PresentationSessionMessage if size exceeds.
@@ -84,7 +82,7 @@ scoped_ptr<PresentationSessionMessage> GetPresentationSessionMessage(
input->message.Swap(&output->message);
return output;
}
- case presentation::PRESENTATION_MESSAGE_TYPE_ARRAY_BUFFER: {
+ case presentation::PresentationMessageType::ARRAY_BUFFER: {
DCHECK(!input->data.is_null());
DCHECK(input->message.is_null());
if (input->data.size() > content::kMaxPresentationSessionMessageSize)
@@ -96,7 +94,7 @@ scoped_ptr<PresentationSessionMessage> GetPresentationSessionMessage(
input->data.Swap(output->data.get());
return output;
}
- case presentation::PRESENTATION_MESSAGE_TYPE_BLOB: {
+ case presentation::PresentationMessageType::BLOB: {
DCHECK(!input->data.is_null());
DCHECK(input->message.is_null());
if (input->data.size() > content::kMaxPresentationSessionMessageSize)

Powered by Google App Engine
This is Rietveld 408576698