| 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 4326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4391 case chrome::NOTIFICATION_EXTENSION_UPDATE_DISABLED: { | 4391 case chrome::NOTIFICATION_EXTENSION_UPDATE_DISABLED: { |
| 4392 // Show the UI if the extension was disabled for escalated permissions. | 4392 // Show the UI if the extension was disabled for escalated permissions. |
| 4393 Profile* profile = content::Source<Profile>(source).ptr(); | 4393 Profile* profile = content::Source<Profile>(source).ptr(); |
| 4394 if (profile_->IsSameProfile(profile)) { | 4394 if (profile_->IsSameProfile(profile)) { |
| 4395 ExtensionService* service = profile->GetExtensionService(); | 4395 ExtensionService* service = profile->GetExtensionService(); |
| 4396 DCHECK(service); | 4396 DCHECK(service); |
| 4397 const Extension* extension = | 4397 const Extension* extension = |
| 4398 content::Details<const Extension>(details).ptr(); | 4398 content::Details<const Extension>(details).ptr(); |
| 4399 if (service->extension_prefs()->DidExtensionEscalatePermissions( | 4399 if (service->extension_prefs()->DidExtensionEscalatePermissions( |
| 4400 extension->id())) | 4400 extension->id())) |
| 4401 ShowExtensionDisabledUI(service, profile_, extension); | 4401 extensions::ShowExtensionDisabledUI(service, profile_, extension); |
| 4402 } | 4402 } |
| 4403 break; | 4403 break; |
| 4404 } | 4404 } |
| 4405 | 4405 |
| 4406 case chrome::NOTIFICATION_EXTENSION_UNLOADED: { | 4406 case chrome::NOTIFICATION_EXTENSION_UNLOADED: { |
| 4407 if (window()->GetLocationBar()) | 4407 if (window()->GetLocationBar()) |
| 4408 window()->GetLocationBar()->UpdatePageActions(); | 4408 window()->GetLocationBar()->UpdatePageActions(); |
| 4409 | 4409 |
| 4410 // Close any tabs from the unloaded extension, unless it's terminated, | 4410 // Close any tabs from the unloaded extension, unless it's terminated, |
| 4411 // in which case let the sad tabs remain. | 4411 // in which case let the sad tabs remain. |
| (...skipping 1259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5671 } else { | 5671 } else { |
| 5672 LoginUIServiceFactory::GetForProfile( | 5672 LoginUIServiceFactory::GetForProfile( |
| 5673 profile()->GetOriginalProfile())->ShowLoginUI(false); | 5673 profile()->GetOriginalProfile())->ShowLoginUI(false); |
| 5674 } | 5674 } |
| 5675 #endif | 5675 #endif |
| 5676 } | 5676 } |
| 5677 | 5677 |
| 5678 void Browser::ToggleSpeechInput() { | 5678 void Browser::ToggleSpeechInput() { |
| 5679 GetSelectedWebContents()->GetRenderViewHost()->ToggleSpeechInput(); | 5679 GetSelectedWebContents()->GetRenderViewHost()->ToggleSpeechInput(); |
| 5680 } | 5680 } |
| OLD | NEW |