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

Side by Side Diff: ui/arc/notification/arc_notification_manager.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 unified diff | Download patch
« no previous file with comments | « ui/arc/notification/arc_notification_item.cc ('k') | ui/views/mus/native_widget_mus.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/arc/notification/arc_notification_manager.h" 5 #include "ui/arc/notification/arc_notification_manager.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "ui/arc/notification/arc_notification_item.h" 8 #include "ui/arc/notification/arc_notification_item.h"
9 9
10 namespace arc { 10 namespace arc {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 ItemMap::iterator it = items_.find(key); 69 ItemMap::iterator it = items_.find(key);
70 if (it == items_.end()) { 70 if (it == items_.end()) {
71 VLOG(3) << "Chrome requests to remove a notification (key: " << key 71 VLOG(3) << "Chrome requests to remove a notification (key: " << key
72 << "), but it is already gone."; 72 << "), but it is already gone.";
73 return; 73 return;
74 } 74 }
75 75
76 scoped_ptr<ArcNotificationItem> item(items_.take_and_erase(it)); 76 scoped_ptr<ArcNotificationItem> item(items_.take_and_erase(it));
77 77
78 arc_bridge_->notifications_instance()->SendNotificationEventToAndroid( 78 arc_bridge_->notifications_instance()->SendNotificationEventToAndroid(
79 key, ARC_NOTIFICATION_EVENT_CLOSED); 79 key, ArcNotificationEvent::CLOSED);
80 } 80 }
81 81
82 void ArcNotificationManager::SendNotificationClickedOnChrome( 82 void ArcNotificationManager::SendNotificationClickedOnChrome(
83 const std::string& key) { 83 const std::string& key) {
84 if (!items_.contains(key)) { 84 if (!items_.contains(key)) {
85 VLOG(3) << "Chrome requests to fire a click event on notification (key: " 85 VLOG(3) << "Chrome requests to fire a click event on notification (key: "
86 << key << "), but it is gone."; 86 << key << "), but it is gone.";
87 return; 87 return;
88 } 88 }
89 89
90 arc_bridge_->notifications_instance()->SendNotificationEventToAndroid( 90 arc_bridge_->notifications_instance()->SendNotificationEventToAndroid(
91 key, ARC_NOTIFICATION_EVENT_BODY_CLICKED); 91 key, ArcNotificationEvent::BODY_CLICKED);
92 } 92 }
93 93
94 } // namespace arc 94 } // namespace arc
OLDNEW
« no previous file with comments | « ui/arc/notification/arc_notification_item.cc ('k') | ui/views/mus/native_widget_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698