| Index: chrome/browser/usb/usb_chooser_bubble_controller.h
|
| diff --git a/chrome/browser/usb/usb_chooser_bubble_delegate.h b/chrome/browser/usb/usb_chooser_bubble_controller.h
|
| similarity index 69%
|
| rename from chrome/browser/usb/usb_chooser_bubble_delegate.h
|
| rename to chrome/browser/usb/usb_chooser_bubble_controller.h
|
| index 4921b0f2c4cdbcbd25dd537facc6878b088030f5..6de8fb04307fc4a3baa8652b6079077c2cfb9d8c 100644
|
| --- a/chrome/browser/usb/usb_chooser_bubble_delegate.h
|
| +++ b/chrome/browser/usb/usb_chooser_bubble_controller.h
|
| @@ -2,8 +2,8 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef CHROME_BROWSER_USB_USB_CHOOSER_BUBBLE_DELEGATE_H_
|
| -#define CHROME_BROWSER_USB_USB_CHOOSER_BUBBLE_DELEGATE_H_
|
| +#ifndef CHROME_BROWSER_USB_USB_CHOOSER_BUBBLE_CONTROLLER_H_
|
| +#define CHROME_BROWSER_USB_USB_CHOOSER_BUBBLE_CONTROLLER_H_
|
|
|
| #include <utility>
|
|
|
| @@ -11,7 +11,7 @@
|
| #include "base/memory/ref_counted.h"
|
| #include "base/memory/weak_ptr.h"
|
| #include "base/scoped_observer.h"
|
| -#include "chrome/browser/ui/website_settings/chooser_bubble_delegate.h"
|
| +#include "chrome/browser/ui/website_settings/chooser_bubble_controller.h"
|
| #include "components/bubble/bubble_reference.h"
|
| #include "components/webusb/public/interfaces/webusb_permission_bubble.mojom.h"
|
| #include "device/usb/usb_service.h"
|
| @@ -26,18 +26,18 @@ class UsbDevice;
|
| class UsbDeviceFilter;
|
| }
|
|
|
| -// UsbChooserBubbleDelegate creates a chooser bubble for WebUsb.
|
| -class UsbChooserBubbleDelegate : public ChooserBubbleDelegate,
|
| - public device::UsbService::Observer {
|
| +// UsbChooserBubbleController creates a chooser bubble for WebUsb.
|
| +class UsbChooserBubbleController : public ChooserBubbleController,
|
| + public device::UsbService::Observer {
|
| public:
|
| - UsbChooserBubbleDelegate(
|
| + UsbChooserBubbleController(
|
| content::RenderFrameHost* owner,
|
| mojo::Array<device::usb::DeviceFilterPtr> device_filters,
|
| content::RenderFrameHost* render_frame_host,
|
| const webusb::WebUsbPermissionBubble::GetPermissionCallback& callback);
|
| - ~UsbChooserBubbleDelegate() override;
|
| + ~UsbChooserBubbleController() override;
|
|
|
| - // ChooserBubbleDelegate:
|
| + // ChooserBubbleController:
|
| size_t NumOptions() const override;
|
| const base::string16& GetOption(size_t index) const override;
|
| void Select(size_t index) override;
|
| @@ -52,7 +52,7 @@ class UsbChooserBubbleDelegate : public ChooserBubbleDelegate,
|
| void GotUsbDeviceList(
|
| const std::vector<scoped_refptr<device::UsbDevice>>& devices);
|
|
|
| - void set_bubble_controller(BubbleReference bubble_controller);
|
| + void set_bubble_reference(BubbleReference bubble_reference);
|
|
|
| private:
|
| content::RenderFrameHost* const render_frame_host_;
|
| @@ -63,10 +63,10 @@ class UsbChooserBubbleDelegate : public ChooserBubbleDelegate,
|
| // Each pair is a (device, device name).
|
| std::vector<std::pair<scoped_refptr<device::UsbDevice>, base::string16>>
|
| devices_;
|
| - BubbleReference bubble_controller_;
|
| - base::WeakPtrFactory<UsbChooserBubbleDelegate> weak_factory_;
|
| + BubbleReference bubble_reference_;
|
| + base::WeakPtrFactory<UsbChooserBubbleController> weak_factory_;
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(UsbChooserBubbleDelegate);
|
| + DISALLOW_COPY_AND_ASSIGN(UsbChooserBubbleController);
|
| };
|
|
|
| -#endif // CHROME_BROWSER_USB_USB_CHOOSER_BUBBLE_DELEGATE_H_
|
| +#endif // CHROME_BROWSER_USB_USB_CHOOSER_BUBBLE_CONTROLLER_H_
|
|
|