OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 27 matching lines...) Expand all Loading... |
38 #include "chrome/browser/chrome_page_zoom.h" | 38 #include "chrome/browser/chrome_page_zoom.h" |
39 #include "chrome/browser/content_settings/host_content_settings_map.h" | 39 #include "chrome/browser/content_settings/host_content_settings_map.h" |
40 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" | 40 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" |
41 #include "chrome/browser/custom_handlers/register_protocol_handler_infobar_deleg
ate.h" | 41 #include "chrome/browser/custom_handlers/register_protocol_handler_infobar_deleg
ate.h" |
42 #include "chrome/browser/debugger/devtools_toggle_action.h" | 42 #include "chrome/browser/debugger/devtools_toggle_action.h" |
43 #include "chrome/browser/debugger/devtools_window.h" | 43 #include "chrome/browser/debugger/devtools_window.h" |
44 #include "chrome/browser/download/chrome_download_manager_delegate.h" | 44 #include "chrome/browser/download/chrome_download_manager_delegate.h" |
45 #include "chrome/browser/download/download_item_model.h" | 45 #include "chrome/browser/download/download_item_model.h" |
46 #include "chrome/browser/download/download_service.h" | 46 #include "chrome/browser/download/download_service.h" |
47 #include "chrome/browser/download/download_service_factory.h" | 47 #include "chrome/browser/download/download_service_factory.h" |
| 48 #include "chrome/browser/download/download_shelf.h" |
48 #include "chrome/browser/download/download_started_animation.h" | 49 #include "chrome/browser/download/download_started_animation.h" |
49 #include "chrome/browser/download/download_util.h" | 50 #include "chrome/browser/download/download_util.h" |
50 #include "chrome/browser/extensions/browser_extension_window_controller.h" | 51 #include "chrome/browser/extensions/browser_extension_window_controller.h" |
51 #include "chrome/browser/extensions/crx_installer.h" | 52 #include "chrome/browser/extensions/crx_installer.h" |
52 #include "chrome/browser/extensions/default_apps_trial.h" | 53 #include "chrome/browser/extensions/default_apps_trial.h" |
53 #include "chrome/browser/extensions/extension_browser_event_router.h" | 54 #include "chrome/browser/extensions/extension_browser_event_router.h" |
54 #include "chrome/browser/extensions/extension_prefs.h" | 55 #include "chrome/browser/extensions/extension_prefs.h" |
55 #include "chrome/browser/extensions/extension_service.h" | 56 #include "chrome/browser/extensions/extension_service.h" |
56 #include "chrome/browser/extensions/extension_tab_helper.h" | 57 #include "chrome/browser/extensions/extension_tab_helper.h" |
57 #include "chrome/browser/extensions/extension_tabs_module.h" | 58 #include "chrome/browser/extensions/extension_tabs_module.h" |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 #endif // OS_WIN | 199 #endif // OS_WIN |
199 | 200 |
200 #if defined(OS_MACOSX) | 201 #if defined(OS_MACOSX) |
201 #include "ui/base/cocoa/find_pasteboard.h" | 202 #include "ui/base/cocoa/find_pasteboard.h" |
202 #endif | 203 #endif |
203 | 204 |
204 #if defined(OS_CHROMEOS) | 205 #if defined(OS_CHROMEOS) |
205 #include "chrome/browser/chromeos/boot_times_loader.h" | 206 #include "chrome/browser/chromeos/boot_times_loader.h" |
206 #include "chrome/browser/chromeos/gdata/gdata_util.h" | 207 #include "chrome/browser/chromeos/gdata/gdata_util.h" |
207 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" | 208 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" |
| 209 #include "chrome/browser/extensions/api/terminal/terminal_extension_helper.h" |
208 #include "chromeos/dbus/dbus_thread_manager.h" | 210 #include "chromeos/dbus/dbus_thread_manager.h" |
209 #include "chromeos/dbus/power_manager_client.h" | 211 #include "chromeos/dbus/power_manager_client.h" |
210 #if defined(USE_AURA) | |
211 #include "chrome/browser/extensions/api/terminal/terminal_extension_helper.h" | |
212 #endif | |
213 #include "chrome/browser/ui/webui/chromeos/active_downloads_ui.h" | |
214 #endif | 212 #endif |
215 | 213 |
216 #if defined(USE_ASH) | 214 #if defined(USE_ASH) |
217 #include "ash/ash_switches.h" | 215 #include "ash/ash_switches.h" |
218 #include "ash/shell.h" | 216 #include "ash/shell.h" |
219 #include "chrome/browser/ui/views/ash/panel_view_aura.h" | 217 #include "chrome/browser/ui/views/ash/panel_view_aura.h" |
220 #endif | 218 #endif |
221 | 219 |
222 #if !defined(OS_CHROMEOS) || defined(USE_AURA) | |
223 #include "chrome/browser/download/download_shelf.h" | |
224 #endif | |
225 | |
226 #if defined(FILE_MANAGER_EXTENSION) | 220 #if defined(FILE_MANAGER_EXTENSION) |
227 #include "chrome/browser/chromeos/extensions/file_manager_util.h" | 221 #include "chrome/browser/chromeos/extensions/file_manager_util.h" |
228 #endif | 222 #endif |
229 | 223 |
230 using base::TimeDelta; | 224 using base::TimeDelta; |
231 using content::NavigationController; | 225 using content::NavigationController; |
232 using content::NavigationEntry; | 226 using content::NavigationEntry; |
233 using content::OpenURLParams; | 227 using content::OpenURLParams; |
234 using content::PluginService; | 228 using content::PluginService; |
235 using content::Referrer; | 229 using content::Referrer; |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 if (!base::StringToInt(str.substr(0, num1_size), &num1) || | 306 if (!base::StringToInt(str.substr(0, num1_size), &num1) || |
313 !base::StringToInt(str.substr(num2_pos, num2_size), &num2)) | 307 !base::StringToInt(str.substr(num2_pos, num2_size), &num2)) |
314 return false; | 308 return false; |
315 | 309 |
316 *ret_num1 = num1; | 310 *ret_num1 = num1; |
317 *ret_num2 = num2; | 311 *ret_num2 = num2; |
318 return true; | 312 return true; |
319 } | 313 } |
320 | 314 |
321 bool AllowPanels(const std::string& app_name) { | 315 bool AllowPanels(const std::string& app_name) { |
322 #if (!defined(OS_CHROMEOS) || defined(USE_AURA)) | |
323 if (!PanelManager::ShouldUsePanels( | 316 if (!PanelManager::ShouldUsePanels( |
324 web_app::GetExtensionIdFromApplicationName(app_name))) { | 317 web_app::GetExtensionIdFromApplicationName(app_name))) { |
325 return false; | 318 return false; |
326 } | 319 } |
327 #endif // !OS_CHROMEOS || USE_AURA | |
328 return true; | 320 return true; |
329 } | 321 } |
330 | 322 |
331 } // namespace | 323 } // namespace |
332 | 324 |
333 //////////////////////////////////////////////////////////////////////////////// | 325 //////////////////////////////////////////////////////////////////////////////// |
334 // Browser, CreateParams: | 326 // Browser, CreateParams: |
335 | 327 |
336 Browser::CreateParams::CreateParams() | 328 Browser::CreateParams::CreateParams() |
337 : type(TYPE_TABBED), | 329 : type(TYPE_TABBED), |
(...skipping 1300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1638 bool Browser::SupportsWindowFeatureImpl(WindowFeature feature, | 1630 bool Browser::SupportsWindowFeatureImpl(WindowFeature feature, |
1639 bool check_fullscreen) const { | 1631 bool check_fullscreen) const { |
1640 // On Mac, fullscreen mode has most normal things (in a slide-down panel). On | 1632 // On Mac, fullscreen mode has most normal things (in a slide-down panel). On |
1641 // other platforms, we hide some controls when in fullscreen mode. | 1633 // other platforms, we hide some controls when in fullscreen mode. |
1642 bool hide_ui_for_fullscreen = false; | 1634 bool hide_ui_for_fullscreen = false; |
1643 #if !defined(OS_MACOSX) | 1635 #if !defined(OS_MACOSX) |
1644 hide_ui_for_fullscreen = check_fullscreen && window_ && | 1636 hide_ui_for_fullscreen = check_fullscreen && window_ && |
1645 window_->IsFullscreen(); | 1637 window_->IsFullscreen(); |
1646 #endif | 1638 #endif |
1647 | 1639 |
1648 unsigned int features = FEATURE_INFOBAR; | 1640 unsigned int features = (FEATURE_INFOBAR | FEATURE_DOWNLOADSHELF); |
1649 | |
1650 #if !defined(OS_CHROMEOS) || defined(USE_AURA) | |
1651 // Chrome OS opens a FileBrowse pop up instead of using download shelf. | |
1652 // So FEATURE_DOWNLOADSHELF is only added for non-chromeos platforms. | |
1653 features |= FEATURE_DOWNLOADSHELF; | |
1654 #endif // !defined(OS_CHROMEOS) || defined(USE_AURA) | |
1655 | 1641 |
1656 if (is_type_tabbed()) | 1642 if (is_type_tabbed()) |
1657 features |= FEATURE_BOOKMARKBAR; | 1643 features |= FEATURE_BOOKMARKBAR; |
1658 | 1644 |
1659 if (!hide_ui_for_fullscreen) { | 1645 if (!hide_ui_for_fullscreen) { |
1660 if (!is_type_tabbed()) | 1646 if (!is_type_tabbed()) |
1661 features |= FEATURE_TITLEBAR; | 1647 features |= FEATURE_TITLEBAR; |
1662 | 1648 |
1663 if (is_type_tabbed()) | 1649 if (is_type_tabbed()) |
1664 features |= FEATURE_TABSTRIP; | 1650 features |= FEATURE_TABSTRIP; |
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2389 void Browser::ShowHistoryTab() { | 2375 void Browser::ShowHistoryTab() { |
2390 content::RecordAction(UserMetricsAction("ShowHistory")); | 2376 content::RecordAction(UserMetricsAction("ShowHistory")); |
2391 browser::NavigateParams params( | 2377 browser::NavigateParams params( |
2392 GetSingletonTabNavigateParams(GURL(chrome::kChromeUIHistoryURL))); | 2378 GetSingletonTabNavigateParams(GURL(chrome::kChromeUIHistoryURL))); |
2393 params.path_behavior = browser::NavigateParams::IGNORE_AND_NAVIGATE; | 2379 params.path_behavior = browser::NavigateParams::IGNORE_AND_NAVIGATE; |
2394 ShowSingletonTabOverwritingNTP(params); | 2380 ShowSingletonTabOverwritingNTP(params); |
2395 } | 2381 } |
2396 | 2382 |
2397 void Browser::ShowDownloadsTab() { | 2383 void Browser::ShowDownloadsTab() { |
2398 content::RecordAction(UserMetricsAction("ShowDownloads")); | 2384 content::RecordAction(UserMetricsAction("ShowDownloads")); |
2399 #if !defined(OS_CHROMEOS) || defined(USE_AURA) | |
2400 // ChromiumOS (non-Aura) uses ActiveDownloadsUI instead of of DownloadShelf. | |
2401 if (window()) { | 2385 if (window()) { |
2402 DownloadShelf* shelf = window()->GetDownloadShelf(); | 2386 DownloadShelf* shelf = window()->GetDownloadShelf(); |
2403 if (shelf->IsShowing()) | 2387 if (shelf->IsShowing()) |
2404 shelf->Close(); | 2388 shelf->Close(); |
2405 } | 2389 } |
2406 #endif | |
2407 ShowSingletonTabOverwritingNTP( | 2390 ShowSingletonTabOverwritingNTP( |
2408 GetSingletonTabNavigateParams(GURL(chrome::kChromeUIDownloadsURL))); | 2391 GetSingletonTabNavigateParams(GURL(chrome::kChromeUIDownloadsURL))); |
2409 } | 2392 } |
2410 | 2393 |
2411 void Browser::ShowExtensionsTab() { | 2394 void Browser::ShowExtensionsTab() { |
2412 content::RecordAction(UserMetricsAction("ShowExtensions")); | 2395 content::RecordAction(UserMetricsAction("ShowExtensions")); |
2413 browser::NavigateParams params( | 2396 browser::NavigateParams params( |
2414 GetSingletonTabNavigateParams(GURL(chrome::kChromeUIExtensionsURL))); | 2397 GetSingletonTabNavigateParams(GURL(chrome::kChromeUIExtensionsURL))); |
2415 params.path_behavior = browser::NavigateParams::IGNORE_AND_NAVIGATE; | 2398 params.path_behavior = browser::NavigateParams::IGNORE_AND_NAVIGATE; |
2416 ShowSingletonTabOverwritingNTP(params); | 2399 ShowSingletonTabOverwritingNTP(params); |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2574 window_->Activate(); | 2557 window_->Activate(); |
2575 } | 2558 } |
2576 } | 2559 } |
2577 | 2560 |
2578 void Browser::OpenAddBluetoothDeviceDialog() { | 2561 void Browser::OpenAddBluetoothDeviceDialog() { |
2579 content::RecordAction(UserMetricsAction("OpenAddBluetoothDeviceDialog")); | 2562 content::RecordAction(UserMetricsAction("OpenAddBluetoothDeviceDialog")); |
2580 ShowOptionsTab(chrome::kBluetoothAddDeviceSubPage); | 2563 ShowOptionsTab(chrome::kBluetoothAddDeviceSubPage); |
2581 } | 2564 } |
2582 #endif // defined(OS_CHROMEOS) | 2565 #endif // defined(OS_CHROMEOS) |
2583 | 2566 |
2584 #if defined(OS_CHROMEOS) && defined(USE_AURA) | 2567 #if defined(OS_CHROMEOS) |
2585 void Browser::OpenCrosh() { | 2568 void Browser::OpenCrosh() { |
2586 GURL crosh_url = TerminalExtensionHelper::GetCroshExtensionURL(profile_); | 2569 GURL crosh_url = TerminalExtensionHelper::GetCroshExtensionURL(profile_); |
2587 if (!crosh_url.is_valid()) | 2570 if (!crosh_url.is_valid()) |
2588 return; | 2571 return; |
2589 OpenURL(OpenURLParams(crosh_url, Referrer(), NEW_FOREGROUND_TAB, | 2572 OpenURL(OpenURLParams(crosh_url, Referrer(), NEW_FOREGROUND_TAB, |
2590 content::PAGE_TRANSITION_GENERATED, | 2573 content::PAGE_TRANSITION_GENERATED, |
2591 false)); | 2574 false)); |
2592 } | 2575 } |
2593 #endif | 2576 #endif |
2594 | 2577 |
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3246 case IDC_UPGRADE_DIALOG: OpenUpdateChromeDialog(); break; | 3229 case IDC_UPGRADE_DIALOG: OpenUpdateChromeDialog(); break; |
3247 case IDC_VIEW_INCOMPATIBILITIES: ShowAboutConflictsTab(); break; | 3230 case IDC_VIEW_INCOMPATIBILITIES: ShowAboutConflictsTab(); break; |
3248 case IDC_HELP_PAGE: ShowHelpTab(); break; | 3231 case IDC_HELP_PAGE: ShowHelpTab(); break; |
3249 #if defined(OS_CHROMEOS) | 3232 #if defined(OS_CHROMEOS) |
3250 case IDC_LOCK_SCREEN: LockScreen(); break; | 3233 case IDC_LOCK_SCREEN: LockScreen(); break; |
3251 case IDC_SHUTDOWN: Shutdown(); break; | 3234 case IDC_SHUTDOWN: Shutdown(); break; |
3252 case IDC_FILE_MANAGER: OpenFileManager(); break; | 3235 case IDC_FILE_MANAGER: OpenFileManager(); break; |
3253 case IDC_INTERNET_OPTIONS: OpenInternetOptionsDialog(); break; | 3236 case IDC_INTERNET_OPTIONS: OpenInternetOptionsDialog(); break; |
3254 case IDC_LANGUAGE_OPTIONS: OpenLanguageOptionsDialog(); break; | 3237 case IDC_LANGUAGE_OPTIONS: OpenLanguageOptionsDialog(); break; |
3255 #endif | 3238 #endif |
3256 #if defined(OS_CHROMEOS) && defined(USE_AURA) | 3239 #if defined(OS_CHROMEOS) |
3257 case IDC_NEW_CROSH_TAB: OpenCrosh(); break; | 3240 case IDC_NEW_CROSH_TAB: OpenCrosh(); break; |
3258 #endif | 3241 #endif |
3259 case IDC_SHOW_SYNC_SETUP: ShowSyncSetup(SyncPromoUI::SOURCE_MENU); | 3242 case IDC_SHOW_SYNC_SETUP: ShowSyncSetup(SyncPromoUI::SOURCE_MENU); |
3260 break; | 3243 break; |
3261 case IDC_TOGGLE_SPEECH_INPUT: ToggleSpeechInput(); break; | 3244 case IDC_TOGGLE_SPEECH_INPUT: ToggleSpeechInput(); break; |
3262 | 3245 |
3263 default: | 3246 default: |
3264 LOG(WARNING) << "Received Unimplemented Command: " << id; | 3247 LOG(WARNING) << "Received Unimplemented Command: " << id; |
3265 break; | 3248 break; |
3266 } | 3249 } |
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3985 // Download in a constrained popup is shown in the tab that opened it. | 3968 // Download in a constrained popup is shown in the tab that opened it. |
3986 WebContents* constrained_tab = constrained->web_contents(); | 3969 WebContents* constrained_tab = constrained->web_contents(); |
3987 constrained_tab->GetDelegate()->OnStartDownload(constrained_tab, download); | 3970 constrained_tab->GetDelegate()->OnStartDownload(constrained_tab, download); |
3988 return; | 3971 return; |
3989 } | 3972 } |
3990 | 3973 |
3991 if (!window()) | 3974 if (!window()) |
3992 return; | 3975 return; |
3993 | 3976 |
3994 if (DisplayOldDownloadsUI()) { | 3977 if (DisplayOldDownloadsUI()) { |
3995 #if defined(OS_CHROMEOS) && !defined(USE_AURA) | |
3996 if (ActiveDownloadsUI::ShouldShowPopup(profile_, download)) | |
3997 ActiveDownloadsUI::OpenPopup(profile_); | |
3998 #else | |
3999 // GetDownloadShelf creates the download shelf if it was not yet created. | 3978 // GetDownloadShelf creates the download shelf if it was not yet created. |
4000 DownloadShelf* shelf = window()->GetDownloadShelf(); | 3979 DownloadShelf* shelf = window()->GetDownloadShelf(); |
4001 shelf->AddDownload(new DownloadItemModel(download)); | 3980 shelf->AddDownload(new DownloadItemModel(download)); |
4002 // Don't show the animation for "Save file" downloads. | 3981 // Don't show the animation for "Save file" downloads. |
4003 // For non-theme extensions, we don't show the download animation. | 3982 // For non-theme extensions, we don't show the download animation. |
4004 // Show animation in same window as the download shelf. Download shelf | 3983 // Show animation in same window as the download shelf. Download shelf |
4005 // may not be in the same window that initiated the download, e.g. | 3984 // may not be in the same window that initiated the download, e.g. |
4006 // Panels. | 3985 // Panels. |
4007 // Don't show the animation if the selected tab is not visible (i.e. the | 3986 // Don't show the animation if the selected tab is not visible (i.e. the |
4008 // window is minimized, we're in a unit test, etc.). | 3987 // window is minimized, we're in a unit test, etc.). |
4009 WebContents* shelf_tab = shelf->browser()->GetSelectedWebContents(); | 3988 WebContents* shelf_tab = shelf->browser()->GetSelectedWebContents(); |
4010 if ((download->GetTotalBytes() > 0) && | 3989 if ((download->GetTotalBytes() > 0) && |
4011 !ChromeDownloadManagerDelegate::IsExtensionDownload(download) && | 3990 !ChromeDownloadManagerDelegate::IsExtensionDownload(download) && |
4012 platform_util::IsVisible(shelf_tab->GetNativeView()) && | 3991 platform_util::IsVisible(shelf_tab->GetNativeView()) && |
4013 ui::Animation::ShouldRenderRichAnimation()) { | 3992 ui::Animation::ShouldRenderRichAnimation()) { |
4014 DownloadStartedAnimation::Show(shelf_tab); | 3993 DownloadStartedAnimation::Show(shelf_tab); |
4015 } | 3994 } |
4016 #endif | |
4017 } | 3995 } |
4018 | 3996 |
4019 // If the download occurs in a new tab, close it. | 3997 // If the download occurs in a new tab, close it. |
4020 if (source->GetController().IsInitialNavigation() && tab_count() > 1) | 3998 if (source->GetController().IsInitialNavigation() && tab_count() > 1) |
4021 CloseContents(source); | 3999 CloseContents(source); |
4022 } | 4000 } |
4023 | 4001 |
4024 void Browser::ShowPageInfo(content::WebContents* web_contents, | 4002 void Browser::ShowPageInfo(content::WebContents* web_contents, |
4025 const GURL& url, | 4003 const GURL& url, |
4026 const SSLStatus& ssl, | 4004 const SSLStatus& ssl, |
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4681 // (like Back & Forward with initial page load) must have their state | 4659 // (like Back & Forward with initial page load) must have their state |
4682 // initialized here, otherwise they will be forever disabled. | 4660 // initialized here, otherwise they will be forever disabled. |
4683 | 4661 |
4684 // Navigation commands | 4662 // Navigation commands |
4685 command_updater_.UpdateCommandEnabled(IDC_RELOAD, true); | 4663 command_updater_.UpdateCommandEnabled(IDC_RELOAD, true); |
4686 command_updater_.UpdateCommandEnabled(IDC_RELOAD_IGNORING_CACHE, true); | 4664 command_updater_.UpdateCommandEnabled(IDC_RELOAD_IGNORING_CACHE, true); |
4687 | 4665 |
4688 // Window management commands | 4666 // Window management commands |
4689 command_updater_.UpdateCommandEnabled(IDC_CLOSE_WINDOW, true); | 4667 command_updater_.UpdateCommandEnabled(IDC_CLOSE_WINDOW, true); |
4690 command_updater_.UpdateCommandEnabled(IDC_NEW_TAB, true); | 4668 command_updater_.UpdateCommandEnabled(IDC_NEW_TAB, true); |
4691 #if defined(OS_CHROMEOS) && defined(USE_AURA) | 4669 #if defined(OS_CHROMEOS) |
4692 command_updater_.UpdateCommandEnabled(IDC_NEW_CROSH_TAB, true); | 4670 command_updater_.UpdateCommandEnabled(IDC_NEW_CROSH_TAB, true); |
4693 #endif | 4671 #endif |
4694 command_updater_.UpdateCommandEnabled(IDC_CLOSE_TAB, true); | 4672 command_updater_.UpdateCommandEnabled(IDC_CLOSE_TAB, true); |
4695 command_updater_.UpdateCommandEnabled(IDC_DUPLICATE_TAB, true); | 4673 command_updater_.UpdateCommandEnabled(IDC_DUPLICATE_TAB, true); |
4696 command_updater_.UpdateCommandEnabled(IDC_RESTORE_TAB, false); | 4674 command_updater_.UpdateCommandEnabled(IDC_RESTORE_TAB, false); |
4697 command_updater_.UpdateCommandEnabled(IDC_EXIT, true); | 4675 command_updater_.UpdateCommandEnabled(IDC_EXIT, true); |
4698 command_updater_.UpdateCommandEnabled(IDC_DEBUG_FRAME_TOGGLE, true); | 4676 command_updater_.UpdateCommandEnabled(IDC_DEBUG_FRAME_TOGGLE, true); |
4699 | 4677 |
4700 // Page-related commands | 4678 // Page-related commands |
4701 command_updater_.UpdateCommandEnabled(IDC_EMAIL_PAGE_LOCATION, true); | 4679 command_updater_.UpdateCommandEnabled(IDC_EMAIL_PAGE_LOCATION, true); |
(...skipping 985 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5687 ShowSingletonTabOverwritingNTP(params); | 5665 ShowSingletonTabOverwritingNTP(params); |
5688 } else { | 5666 } else { |
5689 LoginUIServiceFactory::GetForProfile( | 5667 LoginUIServiceFactory::GetForProfile( |
5690 profile()->GetOriginalProfile())->ShowLoginUI(false); | 5668 profile()->GetOriginalProfile())->ShowLoginUI(false); |
5691 } | 5669 } |
5692 } | 5670 } |
5693 | 5671 |
5694 void Browser::ToggleSpeechInput() { | 5672 void Browser::ToggleSpeechInput() { |
5695 GetSelectedWebContents()->GetRenderViewHost()->ToggleSpeechInput(); | 5673 GetSelectedWebContents()->GetRenderViewHost()->ToggleSpeechInput(); |
5696 } | 5674 } |
OLD | NEW |