Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Side by Side Diff: chrome/browser/ui/browser.cc

Issue 181123004: Eliminate the dependence of tts extension API for tts_controller.cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile issue for mac. Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/speech/tts_controller.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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"
80 #include "chrome/browser/sync/profile_sync_service.h" 82 #include "chrome/browser/sync/profile_sync_service.h"
81 #include "chrome/browser/sync/profile_sync_service_factory.h" 83 #include "chrome/browser/sync/profile_sync_service_factory.h"
82 #include "chrome/browser/sync/sync_ui_util.h" 84 #include "chrome/browser/sync/sync_ui_util.h"
83 #include "chrome/browser/tab_contents/background_contents.h" 85 #include "chrome/browser/tab_contents/background_contents.h"
84 #include "chrome/browser/tab_contents/retargeting_details.h" 86 #include "chrome/browser/tab_contents/retargeting_details.h"
85 #include "chrome/browser/tab_contents/tab_util.h" 87 #include "chrome/browser/tab_contents/tab_util.h"
86 #include "chrome/browser/themes/theme_service.h" 88 #include "chrome/browser/themes/theme_service.h"
87 #include "chrome/browser/themes/theme_service_factory.h" 89 #include "chrome/browser/themes/theme_service_factory.h"
88 #include "chrome/browser/translate/translate_tab_helper.h" 90 #include "chrome/browser/translate/translate_tab_helper.h"
89 #include "chrome/browser/ui/app_modal_dialogs/javascript_dialog_manager.h" 91 #include "chrome/browser/ui/app_modal_dialogs/javascript_dialog_manager.h"
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 // TODO(beng): move to ChromeBrowserMain: 437 // TODO(beng): move to ChromeBrowserMain:
436 if (first_run::ShouldDoPersonalDataManagerFirstRun()) { 438 if (first_run::ShouldDoPersonalDataManagerFirstRun()) {
437 #if defined(OS_WIN) 439 #if defined(OS_WIN)
438 // Notify PDM that this is a first run. 440 // Notify PDM that this is a first run.
439 ImportAutofillDataWin( 441 ImportAutofillDataWin(
440 autofill::PersonalDataManagerFactory::GetForProfile(profile_)); 442 autofill::PersonalDataManagerFactory::GetForProfile(profile_));
441 #endif // defined(OS_WIN) 443 #endif // defined(OS_WIN)
442 } 444 }
443 445
444 fullscreen_controller_.reset(new FullscreenController(this)); 446 fullscreen_controller_.reset(new FullscreenController(this));
447
448 TtsExtensionEngine* tts_extension_engine = TtsExtensionEngine::GetInstance();
449 TtsController::GetInstance()->SetTtsEngineDelegate(tts_extension_engine);
445 } 450 }
446 451
447 Browser::~Browser() { 452 Browser::~Browser() {
448 // The tab strip should not have any tabs at this point. 453 // The tab strip should not have any tabs at this point.
449 if (!browser_shutdown::ShuttingDownWithoutClosingBrowsers()) 454 if (!browser_shutdown::ShuttingDownWithoutClosingBrowsers())
450 DCHECK(tab_strip_model_->empty()); 455 DCHECK(tab_strip_model_->empty());
451 456
452 tab_strip_model_->RemoveObserver(this); 457 tab_strip_model_->RemoveObserver(this);
453 458
454 // Destroy the BrowserCommandController before removing the browser, so that 459 // Destroy the BrowserCommandController before removing the browser, so that
(...skipping 1867 matching lines...) Expand 10 before | Expand all | Expand 10 after
2322 if (contents && !allow_js_access) { 2327 if (contents && !allow_js_access) {
2323 contents->web_contents()->GetController().LoadURL( 2328 contents->web_contents()->GetController().LoadURL(
2324 target_url, 2329 target_url,
2325 content::Referrer(), 2330 content::Referrer(),
2326 content::PAGE_TRANSITION_LINK, 2331 content::PAGE_TRANSITION_LINK,
2327 std::string()); // No extra headers. 2332 std::string()); // No extra headers.
2328 } 2333 }
2329 2334
2330 return contents != NULL; 2335 return contents != NULL;
2331 } 2336 }
OLDNEW
« no previous file with comments | « chrome/browser/speech/tts_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698