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

Side by Side Diff: content/public/browser/bluetooth_chooser.cc

Issue 1315093002: Implement a bluetooth picker dialog for Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Re-add line removed during merge Created 5 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 unified diff | Download patch
OLDNEW
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 #include "content/public/browser/bluetooth_chooser.h" 5 #include "content/public/browser/bluetooth_chooser.h"
6 6
7 #include "content/public/browser/web_contents_delegate.h"
8 #include "ui/base/page_transition_types.h"
9
10 namespace {
11
12 // TODO(finnur): These need to be actual HC article links.
13 const char kOverviewURL[] = "https://www.google.com/?gws_rd=ssl#q=overview";
14 const char kPairingURL[] = "https://www.google.com/?gws_rd=ssl#q=pairing";
15 const char kAdapterOffURL[] = "https://www.google.com/?gws_rd=ssl#q=adapteroff";
16
17 void ShowLink(content::WebContents* web_contents, const GURL& link) {
18 content::OpenURLParams params = content::OpenURLParams(
19 link,
20 content::Referrer(),
21 NEW_FOREGROUND_TAB,
22 ui::PageTransition::PAGE_TRANSITION_LINK,
23 false);
24 content::WebContentsDelegate* delegate = web_contents->GetDelegate();
25 delegate->OpenURLFromTab(web_contents, params);
26 }
27
28 } // namespace
29
7 namespace content { 30 namespace content {
8 31
9 BluetoothChooser::~BluetoothChooser() {} 32 BluetoothChooser::~BluetoothChooser() {}
10 33
34 void BluetoothChooser::ShowOverviewLink(
35 content::WebContents* web_contents) {
36 ShowLink(web_contents, GURL(kOverviewURL));
37 }
38
39 void BluetoothChooser::ShowPairingLink(
40 content::WebContents* web_contents) {
41 ShowLink(web_contents, GURL(kPairingURL));
42 }
43
44 void BluetoothChooser::ShowAdapterOffLink(
45 content::WebContents* web_contents) {
46 ShowLink(web_contents, GURL(kAdapterOffURL));
47
48 }
49
50
11 } // namespace content 51 } // namespace content
OLDNEW
« content/public/browser/bluetooth_chooser.h ('K') | « content/public/browser/bluetooth_chooser.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698