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

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

Issue 1672103002: Pass the frame instead of the WebContents through RunBluetoothChooser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@doc-bubble-lifetimes
Patch Set: Sync Created 4 years, 10 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 #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 { 12 namespace url {
13 class Origin; 13 class Origin;
14 } 14 }
15 15
16 // Represents a way to ask the user to select a Bluetooth device from a list of 16 // Represents a way to ask the user to select a Bluetooth device from a list of
17 // options. 17 // options.
18 class BluetoothChooserAndroid : public content::BluetoothChooser { 18 class BluetoothChooserAndroid : public content::BluetoothChooser {
19 public: 19 public:
20 BluetoothChooserAndroid(content::WebContents* web_contents, 20 BluetoothChooserAndroid(content::RenderFrameHost* frame,
21 const EventHandler& event_handler, 21 const EventHandler& event_handler,
22 const url::Origin& origin); 22 const url::Origin& origin);
23 ~BluetoothChooserAndroid() override; 23 ~BluetoothChooserAndroid() override;
24 24
25 // content::BluetoothChooser: 25 // content::BluetoothChooser:
26 bool CanAskForScanningPermission() override; 26 bool CanAskForScanningPermission() override;
27 void SetAdapterPresence(AdapterPresence presence) override; 27 void SetAdapterPresence(AdapterPresence presence) override;
28 void ShowDiscoveryState(DiscoveryState state) override; 28 void ShowDiscoveryState(DiscoveryState state) override;
29 void AddDevice(const std::string& device_id, 29 void AddDevice(const std::string& device_id,
30 const base::string16& device_name) override; 30 const base::string16& device_name) override;
(...skipping 24 matching lines...) Expand all
55 55
56 static bool Register(JNIEnv* env); 56 static bool Register(JNIEnv* env);
57 57
58 private: 58 private:
59 base::android::ScopedJavaGlobalRef<jobject> java_dialog_; 59 base::android::ScopedJavaGlobalRef<jobject> java_dialog_;
60 60
61 BluetoothChooser::EventHandler event_handler_; 61 BluetoothChooser::EventHandler event_handler_;
62 }; 62 };
63 63
64 #endif // CHROME_BROWSER_UI_ANDROID_BLUETOOTH_CHOOSER_ANDROID_H_ 64 #endif // CHROME_BROWSER_UI_ANDROID_BLUETOOTH_CHOOSER_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698