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

Side by Side Diff: chrome/browser/chrome_webusb_browser_client.cc

Issue 1289423002: Add webusb notification UI code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updated gn file 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 "chrome/browser/chrome_webusb_browser_client.h"
6
7 #include "base/command_line.h"
8 #include "chrome/browser/net/referrer.h"
9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/ui/browser.h"
11 #include "chrome/browser/ui/browser_finder.h"
12 #include "chrome/browser/ui/host_desktop.h"
13 #include "chrome/common/chrome_switches.h"
14 #include "ui/base/page_transition_types.h"
15 #include "ui/base/window_open_disposition.h"
16 #include "url/gurl.h"
17
18 ChromeWebUsbBrowserClient::ChromeWebUsbBrowserClient() {}
19
20 ChromeWebUsbBrowserClient::~ChromeWebUsbBrowserClient() {}
21
22 void ChromeWebUsbBrowserClient::OpenURL(Profile* profile, const GURL& url) {
23 Browser* browser =
24 chrome::FindBrowserWithProfile(profile, chrome::HOST_DESKTOP_TYPE_NATIVE);
Reilly Grant (use Gerrit) 2015/08/18 18:30:02 I think we can use ProfileManager::GetActiveProfil
juncai 2015/08/20 15:56:32 Done.
25 content::OpenURLParams params(url, content::Referrer(), NEW_FOREGROUND_TAB,
26 ui::PAGE_TRANSITION_AUTO_TOPLEVEL, true);
27 browser->OpenURL(params);
28 }
29
30 bool ChromeWebUsbBrowserClient::WebUsbNotificationEnabled() {
31 return base::CommandLine::ForCurrentProcess()->HasSwitch(
32 switches::kEnableWebUsbNotification);
33 }
OLDNEW
« no previous file with comments | « chrome/browser/chrome_webusb_browser_client.h ('k') | chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698