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

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: modified WebUsbBrowserClient::Set function again 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 "chrome/browser/net/referrer.h"
8 #include "chrome/browser/profiles/profile_manager.h"
9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/browser_finder.h"
11 #include "chrome/browser/ui/host_desktop.h"
12 #include "ui/base/page_transition_types.h"
13 #include "ui/base/window_open_disposition.h"
14 #include "url/gurl.h"
15
16 ChromeWebUsbBrowserClient::ChromeWebUsbBrowserClient() {}
17
18 ChromeWebUsbBrowserClient::~ChromeWebUsbBrowserClient() {}
19
20 void ChromeWebUsbBrowserClient::OpenURL(const GURL& url) {
21 Browser* browser = chrome::FindBrowserWithProfile(
22 ProfileManager::GetActiveUserProfile(), chrome::HOST_DESKTOP_TYPE_NATIVE);
23 content::OpenURLParams params(url, content::Referrer(), NEW_FOREGROUND_TAB,
24 ui::PAGE_TRANSITION_AUTO_TOPLEVEL, true);
25 browser->OpenURL(params);
26 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698