| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 // defined(OS_WIN) | 10 #endif // defined(OS_WIN) |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 #include "chrome/browser/profiles/profile_manager.h" | 70 #include "chrome/browser/profiles/profile_manager.h" |
| 71 #include "chrome/browser/profiles/profile_metrics.h" | 71 #include "chrome/browser/profiles/profile_metrics.h" |
| 72 #include "chrome/browser/repost_form_warning_controller.h" | 72 #include "chrome/browser/repost_form_warning_controller.h" |
| 73 #include "chrome/browser/search/search.h" | 73 #include "chrome/browser/search/search.h" |
| 74 #include "chrome/browser/sessions/session_service.h" | 74 #include "chrome/browser/sessions/session_service.h" |
| 75 #include "chrome/browser/sessions/session_service_factory.h" | 75 #include "chrome/browser/sessions/session_service_factory.h" |
| 76 #include "chrome/browser/sessions/session_tab_helper.h" | 76 #include "chrome/browser/sessions/session_tab_helper.h" |
| 77 #include "chrome/browser/sessions/session_types.h" | 77 #include "chrome/browser/sessions/session_types.h" |
| 78 #include "chrome/browser/sessions/tab_restore_service.h" | 78 #include "chrome/browser/sessions/tab_restore_service.h" |
| 79 #include "chrome/browser/sessions/tab_restore_service_factory.h" | 79 #include "chrome/browser/sessions/tab_restore_service_factory.h" |
| 80 #include "chrome/browser/speech/extension_api/tts_engine_extension_api.h" | |
| 81 #include "chrome/browser/speech/tts_controller.h" | |
| 82 #include "chrome/browser/sync/profile_sync_service.h" | 80 #include "chrome/browser/sync/profile_sync_service.h" |
| 83 #include "chrome/browser/sync/profile_sync_service_factory.h" | 81 #include "chrome/browser/sync/profile_sync_service_factory.h" |
| 84 #include "chrome/browser/sync/sync_ui_util.h" | 82 #include "chrome/browser/sync/sync_ui_util.h" |
| 85 #include "chrome/browser/tab_contents/background_contents.h" | 83 #include "chrome/browser/tab_contents/background_contents.h" |
| 86 #include "chrome/browser/tab_contents/retargeting_details.h" | 84 #include "chrome/browser/tab_contents/retargeting_details.h" |
| 87 #include "chrome/browser/tab_contents/tab_util.h" | 85 #include "chrome/browser/tab_contents/tab_util.h" |
| 88 #include "chrome/browser/themes/theme_service.h" | 86 #include "chrome/browser/themes/theme_service.h" |
| 89 #include "chrome/browser/themes/theme_service_factory.h" | 87 #include "chrome/browser/themes/theme_service_factory.h" |
| 90 #include "chrome/browser/translate/translate_tab_helper.h" | 88 #include "chrome/browser/translate/translate_tab_helper.h" |
| 91 #include "chrome/browser/ui/app_modal_dialogs/javascript_dialog_manager.h" | 89 #include "chrome/browser/ui/app_modal_dialogs/javascript_dialog_manager.h" |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 // TODO(beng): move to ChromeBrowserMain: | 435 // TODO(beng): move to ChromeBrowserMain: |
| 438 if (first_run::ShouldDoPersonalDataManagerFirstRun()) { | 436 if (first_run::ShouldDoPersonalDataManagerFirstRun()) { |
| 439 #if defined(OS_WIN) | 437 #if defined(OS_WIN) |
| 440 // Notify PDM that this is a first run. | 438 // Notify PDM that this is a first run. |
| 441 ImportAutofillDataWin( | 439 ImportAutofillDataWin( |
| 442 autofill::PersonalDataManagerFactory::GetForProfile(profile_)); | 440 autofill::PersonalDataManagerFactory::GetForProfile(profile_)); |
| 443 #endif // defined(OS_WIN) | 441 #endif // defined(OS_WIN) |
| 444 } | 442 } |
| 445 | 443 |
| 446 fullscreen_controller_.reset(new FullscreenController(this)); | 444 fullscreen_controller_.reset(new FullscreenController(this)); |
| 447 | |
| 448 TtsExtensionEngine* tts_extension_engine = TtsExtensionEngine::GetInstance(); | |
| 449 TtsController::GetInstance()->SetTtsEngineDelegate(tts_extension_engine); | |
| 450 } | 445 } |
| 451 | 446 |
| 452 Browser::~Browser() { | 447 Browser::~Browser() { |
| 453 // The tab strip should not have any tabs at this point. | 448 // The tab strip should not have any tabs at this point. |
| 454 if (!browser_shutdown::ShuttingDownWithoutClosingBrowsers()) | 449 if (!browser_shutdown::ShuttingDownWithoutClosingBrowsers()) |
| 455 DCHECK(tab_strip_model_->empty()); | 450 DCHECK(tab_strip_model_->empty()); |
| 456 | 451 |
| 457 tab_strip_model_->RemoveObserver(this); | 452 tab_strip_model_->RemoveObserver(this); |
| 458 | 453 |
| 459 // Destroy the BrowserCommandController before removing the browser, so that | 454 // Destroy the BrowserCommandController before removing the browser, so that |
| (...skipping 1867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2327 if (contents && !allow_js_access) { | 2322 if (contents && !allow_js_access) { |
| 2328 contents->web_contents()->GetController().LoadURL( | 2323 contents->web_contents()->GetController().LoadURL( |
| 2329 target_url, | 2324 target_url, |
| 2330 content::Referrer(), | 2325 content::Referrer(), |
| 2331 content::PAGE_TRANSITION_LINK, | 2326 content::PAGE_TRANSITION_LINK, |
| 2332 std::string()); // No extra headers. | 2327 std::string()); // No extra headers. |
| 2333 } | 2328 } |
| 2334 | 2329 |
| 2335 return contents != NULL; | 2330 return contents != NULL; |
| 2336 } | 2331 } |
| OLD | NEW |