OLD | NEW |
(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 } |
OLD | NEW |