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 #include "chrome/browser/usb/usb_chooser_bubble_delegate.h" | 5 #include "chrome/browser/usb/usb_chooser_bubble_delegate.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/metrics/histogram_macros.h" | 11 #include "base/metrics/histogram_macros.h" |
12 #include "base/stl_util.h" | 12 #include "base/stl_util.h" |
13 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
14 #include "chrome/browser/usb/usb_chooser_context.h" | 14 #include "chrome/browser/usb/usb_chooser_context.h" |
15 #include "chrome/browser/usb/usb_chooser_context_factory.h" | 15 #include "chrome/browser/usb/usb_chooser_context_factory.h" |
16 #include "components/bubble/bubble_controller.h" | 16 #include "components/bubble/bubble_controller.h" |
17 #include "content/public/browser/render_frame_host.h" | 17 #include "content/public/browser/render_frame_host.h" |
18 #include "content/public/browser/web_contents.h" | 18 #include "content/public/browser/web_contents.h" |
19 #include "device/core/device_client.h" | 19 #include "device/core/device_client.h" |
20 #include "device/devices_app/usb/type_converters.h" | 20 #include "device/usb/mojo/type_converters.h" |
21 #include "device/usb/usb_device.h" | 21 #include "device/usb/usb_device.h" |
22 #include "device/usb/usb_device_filter.h" | 22 #include "device/usb/usb_device_filter.h" |
23 #include "url/gurl.h" | 23 #include "url/gurl.h" |
24 | 24 |
25 namespace { | 25 namespace { |
26 | 26 |
27 // Reasons the chooser may be closed. These are used in histograms so do not | 27 // Reasons the chooser may be closed. These are used in histograms so do not |
28 // remove/reorder entries. Only add at the end just before | 28 // remove/reorder entries. Only add at the end just before |
29 // WEBUSB_CHOOSER_CLOSED_MAX. Also remember to update the enum listing in | 29 // WEBUSB_CHOOSER_CLOSED_MAX. Also remember to update the enum listing in |
30 // tools/metrics/histograms/histograms.xml. | 30 // tools/metrics/histograms/histograms.xml. |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 } | 187 } |
188 } | 188 } |
189 if (observer()) | 189 if (observer()) |
190 observer()->OnOptionsInitialized(); | 190 observer()->OnOptionsInitialized(); |
191 } | 191 } |
192 | 192 |
193 void UsbChooserBubbleDelegate::set_bubble_controller( | 193 void UsbChooserBubbleDelegate::set_bubble_controller( |
194 BubbleReference bubble_controller) { | 194 BubbleReference bubble_controller) { |
195 bubble_controller_ = bubble_controller; | 195 bubble_controller_ = bubble_controller; |
196 } | 196 } |
OLD | NEW |