Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/browser_init.h" | 5 #include "chrome/browser/browser_init.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include "app/win_util.h" | 8 #include "app/win_util.h" |
| 9 #endif | 9 #endif |
| 10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 53 #include "grit/chromium_strings.h" | 53 #include "grit/chromium_strings.h" |
| 54 #include "grit/generated_resources.h" | 54 #include "grit/generated_resources.h" |
| 55 #include "grit/locale_settings.h" | 55 #include "grit/locale_settings.h" |
| 56 #include "grit/theme_resources.h" | 56 #include "grit/theme_resources.h" |
| 57 #include "webkit/glue/webkit_glue.h" | 57 #include "webkit/glue/webkit_glue.h" |
| 58 | 58 |
| 59 #if defined(OS_WIN) | 59 #if defined(OS_WIN) |
| 60 #include "base/win_util.h" | 60 #include "base/win_util.h" |
| 61 #endif | 61 #endif |
| 62 | 62 |
| 63 #if defined(LINUX2) | |
| 64 #include "chrome/browser/views/tabs/tab_overview_message_listener.h" | |
| 65 #endif | |
| 66 | |
| 63 namespace { | 67 namespace { |
| 64 | 68 |
| 65 class SetAsDefaultBrowserTask : public Task { | 69 class SetAsDefaultBrowserTask : public Task { |
| 66 public: | 70 public: |
| 67 SetAsDefaultBrowserTask() { } | 71 SetAsDefaultBrowserTask() { } |
| 68 virtual void Run() { | 72 virtual void Run() { |
| 69 ShellIntegration::SetAsDefaultBrowser(); | 73 ShellIntegration::SetAsDefaultBrowser(); |
| 70 } | 74 } |
| 71 | 75 |
| 72 private: | 76 private: |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 329 BrowserInit::LaunchWithProfile lwp(cur_dir, command_line, browser_init); | 333 BrowserInit::LaunchWithProfile lwp(cur_dir, command_line, browser_init); |
| 330 bool launched = lwp.Launch(profile, process_startup); | 334 bool launched = lwp.Launch(profile, process_startup); |
| 331 in_startup = false; | 335 in_startup = false; |
| 332 | 336 |
| 333 if (!launched) { | 337 if (!launched) { |
| 334 LOG(ERROR) << "launch error"; | 338 LOG(ERROR) << "launch error"; |
| 335 if (return_code) | 339 if (return_code) |
| 336 *return_code = ResultCodes::INVALID_CMDLINE_URL; | 340 *return_code = ResultCodes::INVALID_CMDLINE_URL; |
| 337 return false; | 341 return false; |
| 338 } | 342 } |
| 343 | |
| 344 #if defined(LINUX2) | |
| 345 // Force creation of the message listener. | |
| 346 TabOverviewMessageListener::instance(); | |
|
Ben Goodger (Google)
2009/06/16 11:44:47
Ew. Why?
sky
2009/06/16 14:25:26
Why force creation? TabOverviewMessageListener ins
| |
| 347 #endif | |
| 339 return true; | 348 return true; |
| 340 } | 349 } |
| 341 | 350 |
| 342 #if defined(OS_WIN) | 351 #if defined(OS_WIN) |
| 343 GURL GetWelcomePageURL() { | 352 GURL GetWelcomePageURL() { |
| 344 std::wstring welcome_url = l10n_util::GetString(IDS_WELCOME_PAGE_URL); | 353 std::wstring welcome_url = l10n_util::GetString(IDS_WELCOME_PAGE_URL); |
| 345 return GURL(welcome_url); | 354 return GURL(welcome_url); |
| 346 } | 355 } |
| 347 #else | 356 #else |
| 348 GURL GetWelcomePageURL() { | 357 GURL GetWelcomePageURL() { |
| (...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 797 scoped_refptr<AutomationProviderClass> automation = | 806 scoped_refptr<AutomationProviderClass> automation = |
| 798 new AutomationProviderClass(profile); | 807 new AutomationProviderClass(profile); |
| 799 automation->ConnectToChannel(channel_id); | 808 automation->ConnectToChannel(channel_id); |
| 800 automation->SetExpectedTabCount(expected_tabs); | 809 automation->SetExpectedTabCount(expected_tabs); |
| 801 | 810 |
| 802 AutomationProviderList* list = | 811 AutomationProviderList* list = |
| 803 g_browser_process->InitAutomationProviderList(); | 812 g_browser_process->InitAutomationProviderList(); |
| 804 DCHECK(list); | 813 DCHECK(list); |
| 805 list->AddProvider(automation); | 814 list->AddProvider(automation); |
| 806 } | 815 } |
| OLD | NEW |