| Index: content/public/browser/bluetooth_chooser.cc
|
| diff --git a/content/public/browser/bluetooth_chooser.cc b/content/public/browser/bluetooth_chooser.cc
|
| index 40d4590e3cb69b9babd371d328915f1af7d3cc38..104b5924a7c61dca8040f09de4ba31b88f2db6b2 100644
|
| --- a/content/public/browser/bluetooth_chooser.cc
|
| +++ b/content/public/browser/bluetooth_chooser.cc
|
| @@ -4,8 +4,48 @@
|
|
|
| #include "content/public/browser/bluetooth_chooser.h"
|
|
|
| +#include "content/public/browser/web_contents_delegate.h"
|
| +#include "ui/base/page_transition_types.h"
|
| +
|
| +namespace {
|
| +
|
| +// TODO(finnur): These need to be actual HC article links.
|
| +const char kOverviewURL[] = "https://www.google.com/?gws_rd=ssl#q=overview";
|
| +const char kPairingURL[] = "https://www.google.com/?gws_rd=ssl#q=pairing";
|
| +const char kAdapterOffURL[] = "https://www.google.com/?gws_rd=ssl#q=adapteroff";
|
| +
|
| +void ShowLink(content::WebContents* web_contents, const GURL& link) {
|
| + content::OpenURLParams params = content::OpenURLParams(
|
| + link,
|
| + content::Referrer(),
|
| + NEW_FOREGROUND_TAB,
|
| + ui::PageTransition::PAGE_TRANSITION_LINK,
|
| + false);
|
| + content::WebContentsDelegate* delegate = web_contents->GetDelegate();
|
| + delegate->OpenURLFromTab(web_contents, params);
|
| +}
|
| +
|
| +} // namespace
|
| +
|
| namespace content {
|
|
|
| BluetoothChooser::~BluetoothChooser() {}
|
|
|
| +void BluetoothChooser::ShowOverviewLink(
|
| + content::WebContents* web_contents) {
|
| + ShowLink(web_contents, GURL(kOverviewURL));
|
| +}
|
| +
|
| +void BluetoothChooser::ShowPairingLink(
|
| + content::WebContents* web_contents) {
|
| + ShowLink(web_contents, GURL(kPairingURL));
|
| +}
|
| +
|
| +void BluetoothChooser::ShowAdapterOffLink(
|
| + content::WebContents* web_contents) {
|
| + ShowLink(web_contents, GURL(kAdapterOffURL));
|
| +
|
| +}
|
| +
|
| +
|
| } // namespace content
|
|
|