| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include <algorithm> // For max(). | 7 #include <algorithm> // For max(). |
| 8 | 8 |
| 9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
| 10 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 DCHECK(profile); | 379 DCHECK(profile); |
| 380 | 380 |
| 381 // This forces the creation of the initial tavb notification observer | 381 // This forces the creation of the initial tavb notification observer |
| 382 // singleton. It must be created before browser launch to catch first tab | 382 // singleton. It must be created before browser launch to catch first tab |
| 383 // load. | 383 // load. |
| 384 #if defined(OS_CHROMEOS) | 384 #if defined(OS_CHROMEOS) |
| 385 if (process_startup) | 385 if (process_startup) |
| 386 chromeos::InitialTabNotificationObserver::Get(); | 386 chromeos::InitialTabNotificationObserver::Get(); |
| 387 #endif | 387 #endif |
| 388 | 388 |
| 389 #if defined(OS_WIN) |
| 390 // Disable the DPI-virtualization mode of Windows Vista or later because it |
| 391 // causes some problems when using system messages (such as WM_NCHITTEST and |
| 392 // WM_GETTITLEBARINFOEX) on a custom frame. |
| 393 win_util::CallSetProcessDPIAware(); |
| 394 #endif |
| 395 |
| 389 // Continue with the off-the-record profile from here on if --incognito | 396 // Continue with the off-the-record profile from here on if --incognito |
| 390 if (command_line.HasSwitch(switches::kIncognito)) | 397 if (command_line.HasSwitch(switches::kIncognito)) |
| 391 profile = profile->GetOffTheRecordProfile(); | 398 profile = profile->GetOffTheRecordProfile(); |
| 392 | 399 |
| 393 BrowserInit::LaunchWithProfile lwp(cur_dir, command_line, this); | 400 BrowserInit::LaunchWithProfile lwp(cur_dir, command_line, this); |
| 394 bool launched = lwp.Launch(profile, process_startup); | 401 bool launched = lwp.Launch(profile, process_startup); |
| 395 in_startup = false; | 402 in_startup = false; |
| 396 | 403 |
| 397 if (!launched) { | 404 if (!launched) { |
| 398 LOG(ERROR) << "launch error"; | 405 LOG(ERROR) << "launch error"; |
| (...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1057 scoped_refptr<AutomationProviderClass> automation = | 1064 scoped_refptr<AutomationProviderClass> automation = |
| 1058 new AutomationProviderClass(profile); | 1065 new AutomationProviderClass(profile); |
| 1059 automation->ConnectToChannel(channel_id); | 1066 automation->ConnectToChannel(channel_id); |
| 1060 automation->SetExpectedTabCount(expected_tabs); | 1067 automation->SetExpectedTabCount(expected_tabs); |
| 1061 | 1068 |
| 1062 AutomationProviderList* list = | 1069 AutomationProviderList* list = |
| 1063 g_browser_process->InitAutomationProviderList(); | 1070 g_browser_process->InitAutomationProviderList(); |
| 1064 DCHECK(list); | 1071 DCHECK(list); |
| 1065 list->AddProvider(automation); | 1072 list->AddProvider(automation); |
| 1066 } | 1073 } |
| OLD | NEW |