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

Side by Side Diff: components/webusb/webusb_browser_client.cc

Issue 1289423002: Add webusb notification UI code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: moved webusb::WebUsbDetector::GetInstance() call to chrome_browser_main.cc Created 5 years, 4 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "components/webusb/webusb_browser_client.h"
6
7 namespace webusb {
8
9 namespace {
10
11 WebUsbBrowserClient* webusb_browser_client = nullptr;
12
13 } // namespace
14
15 WebUsbBrowserClient* WebUsbBrowserClient::Get() {
16 if (!webusb_browser_client ||
17 !webusb_browser_client->WebUsbNotificationEnabled()) {
Reilly Grant (use Gerrit) 2015/08/20 17:02:45 This feels weird. Why not just not Set() the brows
juncai 2015/08/21 05:16:04 Done.
18 return nullptr;
19 }
20 return webusb_browser_client;
21 }
22
23 void WebUsbBrowserClient::Set(WebUsbBrowserClient* client) {
24 webusb_browser_client = client;
25 }
26
27 } // namespace webusb
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698