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

Unified Diff: chrome/browser/extensions/api/rtc_private/rtc_private_api.cc

Issue 10907151: Extensions Docs Server: Enum values do not show up if enum is a type (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rtcPrivate fix Created 8 years, 3 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/extensions/api/rtc_private/rtc_private_api.cc
diff --git a/chrome/browser/extensions/api/rtc_private/rtc_private_api.cc b/chrome/browser/extensions/api/rtc_private/rtc_private_api.cc
index 57c07a58ac79d273471aced07c56b2e8749392c6..7f0467a7b8b40c5f91ebbe8a7ef8639bcbfa2af9 100644
--- a/chrome/browser/extensions/api/rtc_private/rtc_private_api.cc
+++ b/chrome/browser/extensions/api/rtc_private/rtc_private_api.cc
@@ -46,27 +46,29 @@ const char kNameIntentField[] = "name";
const char kPhoneIntentField[] = "phone";
const char kEmailIntentField[] = "email";
-// Returns string representation of intent action.
-const char* GetLaunchAction(RtcPrivateEventRouter::LaunchAction action) {
- const char* action_str = kActivateAction;
+// Returns the ActionType of intent action.
+api::rtc_private::ActionType GetLaunchAction(
+ RtcPrivateEventRouter::LaunchAction action) {
+ api::rtc_private::ActionType action_type =
+ api::rtc_private::RTC_PRIVATE_ACTION_TYPE_NONE;
switch (action) {
case RtcPrivateEventRouter::LAUNCH_ACTIVATE:
- action_str = kActivateAction;
+ action_type = api::rtc_private::RTC_PRIVATE_ACTION_TYPE_NONE;
not at google - send to devlin 2012/09/24 22:46:29 why does this map to NONE not ACTIVATE?
cduvall 2012/09/24 22:51:47 In the IDL file there is only "chat", "voice", and
not at google - send to devlin 2012/09/24 22:54:14 Bizarre. I don't know how the code works as is, th
zel 2012/09/24 23:00:57 That's fine as it is right now. We will modify C++
break;
case RtcPrivateEventRouter::LAUNCH_CHAT:
- action_str = kChatAction;
+ action_type = api::rtc_private::RTC_PRIVATE_ACTION_TYPE_CHAT;
break;
case RtcPrivateEventRouter::LAUNCH_VOICE:
- action_str = kVoiceAction;
+ action_type = api::rtc_private::RTC_PRIVATE_ACTION_TYPE_VOICE;
break;
case RtcPrivateEventRouter::LAUNCH_VIDEO:
- action_str = kVideoAction;
+ action_type = api::rtc_private::RTC_PRIVATE_ACTION_TYPE_VIDEO;
break;
default:
NOTREACHED() << "Unknown action " << action;
break;
not at google - send to devlin 2012/09/24 22:46:29 this method could be more concise by returning the
cduvall 2012/09/24 22:51:47 Done.
}
- return action_str;
+ return action_type;
}
// Creates JSON payload string for contact web intent data.

Powered by Google App Engine
This is Rietveld 408576698