diff --git a/cef_paths2.gypi b/cef_paths2.gypi index 17c64a901..7f34a6c7a 100644 --- a/cef_paths2.gypi +++ b/cef_paths2.gypi @@ -191,6 +191,7 @@ 'tests/cefclient/root_window_manager.h', 'tests/cefclient/scheme_test.cc', 'tests/cefclient/scheme_test.h', + 'tests/cefclient/scheme_test_common.cc', 'tests/cefclient/temp_window.h', 'tests/cefclient/test_runner.cc', 'tests/cefclient/test_runner.h', @@ -241,38 +242,19 @@ 'tests/cefclient/window_test_mac.mm', ], 'cefclient_sources_mac_helper': [ - 'tests/cefclient/binding_test.cc', - 'tests/cefclient/binding_test.h', 'tests/cefclient/client_app.cc', 'tests/cefclient/client_app.h', 'tests/cefclient/client_app_delegates.cc', - 'tests/cefclient/client_handler.cc', - 'tests/cefclient/client_handler.h', 'tests/cefclient/client_renderer.cc', 'tests/cefclient/client_renderer.h', 'tests/cefclient/client_switches.cc', 'tests/cefclient/client_switches.h', - 'tests/cefclient/dialog_test.cc', - 'tests/cefclient/dialog_test.h', - 'tests/cefclient/main_context.cc', - 'tests/cefclient/main_context.h', - 'tests/cefclient/main_message_loop.cc', - 'tests/cefclient/main_message_loop.h', 'tests/cefclient/performance_test.cc', 'tests/cefclient/performance_test.h', 'tests/cefclient/performance_test_setup.h', 'tests/cefclient/performance_test_tests.cc', 'tests/cefclient/process_helper_mac.cc', - 'tests/cefclient/resource_util.h', - 'tests/cefclient/resource_util_mac.mm', - 'tests/cefclient/resource_util_posix.cc', - 'tests/cefclient/scheme_test.cc', - 'tests/cefclient/scheme_test.h', - 'tests/cefclient/test_runner.cc', - 'tests/cefclient/test_runner.h', - 'tests/cefclient/window_test.cc', - 'tests/cefclient/window_test.h', - 'tests/cefclient/window_test_mac.mm', + 'tests/cefclient/scheme_test_common.cc', ], 'cefclient_bundle_resources_mac': [ 'tests/cefclient/mac/cefclient.icns', diff --git a/tests/cefclient/scheme_test.cc b/tests/cefclient/scheme_test.cc index 3460c4b5b..544ca58bc 100644 --- a/tests/cefclient/scheme_test.cc +++ b/tests/cefclient/scheme_test.cc @@ -147,11 +147,6 @@ class ClientSchemeHandlerFactory : public CefSchemeHandlerFactory { } // namespace -void RegisterCustomSchemes(CefRefPtr registrar, - std::vector& cookiable_schemes) { - registrar->AddCustomScheme("client", true, false, false); -} - void RegisterSchemeHandlers() { CefRegisterSchemeHandlerFactory("client", "tests", new ClientSchemeHandlerFactory()); diff --git a/tests/cefclient/scheme_test.h b/tests/cefclient/scheme_test.h index 157e27bfc..ca14fa5c1 100644 --- a/tests/cefclient/scheme_test.h +++ b/tests/cefclient/scheme_test.h @@ -19,7 +19,7 @@ namespace scheme_test { void RegisterCustomSchemes(CefRefPtr registrar, std::vector& cookiable_schemes); -// Create the scheme handler. +// Create the scheme handler. Called from both the browser and renderer process. void RegisterSchemeHandlers(); } // namespace scheme_test diff --git a/tests/cefclient/scheme_test_common.cc b/tests/cefclient/scheme_test_common.cc new file mode 100644 index 000000000..496e44e1c --- /dev/null +++ b/tests/cefclient/scheme_test_common.cc @@ -0,0 +1,18 @@ +// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// reserved. Use of this source code is governed by a BSD-style license that +// can be found in the LICENSE file. + +#include "cefclient/scheme_test.h" + +#include "include/cef_scheme.h" + +namespace client { +namespace scheme_test { + +void RegisterCustomSchemes(CefRefPtr registrar, + std::vector& cookiable_schemes) { + registrar->AddCustomScheme("client", true, false, false); +} + +} // namespace scheme_test +} // namespace client