OLD | NEW |
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 <shellapi.h> | 8 #include <shellapi.h> |
9 #include <windows.h> | 9 #include <windows.h> |
10 #endif // OS_WIN | 10 #endif // OS_WIN |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 #include "chrome/browser/ui/view_ids.h" | 123 #include "chrome/browser/ui/view_ids.h" |
124 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" | 124 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" |
125 #endif // OS_WIN | 125 #endif // OS_WIN |
126 | 126 |
127 #if defined(OS_MACOSX) | 127 #if defined(OS_MACOSX) |
128 #include "chrome/browser/ui/cocoa/find_pasteboard.h" | 128 #include "chrome/browser/ui/cocoa/find_pasteboard.h" |
129 #endif | 129 #endif |
130 | 130 |
131 #if defined(OS_CHROMEOS) | 131 #if defined(OS_CHROMEOS) |
132 #include "chrome/browser/chromeos/boot_times_loader.h" | 132 #include "chrome/browser/chromeos/boot_times_loader.h" |
133 #include "chrome/browser/chromeos/options/language_config_view.h" | |
134 #endif | 133 #endif |
135 | 134 |
136 using base::TimeDelta; | 135 using base::TimeDelta; |
137 | 136 |
138 /////////////////////////////////////////////////////////////////////////////// | 137 /////////////////////////////////////////////////////////////////////////////// |
139 | 138 |
140 namespace { | 139 namespace { |
141 | 140 |
142 // The URL to be loaded to display Help. | 141 // The URL to be loaded to display Help. |
143 #if defined(OS_CHROMEOS) | 142 #if defined(OS_CHROMEOS) |
(...skipping 1779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1923 } | 1922 } |
1924 } | 1923 } |
1925 | 1924 |
1926 void Browser::OpenLanguageOptionsDialog() { | 1925 void Browser::OpenLanguageOptionsDialog() { |
1927 UserMetrics::RecordAction(UserMetricsAction("OpenLanguageOptionsDialog"), | 1926 UserMetrics::RecordAction(UserMetricsAction("OpenLanguageOptionsDialog"), |
1928 profile_); | 1927 profile_); |
1929 if (!CommandLine::ForCurrentProcess()->HasSwitch( | 1928 if (!CommandLine::ForCurrentProcess()->HasSwitch( |
1930 switches::kDisableTabbedOptions)) { | 1929 switches::kDisableTabbedOptions)) { |
1931 ShowOptionsTab(chrome::kLanguageOptionsSubPage); | 1930 ShowOptionsTab(chrome::kLanguageOptionsSubPage); |
1932 } else { | 1931 } else { |
1933 chromeos::LanguageConfigView::Show(profile_, NULL); | 1932 // Language options dialog has been replaced by DOMUI. |
1934 } | 1933 } |
1935 } | 1934 } |
1936 | 1935 |
1937 void Browser::OpenSystemTabAndActivate() { | 1936 void Browser::OpenSystemTabAndActivate() { |
1938 OpenURL(GURL(chrome::kChromeUISystemInfoURL), GURL(), | 1937 OpenURL(GURL(chrome::kChromeUISystemInfoURL), GURL(), |
1939 NEW_FOREGROUND_TAB, PageTransition::LINK); | 1938 NEW_FOREGROUND_TAB, PageTransition::LINK); |
1940 window_->Activate(); | 1939 window_->Activate(); |
1941 } | 1940 } |
1942 | 1941 |
1943 void Browser::OpenMobilePlanTabAndActivate() { | 1942 void Browser::OpenMobilePlanTabAndActivate() { |
(...skipping 2322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4266 // The page transition below is only for the purpose of inserting the tab. | 4265 // The page transition below is only for the purpose of inserting the tab. |
4267 browser->AddTab(view_source_contents, PageTransition::LINK); | 4266 browser->AddTab(view_source_contents, PageTransition::LINK); |
4268 } | 4267 } |
4269 | 4268 |
4270 if (profile_->HasSessionService()) { | 4269 if (profile_->HasSessionService()) { |
4271 SessionService* session_service = profile_->GetSessionService(); | 4270 SessionService* session_service = profile_->GetSessionService(); |
4272 if (session_service) | 4271 if (session_service) |
4273 session_service->TabRestored(&view_source_contents->controller(), false); | 4272 session_service->TabRestored(&view_source_contents->controller(), false); |
4274 } | 4273 } |
4275 } | 4274 } |
OLD | NEW |