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

Unified Diff: chrome/browser/media/router/media_router_mojo_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: 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: chrome/browser/media/router/media_router_mojo_impl.cc
diff --git a/chrome/browser/media/router/media_router_mojo_impl.cc b/chrome/browser/media/router/media_router_mojo_impl.cc
index eaf5e3b2292901fd30c0d448fad0c5a4553fc7cf..db01cd136ffb8a171b9c0bbe5437ccae57b8790e 100644
--- a/chrome/browser/media/router/media_router_mojo_impl.cc
+++ b/chrome/browser/media/router/media_router_mojo_impl.cc
@@ -41,7 +41,7 @@ ConvertToPresentationSessionMessage(interfaces::RouteMessagePtr input) {
DCHECK(!input.is_null());
scoped_ptr<content::PresentationSessionMessage> output;
switch (input->type) {
- case interfaces::RouteMessage::Type::TYPE_TEXT: {
+ case interfaces::RouteMessage::Type::TEXT: {
DCHECK(!input->message.is_null());
DCHECK(input->data.is_null());
output.reset(new content::PresentationSessionMessage(
@@ -49,7 +49,7 @@ ConvertToPresentationSessionMessage(interfaces::RouteMessagePtr input) {
input->message.Swap(&output->message);
return output;
}
- case interfaces::RouteMessage::Type::TYPE_BINARY: {
+ case interfaces::RouteMessage::Type::BINARY: {
DCHECK(!input->data.is_null());
DCHECK(input->message.is_null());
output.reset(new content::PresentationSessionMessage(
@@ -100,7 +100,7 @@ MediaRouterMojoImpl::MediaRouterMojoImpl(
: event_page_tracker_(event_page_tracker),
instance_id_(base::GenerateGUID()),
has_local_display_route_(false),
- availability_(interfaces::MediaRouter::SINK_AVAILABILITY_UNAVAILABLE),
+ availability_(interfaces::MediaRouter::SinkAvailability::UNAVAILABLE),
wakeup_attempt_count_(0),
current_wake_reason_(MediaRouteProviderWakeReason::TOTAL_COUNT),
weak_factory_(this) {
@@ -387,7 +387,7 @@ bool MediaRouterMojoImpl::RegisterMediaSinksObserver(
// no need to call to MRPM.
// TODO(imcheng): Implement caching. (crbug.com/492451)
sinks_query->observers.AddObserver(observer);
- if (availability_ != interfaces::MediaRouter::SINK_AVAILABILITY_UNAVAILABLE) {
+ if (availability_ != interfaces::MediaRouter::SinkAvailability::UNAVAILABLE) {
SetWakeReason(MediaRouteProviderWakeReason::START_OBSERVING_MEDIA_SINKS);
RunOrDefer(base::Bind(&MediaRouterMojoImpl::DoStartObservingMediaSinks,
base::Unretained(this), source_id));
@@ -418,7 +418,7 @@ void MediaRouterMojoImpl::UnregisterMediaSinksObserver(
// UNAVAILABLE.
// Otherwise, the MRPM would have discarded the queries already.
if (availability_ !=
- interfaces::MediaRouter::SINK_AVAILABILITY_UNAVAILABLE) {
+ interfaces::MediaRouter::SinkAvailability::UNAVAILABLE) {
SetWakeReason(MediaRouteProviderWakeReason::STOP_OBSERVING_MEDIA_SINKS);
// The |sinks_queries_| entry will be removed in the immediate or deferred
// |DoStopObservingMediaSinks| call.
@@ -661,7 +661,7 @@ void MediaRouterMojoImpl::OnSinkAvailabilityUpdated(
return;
availability_ = availability;
- if (availability_ == interfaces::MediaRouter::SINK_AVAILABILITY_UNAVAILABLE) {
+ if (availability_ == interfaces::MediaRouter::SinkAvailability::UNAVAILABLE) {
// Sinks are no longer available. MRPM has already removed all sink queries.
for (auto& source_and_query : sinks_queries_)
source_and_query.second->is_active = false;
@@ -695,7 +695,7 @@ void MediaRouterMojoImpl::DoStartObservingMediaSinks(
const MediaSource::Id& source_id) {
DVLOG_WITH_INSTANCE(1) << "DoStartObservingMediaSinks: " << source_id;
// No need to call MRPM if there are no sinks available.
- if (availability_ == interfaces::MediaRouter::SINK_AVAILABILITY_UNAVAILABLE)
+ if (availability_ == interfaces::MediaRouter::SinkAvailability::UNAVAILABLE)
return;
// No need to call MRPM if all observers have been removed in the meantime.

Powered by Google App Engine
This is Rietveld 408576698