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 #ifndef CHROME_BROWSER_UI_ANDROID_BLUETOOTH_CHOOSER_ANDROID_H_ | 5 #ifndef CHROME_BROWSER_UI_ANDROID_BLUETOOTH_CHOOSER_ANDROID_H_ |
6 #define CHROME_BROWSER_UI_ANDROID_BLUETOOTH_CHOOSER_ANDROID_H_ | 6 #define CHROME_BROWSER_UI_ANDROID_BLUETOOTH_CHOOSER_ANDROID_H_ |
7 | 7 |
8 #include "base/android/scoped_java_ref.h" | 8 #include "base/android/scoped_java_ref.h" |
9 #include "content/public/browser/bluetooth_chooser.h" | 9 #include "content/public/browser/bluetooth_chooser.h" |
10 #include "content/public/browser/web_contents.h" | 10 #include "content/public/browser/web_contents.h" |
11 | 11 |
12 namespace url { | |
13 class Origin; | |
14 } | |
15 | |
16 // Represents a way to ask the user to select a Bluetooth device from a list of | 12 // Represents a way to ask the user to select a Bluetooth device from a list of |
17 // options. | 13 // options. |
18 class BluetoothChooserAndroid : public content::BluetoothChooser { | 14 class BluetoothChooserAndroid : public content::BluetoothChooser { |
19 public: | 15 public: |
20 // Both frame and event_handler must outlive the BluetoothChooserAndroid. | 16 // Both frame and event_handler must outlive the BluetoothChooserAndroid. |
21 BluetoothChooserAndroid(content::RenderFrameHost* frame, | 17 BluetoothChooserAndroid(content::RenderFrameHost* frame, |
22 const EventHandler& event_handler); | 18 const EventHandler& event_handler); |
23 ~BluetoothChooserAndroid() override; | 19 ~BluetoothChooserAndroid() override; |
24 | 20 |
25 // content::BluetoothChooser: | 21 // content::BluetoothChooser: |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 | 55 |
60 private: | 56 private: |
61 void OpenURL(const char* url); | 57 void OpenURL(const char* url); |
62 base::android::ScopedJavaGlobalRef<jobject> java_dialog_; | 58 base::android::ScopedJavaGlobalRef<jobject> java_dialog_; |
63 | 59 |
64 content::WebContents* web_contents_; | 60 content::WebContents* web_contents_; |
65 BluetoothChooser::EventHandler event_handler_; | 61 BluetoothChooser::EventHandler event_handler_; |
66 }; | 62 }; |
67 | 63 |
68 #endif // CHROME_BROWSER_UI_ANDROID_BLUETOOTH_CHOOSER_ANDROID_H_ | 64 #endif // CHROME_BROWSER_UI_ANDROID_BLUETOOTH_CHOOSER_ANDROID_H_ |
OLD | NEW |