1 // Copyright (c) 2010 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/ui/options/show_options_url.h" 6 7 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser_window.h" 10 11 namespace browser { 12 13 void ShowOptionsURL(Profile* profile, const GURL& url) { 14 // We open a new browser window so the Options dialog doesn't get lost behind 15 // other windows. 16 Browser* browser = Browser::Create(profile); 17 browser->AddSelectedTabWithURL(url, PageTransition::LINK); 18 browser->window()->Show(); 19 } 20 21 } // namespace browser 22