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

Unified Diff: chrome/browser/show_options_url.cc

Issue 3655006: Fixes bugs in usage of adding a new tab with a disposition of (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: More mac fixes Created 10 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/show_options_url.h ('k') | chrome/browser/task_manager/task_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/show_options_url.cc
diff --git a/chrome/browser/show_options_url.cc b/chrome/browser/show_options_url.cc
new file mode 100644
index 0000000000000000000000000000000000000000..ec18e4f56b28cc9d450249d6d0f1cd3e766e57a5
--- /dev/null
+++ b/chrome/browser/show_options_url.cc
@@ -0,0 +1,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/browser.h"
+#include "chrome/browser/browser_window.h"
+#include "chrome/browser/profile.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
« no previous file with comments | « chrome/browser/show_options_url.h ('k') | chrome/browser/task_manager/task_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698