summaryrefslogtreecommitdiffstats
path: root/chrome/browser/show_options_url.cc
blob: 3761da4dbf7e2816f58b0d2ce57164b69e219f62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/show_options_url.h"

#include "chrome/browser/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_window.h"

namespace browser {

void ShowOptionsURL(Profile* profile, const GURL& url) {
  // We open a new browser window so the Options dialog doesn't get lost behind
  // other windows.
  Browser* browser = Browser::Create(profile);
  browser->AddSelectedTabWithURL(url, PageTransition::LINK);
  browser->window()->Show();
}

}  // namespace browser