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

Side by Side Diff: chrome/browser/ui/android/bluetooth_chooser_android.h

Issue 1315093002: Implement a bluetooth picker dialog for Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove redundant include 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_ANDROID_BLUETOOTH_CHOOSER_ANDROID_H_
6 #define CHROME_BROWSER_UI_ANDROID_BLUETOOTH_CHOOSER_ANDROID_H_
7
8 #include "base/android/scoped_java_ref.h"
9 #include "content/public/browser/bluetooth_chooser.h"
10 #include "content/public/browser/web_contents.h"
11
12 // Represents a way to ask the user to select a Bluetooth device from a list of
13 // options.
14 class BluetoothChooserAndroid : public content::BluetoothChooser {
15 public:
16 BluetoothChooserAndroid(content::WebContents* web_contents,
17 const EventHandler& event_handler,
18 const GURL& origin);
19 ~BluetoothChooserAndroid() override;
20
21 // content::BluetoothChooser:
22 void SetAdapterPresence(AdapterPresence presence) override;
23 void ShowDiscoveryState(DiscoveryState state) override;
24 void AddDevice(const std::string& device_id,
25 const base::string16& device_name) override;
26 void RemoveDevice(const std::string& device_id) override;
27
28 // Report which device was selected (device_id).
29 void OnDeviceSelected(JNIEnv* env, jobject obj, jstring device_id);
30
31 // Notify bluetooth stack that the search needs to be re-issued.
32 void RestartSearch(JNIEnv* env, jobject obj);
33
34 void ShowBluetoothOverviewLink(JNIEnv* env, jobject obj);
35 void ShowBluetoothPairingLink(JNIEnv* env, jobject obj);
36 void ShowBluetoothAdapterOffLink(JNIEnv* env, jobject obj);
37
38 static bool Register(JNIEnv* env);
39
40 private:
41 base::android::ScopedJavaGlobalRef<jobject> java_dialog_;
42
43 BluetoothChooser::EventHandler event_handler_;
44 };
45
46 #endif // CHROME_BROWSER_UI_ANDROID_BLUETOOTH_CHOOSER_ANDROID_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/chrome_web_contents_delegate_android.cc ('k') | chrome/browser/ui/android/bluetooth_chooser_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698