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

Side by Side Diff: chrome/browser/ui/browser.cc

Issue 7782026: Switch from chrome://extensions to chrome://settings/extensionSettings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/ui/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #endif // OS_WIN 10 #endif // OS_WIN
(...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 UMA_HISTOGRAM_ENUMERATION("Extensions.AppTabLaunchType", launch_type, 100); 732 UMA_HISTOGRAM_ENUMERATION("Extensions.AppTabLaunchType", launch_type, 100);
733 int add_type = TabStripModel::ADD_ACTIVE; 733 int add_type = TabStripModel::ADD_ACTIVE;
734 if (launch_type == ExtensionPrefs::LAUNCH_PINNED) 734 if (launch_type == ExtensionPrefs::LAUNCH_PINNED)
735 add_type |= TabStripModel::ADD_PINNED; 735 add_type |= TabStripModel::ADD_PINNED;
736 736
737 // For extensions lacking launch urls, determine a reasonable fallback. 737 // For extensions lacking launch urls, determine a reasonable fallback.
738 GURL extension_url = extension->GetFullLaunchURL(); 738 GURL extension_url = extension->GetFullLaunchURL();
739 if (!extension_url.is_valid()) { 739 if (!extension_url.is_valid()) {
740 extension_url = extension->options_url(); 740 extension_url = extension->options_url();
741 if (!extension_url.is_valid()) 741 if (!extension_url.is_valid())
742 extension_url = GURL(chrome::kChromeUIExtensionsURL); 742 extension_url = GURL(std::string(chrome::kChromeUISettingsURL) +
743 chrome::kExtensionsSubPage);
743 } 744 }
744 745
745 // TODO(erikkay): START_PAGE doesn't seem like the right transition in all 746 // TODO(erikkay): START_PAGE doesn't seem like the right transition in all
746 // cases. 747 // cases.
747 browser::NavigateParams params(browser, extension_url, 748 browser::NavigateParams params(browser, extension_url,
748 PageTransition::START_PAGE); 749 PageTransition::START_PAGE);
749 params.tabstrip_add_types = add_type; 750 params.tabstrip_add_types = add_type;
750 params.disposition = disposition; 751 params.disposition = disposition;
751 752
752 if (disposition == CURRENT_TAB) { 753 if (disposition == CURRENT_TAB) {
(...skipping 1310 matching lines...) Expand 10 before | Expand all | Expand 10 after
2063 if (shelf->IsShowing()) 2064 if (shelf->IsShowing())
2064 shelf->Close(); 2065 shelf->Close();
2065 } 2066 }
2066 #endif 2067 #endif
2067 ShowSingletonTabOverwritingNTP( 2068 ShowSingletonTabOverwritingNTP(
2068 GetSingletonTabNavigateParams(GURL(chrome::kChromeUIDownloadsURL))); 2069 GetSingletonTabNavigateParams(GURL(chrome::kChromeUIDownloadsURL)));
2069 } 2070 }
2070 2071
2071 void Browser::ShowExtensionsTab() { 2072 void Browser::ShowExtensionsTab() {
2072 UserMetrics::RecordAction(UserMetricsAction("ShowExtensions")); 2073 UserMetrics::RecordAction(UserMetricsAction("ShowExtensions"));
2073 ShowSingletonTabOverwritingNTP( 2074 ShowOptionsTab(chrome::kExtensionsSubPage);
2074 GetSingletonTabNavigateParams(GURL(chrome::kChromeUIExtensionsURL)));
2075 } 2075 }
2076 2076
2077 void Browser::ShowAboutConflictsTab() { 2077 void Browser::ShowAboutConflictsTab() {
2078 UserMetrics::RecordAction(UserMetricsAction("AboutConflicts")); 2078 UserMetrics::RecordAction(UserMetricsAction("AboutConflicts"));
2079 ShowSingletonTab(GURL(chrome::kChromeUIConflictsURL)); 2079 ShowSingletonTab(GURL(chrome::kChromeUIConflictsURL));
2080 } 2080 }
2081 2081
2082 void Browser::ShowBrokenPageTab(TabContents* contents) { 2082 void Browser::ShowBrokenPageTab(TabContents* contents) {
2083 UserMetrics::RecordAction(UserMetricsAction("ReportBug")); 2083 UserMetrics::RecordAction(UserMetricsAction("ReportBug"));
2084 string16 page_title = contents->GetTitle(); 2084 string16 page_title = contents->GetTitle();
(...skipping 3169 matching lines...) Expand 10 before | Expand all | Expand 10 after
5254 profile()->GetOriginalProfile()->GetProfileSyncService(); 5254 profile()->GetOriginalProfile()->GetProfileSyncService();
5255 if (service->HasSyncSetupCompleted()) 5255 if (service->HasSyncSetupCompleted())
5256 ShowOptionsTab(chrome::kSyncSetupSubPage); 5256 ShowOptionsTab(chrome::kSyncSetupSubPage);
5257 else 5257 else
5258 service->ShowLoginDialog(); 5258 service->ShowLoginDialog();
5259 } 5259 }
5260 5260
5261 void Browser::ToggleSpeechInput() { 5261 void Browser::ToggleSpeechInput() {
5262 GetSelectedTabContentsWrapper()->render_view_host()->ToggleSpeechInput(); 5262 GetSelectedTabContentsWrapper()->render_view_host()->ToggleSpeechInput();
5263 } 5263 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698