| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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_started_animation.h" | 48 #include "chrome/browser/download/download_started_animation.h" |
| 49 #include "chrome/browser/download/download_util.h" | 49 #include "chrome/browser/download/download_util.h" |
| 50 #include "chrome/browser/extensions/browser_extension_window_controller.h" | 50 #include "chrome/browser/extensions/browser_extension_window_controller.h" |
| 51 #include "chrome/browser/extensions/crx_installer.h" | 51 #include "chrome/browser/extensions/crx_installer.h" |
| 52 #include "chrome/browser/extensions/default_apps_trial.h" | 52 #include "chrome/browser/extensions/default_apps_trial.h" |
| 53 #include "chrome/browser/extensions/extension_browser_event_router.h" | 53 #include "chrome/browser/extensions/extension_browser_event_router.h" |
| 54 #include "chrome/browser/extensions/extension_disabled_infobar_delegate.h" | 54 #include "chrome/browser/extensions/extension_disabled_ui.h" |
| 55 #include "chrome/browser/extensions/extension_prefs.h" | 55 #include "chrome/browser/extensions/extension_prefs.h" |
| 56 #include "chrome/browser/extensions/extension_service.h" | 56 #include "chrome/browser/extensions/extension_service.h" |
| 57 #include "chrome/browser/extensions/extension_tab_helper.h" | 57 #include "chrome/browser/extensions/extension_tab_helper.h" |
| 58 #include "chrome/browser/extensions/extension_tabs_module.h" | 58 #include "chrome/browser/extensions/extension_tabs_module.h" |
| 59 #include "chrome/browser/favicon/favicon_tab_helper.h" | 59 #include "chrome/browser/favicon/favicon_tab_helper.h" |
| 60 #include "chrome/browser/file_select_helper.h" | 60 #include "chrome/browser/file_select_helper.h" |
| 61 #include "chrome/browser/first_run/first_run.h" | 61 #include "chrome/browser/first_run/first_run.h" |
| 62 #include "chrome/browser/google/google_url_tracker.h" | 62 #include "chrome/browser/google/google_url_tracker.h" |
| 63 #include "chrome/browser/infobars/infobar_tab_helper.h" | 63 #include "chrome/browser/infobars/infobar_tab_helper.h" |
| 64 #include "chrome/browser/instant/instant_controller.h" | 64 #include "chrome/browser/instant/instant_controller.h" |
| (...skipping 4282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4347 case chrome::NOTIFICATION_EXTENSION_UPDATE_DISABLED: { | 4347 case chrome::NOTIFICATION_EXTENSION_UPDATE_DISABLED: { |
| 4348 // Show the UI if the extension was disabled for escalated permissions. | 4348 // Show the UI if the extension was disabled for escalated permissions. |
| 4349 Profile* profile = content::Source<Profile>(source).ptr(); | 4349 Profile* profile = content::Source<Profile>(source).ptr(); |
| 4350 if (profile_->IsSameProfile(profile)) { | 4350 if (profile_->IsSameProfile(profile)) { |
| 4351 ExtensionService* service = profile->GetExtensionService(); | 4351 ExtensionService* service = profile->GetExtensionService(); |
| 4352 DCHECK(service); | 4352 DCHECK(service); |
| 4353 const Extension* extension = | 4353 const Extension* extension = |
| 4354 content::Details<const Extension>(details).ptr(); | 4354 content::Details<const Extension>(details).ptr(); |
| 4355 if (service->extension_prefs()->DidExtensionEscalatePermissions( | 4355 if (service->extension_prefs()->DidExtensionEscalatePermissions( |
| 4356 extension->id())) | 4356 extension->id())) |
| 4357 ShowExtensionDisabledUI(service, profile_, extension); | 4357 extensions::ShowExtensionDisabledUI(service, profile_, extension); |
| 4358 } | 4358 } |
| 4359 break; | 4359 break; |
| 4360 } | 4360 } |
| 4361 | 4361 |
| 4362 case chrome::NOTIFICATION_EXTENSION_UNLOADED: { | 4362 case chrome::NOTIFICATION_EXTENSION_UNLOADED: { |
| 4363 if (window()->GetLocationBar()) | 4363 if (window()->GetLocationBar()) |
| 4364 window()->GetLocationBar()->UpdatePageActions(); | 4364 window()->GetLocationBar()->UpdatePageActions(); |
| 4365 | 4365 |
| 4366 // Close any tabs from the unloaded extension, unless it's terminated, | 4366 // Close any tabs from the unloaded extension, unless it's terminated, |
| 4367 // in which case let the sad tabs remain. | 4367 // in which case let the sad tabs remain. |
| (...skipping 1252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5620 } else { | 5620 } else { |
| 5621 LoginUIServiceFactory::GetForProfile( | 5621 LoginUIServiceFactory::GetForProfile( |
| 5622 profile()->GetOriginalProfile())->ShowLoginUI(); | 5622 profile()->GetOriginalProfile())->ShowLoginUI(); |
| 5623 } | 5623 } |
| 5624 #endif | 5624 #endif |
| 5625 } | 5625 } |
| 5626 | 5626 |
| 5627 void Browser::ToggleSpeechInput() { | 5627 void Browser::ToggleSpeechInput() { |
| 5628 GetSelectedWebContents()->GetRenderViewHost()->ToggleSpeechInput(); | 5628 GetSelectedWebContents()->GetRenderViewHost()->ToggleSpeechInput(); |
| 5629 } | 5629 } |
| OLD | NEW |