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/chrome_webusb_browser_client.h" | 5 #include "chrome/browser/chrome_webusb_browser_client.h" |
6 | 6 |
7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "chrome/browser/net/referrer.h" | 8 #include "chrome/browser/net/referrer.h" |
9 #include "chrome/browser/profiles/profile_manager.h" | 9 #include "chrome/browser/profiles/profile_manager.h" |
10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
11 #include "chrome/browser/ui/browser_finder.h" | 11 #include "chrome/browser/ui/browser_finder.h" |
12 #include "chrome/browser/ui/host_desktop.h" | |
13 #include "chrome/grit/generated_resources.h" | 12 #include "chrome/grit/generated_resources.h" |
14 #include "content/public/common/origin_util.h" | 13 #include "content/public/common/origin_util.h" |
15 #include "ui/base/l10n/l10n_util.h" | 14 #include "ui/base/l10n/l10n_util.h" |
16 #include "ui/base/page_transition_types.h" | 15 #include "ui/base/page_transition_types.h" |
17 #include "ui/base/window_open_disposition.h" | 16 #include "ui/base/window_open_disposition.h" |
| 17 #include "ui/gfx/host_desktop_type.h" |
18 #include "ui/gfx/image/image.h" | 18 #include "ui/gfx/image/image.h" |
19 #include "ui/message_center/message_center.h" | 19 #include "ui/message_center/message_center.h" |
20 #include "ui/message_center/notification.h" | 20 #include "ui/message_center/notification.h" |
21 #include "ui/message_center/notification_delegate.h" | 21 #include "ui/message_center/notification_delegate.h" |
22 #include "url/gurl.h" | 22 #include "url/gurl.h" |
23 | 23 |
24 namespace { | 24 namespace { |
25 | 25 |
26 const char kWebUsbDetectorNotificationID[] = "webusb.detector"; | 26 const char kWebUsbDetectorNotificationID[] = "webusb.detector"; |
27 | 27 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 } | 92 } |
93 | 93 |
94 void ChromeWebUsbBrowserClient::OnDeviceRemoved( | 94 void ChromeWebUsbBrowserClient::OnDeviceRemoved( |
95 const std::string& notification_id) { | 95 const std::string& notification_id) { |
96 message_center::MessageCenter* message_center = | 96 message_center::MessageCenter* message_center = |
97 message_center::MessageCenter::Get(); | 97 message_center::MessageCenter::Get(); |
98 if (message_center->FindVisibleNotificationById(notification_id)) { | 98 if (message_center->FindVisibleNotificationById(notification_id)) { |
99 message_center->RemoveNotification(notification_id, false /* by_user */); | 99 message_center->RemoveNotification(notification_id, false /* by_user */); |
100 } | 100 } |
101 } | 101 } |
OLD | NEW |