| 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_frame/test/net/fake_external_tab.h" | 5 #include "chrome_frame/test/net/fake_external_tab.h" |
| 6 | 6 |
| 7 #include <atlbase.h> | 7 #include <atlbase.h> |
| 8 #include <atlcom.h> | 8 #include <atlcom.h> |
| 9 #include <exdisp.h> | 9 #include <exdisp.h> |
| 10 #include <Winsock2.h> | 10 #include <Winsock2.h> |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 #include "base/win/scoped_comptr.h" | 32 #include "base/win/scoped_comptr.h" |
| 33 #include "base/win/scoped_handle.h" | 33 #include "base/win/scoped_handle.h" |
| 34 #include "chrome/app/chrome_main_delegate.h" | 34 #include "chrome/app/chrome_main_delegate.h" |
| 35 #include "chrome/browser/automation/automation_provider_list.h" | 35 #include "chrome/browser/automation/automation_provider_list.h" |
| 36 #include "chrome/browser/chrome_content_browser_client.h" | 36 #include "chrome/browser/chrome_content_browser_client.h" |
| 37 #include "chrome/browser/prefs/browser_prefs.h" | 37 #include "chrome/browser/prefs/browser_prefs.h" |
| 38 #include "chrome/browser/prefs/proxy_config_dictionary.h" | 38 #include "chrome/browser/prefs/proxy_config_dictionary.h" |
| 39 #include "chrome/browser/process_singleton.h" | 39 #include "chrome/browser/process_singleton.h" |
| 40 #include "chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.h" | 40 #include "chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.h" |
| 41 #include "chrome/browser/profiles/profile_manager.h" | 41 #include "chrome/browser/profiles/profile_manager.h" |
| 42 #include "chrome/browser/profiles/profiles_state.h" |
| 42 #include "chrome/browser/renderer_host/web_cache_manager.h" | 43 #include "chrome/browser/renderer_host/web_cache_manager.h" |
| 43 #include "chrome/common/chrome_constants.h" | 44 #include "chrome/common/chrome_constants.h" |
| 44 #include "chrome/common/chrome_content_client.h" | 45 #include "chrome/common/chrome_content_client.h" |
| 45 #include "chrome/common/chrome_paths.h" | 46 #include "chrome/common/chrome_paths.h" |
| 46 #include "chrome/common/chrome_paths_internal.h" | 47 #include "chrome/common/chrome_paths_internal.h" |
| 47 #include "chrome/common/chrome_switches.h" | 48 #include "chrome/common/chrome_switches.h" |
| 48 #include "chrome/common/pref_names.h" | 49 #include "chrome/common/pref_names.h" |
| 49 #include "chrome/renderer/chrome_content_renderer_client.h" | 50 #include "chrome/renderer/chrome_content_renderer_client.h" |
| 50 #include "chrome/test/base/ui_test_utils.h" | 51 #include "chrome/test/base/ui_test_utils.h" |
| 51 #include "chrome/test/logging/win/file_logger.h" | 52 #include "chrome/test/logging/win/file_logger.h" |
| (...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 542 registry->RegisterBooleanPref(prefs::kMetricsReportingEnabled, false); | 543 registry->RegisterBooleanPref(prefs::kMetricsReportingEnabled, false); |
| 543 } | 544 } |
| 544 } | 545 } |
| 545 | 546 |
| 546 void FakeExternalTab::InitializePostThreadsCreated() { | 547 void FakeExternalTab::InitializePostThreadsCreated() { |
| 547 #if defined(USE_AURA) | 548 #if defined(USE_AURA) |
| 548 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, | 549 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, |
| 549 views::CreateDesktopScreen()); | 550 views::CreateDesktopScreen()); |
| 550 #endif | 551 #endif |
| 551 base::FilePath profile_path( | 552 base::FilePath profile_path( |
| 552 ProfileManager::GetDefaultProfileDir(user_data())); | 553 profiles::GetDefaultProfileDir(user_data())); |
| 553 Profile* profile = | 554 Profile* profile = |
| 554 g_browser_process->profile_manager()->GetProfile(profile_path); | 555 g_browser_process->profile_manager()->GetProfile(profile_path); |
| 555 } | 556 } |
| 556 | 557 |
| 557 void FakeExternalTab::Shutdown() { | 558 void FakeExternalTab::Shutdown() { |
| 558 browser_process_.reset(); | 559 browser_process_.reset(); |
| 559 g_browser_process = NULL; | 560 g_browser_process = NULL; |
| 560 | 561 |
| 561 ResourceBundle::CleanupSharedInstance(); | 562 ResourceBundle::CleanupSharedInstance(); |
| 562 } | 563 } |
| (...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 987 content::InitializeSandboxInfo(&sandbox_info); | 988 content::InitializeSandboxInfo(&sandbox_info); |
| 988 FakeMainDelegate delegate; | 989 FakeMainDelegate delegate; |
| 989 content::ContentMain( | 990 content::ContentMain( |
| 990 reinterpret_cast<HINSTANCE>(GetModuleHandle(NULL)), | 991 reinterpret_cast<HINSTANCE>(GetModuleHandle(NULL)), |
| 991 &sandbox_info, | 992 &sandbox_info, |
| 992 &delegate); | 993 &delegate); |
| 993 | 994 |
| 994 // Note: In debug builds, we ExitProcess during PostDestroyThreads. | 995 // Note: In debug builds, we ExitProcess during PostDestroyThreads. |
| 995 return g_test_suite->test_result(); | 996 return g_test_suite->test_result(); |
| 996 } | 997 } |
| OLD | NEW |