OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 package org.chromium.chromoting.help; | 5 package org.chromium.chromoting.help; |
6 | 6 |
7 import android.app.Activity; | 7 import android.app.Activity; |
8 | 8 |
9 /** | 9 /** |
10 * This class implements a basic UI for help-and-feedback. | 10 * This class implements a basic UI for help-and-feedback. |
11 */ | 11 */ |
12 public class HelpAndFeedbackBasic implements HelpAndFeedback { | 12 public class HelpAndFeedbackBasic implements HelpAndFeedback { |
13 @Override | 13 @Override |
14 public void launchHelp(Activity activity, HelpContext helpContext) { | 14 public void launchHelp(Activity activity, HelpContext helpContext) { |
15 HelpActivity.launch(activity, urlFromHelpContext(helpContext)); | 15 HelpActivity.launch(activity, urlFromHelpContext(helpContext)); |
16 } | 16 } |
17 | 17 |
| 18 @Override |
| 19 public void launchFeedback(Activity activity) { |
| 20 FeedbackSender.sendFeedback(activity); |
| 21 } |
| 22 |
18 private static String urlFromHelpContext(HelpContext helpContext) { | 23 private static String urlFromHelpContext(HelpContext helpContext) { |
19 switch (helpContext) { | 24 switch (helpContext) { |
20 case HOST_LIST: | 25 case HOST_LIST: |
21 return "https://support.google.com/chrome/answer/6002441#hosts"; | 26 return "https://support.google.com/chrome/answer/6002441#hosts"; |
22 case HOST_SETUP: | 27 case HOST_SETUP: |
23 return "https://support.google.com/chrome/answer/1649523"; | 28 return "https://support.google.com/chrome/answer/1649523"; |
24 case DESKTOP: | 29 case DESKTOP: |
25 return "https://support.google.com/chrome/answer/6002441#gesture
s"; | 30 return "https://support.google.com/chrome/answer/6002441#gesture
s"; |
26 default: | 31 default: |
27 // Unreachable, but required by Java style. | 32 // Unreachable, but required by Java style. |
28 assert false; | 33 assert false; |
29 return ""; | 34 return ""; |
30 } | 35 } |
31 } | 36 } |
32 } | 37 } |
OLD | NEW |