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

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 716 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 UMA_HISTOGRAM_ENUMERATION("Extensions.AppTabLaunchType", launch_type, 100); 727 UMA_HISTOGRAM_ENUMERATION("Extensions.AppTabLaunchType", launch_type, 100);
728 int add_type = TabStripModel::ADD_ACTIVE; 728 int add_type = TabStripModel::ADD_ACTIVE;
729 if (launch_type == ExtensionPrefs::LAUNCH_PINNED) 729 if (launch_type == ExtensionPrefs::LAUNCH_PINNED)
730 add_type |= TabStripModel::ADD_PINNED; 730 add_type |= TabStripModel::ADD_PINNED;
731 731
732 // For extensions lacking launch urls, determine a reasonable fallback. 732 // For extensions lacking launch urls, determine a reasonable fallback.
733 GURL extension_url = extension->GetFullLaunchURL(); 733 GURL extension_url = extension->GetFullLaunchURL();
734 if (!extension_url.is_valid()) { 734 if (!extension_url.is_valid()) {
735 extension_url = extension->options_url(); 735 extension_url = extension->options_url();
736 if (!extension_url.is_valid()) 736 if (!extension_url.is_valid())
737 extension_url = GURL(chrome::kChromeUIExtensionsURL); 737 extension_url = GURL(chrome::kChromeUISettingsURL).Resolve(
738 chrome::kExtensionsSubPage);
738 } 739 }
739 740
740 // TODO(erikkay): START_PAGE doesn't seem like the right transition in all 741 // TODO(erikkay): START_PAGE doesn't seem like the right transition in all
741 // cases. 742 // cases.
742 browser::NavigateParams params(browser, extension_url, 743 browser::NavigateParams params(browser, extension_url,
743 PageTransition::START_PAGE); 744 PageTransition::START_PAGE);
744 params.tabstrip_add_types = add_type; 745 params.tabstrip_add_types = add_type;
745 params.disposition = disposition; 746 params.disposition = disposition;
746 747
747 if (disposition == CURRENT_TAB) { 748 if (disposition == CURRENT_TAB) {
(...skipping 1313 matching lines...) Expand 10 before | Expand all | Expand 10 after
2061 if (shelf->IsShowing()) 2062 if (shelf->IsShowing())
2062 shelf->Close(); 2063 shelf->Close();
2063 } 2064 }
2064 #endif 2065 #endif
2065 ShowSingletonTabOverwritingNTP( 2066 ShowSingletonTabOverwritingNTP(
2066 GetSingletonTabNavigateParams(GURL(chrome::kChromeUIDownloadsURL))); 2067 GetSingletonTabNavigateParams(GURL(chrome::kChromeUIDownloadsURL)));
2067 } 2068 }
2068 2069
2069 void Browser::ShowExtensionsTab() { 2070 void Browser::ShowExtensionsTab() {
2070 UserMetrics::RecordAction(UserMetricsAction("ShowExtensions")); 2071 UserMetrics::RecordAction(UserMetricsAction("ShowExtensions"));
2071 ShowSingletonTabOverwritingNTP( 2072 ShowOptionsTab(chrome::kExtensionsSubPage);
2072 GetSingletonTabNavigateParams(GURL(chrome::kChromeUIExtensionsURL)));
2073 } 2073 }
2074 2074
2075 void Browser::ShowAboutConflictsTab() { 2075 void Browser::ShowAboutConflictsTab() {
2076 UserMetrics::RecordAction(UserMetricsAction("AboutConflicts")); 2076 UserMetrics::RecordAction(UserMetricsAction("AboutConflicts"));
2077 ShowSingletonTab(GURL(chrome::kChromeUIConflictsURL)); 2077 ShowSingletonTab(GURL(chrome::kChromeUIConflictsURL));
2078 } 2078 }
2079 2079
2080 void Browser::ShowBrokenPageTab(TabContents* contents) { 2080 void Browser::ShowBrokenPageTab(TabContents* contents) {
2081 UserMetrics::RecordAction(UserMetricsAction("ReportBug")); 2081 UserMetrics::RecordAction(UserMetricsAction("ReportBug"));
2082 string16 page_title = contents->GetTitle(); 2082 string16 page_title = contents->GetTitle();
(...skipping 3105 matching lines...) Expand 10 before | Expand all | Expand 10 after
5188 profile()->GetOriginalProfile()->GetProfileSyncService(); 5188 profile()->GetOriginalProfile()->GetProfileSyncService();
5189 if (service->HasSyncSetupCompleted()) 5189 if (service->HasSyncSetupCompleted())
5190 ShowOptionsTab(chrome::kSyncSetupSubPage); 5190 ShowOptionsTab(chrome::kSyncSetupSubPage);
5191 else 5191 else
5192 service->ShowLoginDialog(); 5192 service->ShowLoginDialog();
5193 } 5193 }
5194 5194
5195 void Browser::ToggleSpeechInput() { 5195 void Browser::ToggleSpeechInput() {
5196 GetSelectedTabContentsWrapper()->render_view_host()->ToggleSpeechInput(); 5196 GetSelectedTabContentsWrapper()->render_view_host()->ToggleSpeechInput();
5197 } 5197 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698