OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/show_options_url.h" | 5 #include "chrome/browser/ui/options/show_options_url.h" |
6 | 6 |
7 #include "chrome/browser/profile.h" | 7 #include "chrome/browser/profile.h" |
8 #include "chrome/browser/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
9 #include "chrome/browser/ui/browser_window.h" | 9 #include "chrome/browser/ui/browser_window.h" |
10 | 10 |
11 namespace browser { | 11 namespace browser { |
12 | 12 |
13 void ShowOptionsURL(Profile* profile, const GURL& url) { | 13 void ShowOptionsURL(Profile* profile, const GURL& url) { |
14 // We open a new browser window so the Options dialog doesn't get lost behind | 14 // We open a new browser window so the Options dialog doesn't get lost behind |
15 // other windows. | 15 // other windows. |
16 Browser* browser = Browser::Create(profile); | 16 Browser* browser = Browser::Create(profile); |
17 browser->AddSelectedTabWithURL(url, PageTransition::LINK); | 17 browser->AddSelectedTabWithURL(url, PageTransition::LINK); |
18 browser->window()->Show(); | 18 browser->window()->Show(); |
19 } | 19 } |
20 | 20 |
21 } // namespace browser | 21 } // namespace browser |
OLD | NEW |